OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
dtocean.c
Go to the documentation of this file.
1 /* Generated by Cython 0.29.21 */
2 
3 /* BEGIN: Cython Metadata
4 {
5  "distutils": {
6  "name": "dtocean",
7  "sources": [
8  "dtocean.pyx"
9  ]
10  },
11  "module_name": "dtocean"
12 }
13 END: Cython Metadata */
14 
15 #define PY_SSIZE_T_CLEAN
16 #include "Python.h"
17 #ifndef Py_PYTHON_H
18  #error Python headers needed to compile C extensions, please install development version of Python.
19 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
20  #error Cython requires Python 2.6+ or Python 3.3+.
21 #else
22 #define CYTHON_ABI "0_29_21"
23 #define CYTHON_HEX_VERSION 0x001D15F0
24 #define CYTHON_FUTURE_DIVISION 1
25 #include <stddef.h>
26 #ifndef offsetof
27  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
28 #endif
29 #if !defined(WIN32) && !defined(MS_WINDOWS)
30  #ifndef __stdcall
31  #define __stdcall
32  #endif
33  #ifndef __cdecl
34  #define __cdecl
35  #endif
36  #ifndef __fastcall
37  #define __fastcall
38  #endif
39 #endif
40 #ifndef DL_IMPORT
41  #define DL_IMPORT(t) t
42 #endif
43 #ifndef DL_EXPORT
44  #define DL_EXPORT(t) t
45 #endif
46 #define __PYX_COMMA ,
47 #ifndef HAVE_LONG_LONG
48  #if PY_VERSION_HEX >= 0x02070000
49  #define HAVE_LONG_LONG
50  #endif
51 #endif
52 #ifndef PY_LONG_LONG
53  #define PY_LONG_LONG LONG_LONG
54 #endif
55 #ifndef Py_HUGE_VAL
56  #define Py_HUGE_VAL HUGE_VAL
57 #endif
58 #ifdef PYPY_VERSION
59  #define CYTHON_COMPILING_IN_PYPY 1
60  #define CYTHON_COMPILING_IN_PYSTON 0
61  #define CYTHON_COMPILING_IN_CPYTHON 0
62  #undef CYTHON_USE_TYPE_SLOTS
63  #define CYTHON_USE_TYPE_SLOTS 0
64  #undef CYTHON_USE_PYTYPE_LOOKUP
65  #define CYTHON_USE_PYTYPE_LOOKUP 0
66  #if PY_VERSION_HEX < 0x03050000
67  #undef CYTHON_USE_ASYNC_SLOTS
68  #define CYTHON_USE_ASYNC_SLOTS 0
69  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
70  #define CYTHON_USE_ASYNC_SLOTS 1
71  #endif
72  #undef CYTHON_USE_PYLIST_INTERNALS
73  #define CYTHON_USE_PYLIST_INTERNALS 0
74  #undef CYTHON_USE_UNICODE_INTERNALS
75  #define CYTHON_USE_UNICODE_INTERNALS 0
76  #undef CYTHON_USE_UNICODE_WRITER
77  #define CYTHON_USE_UNICODE_WRITER 0
78  #undef CYTHON_USE_PYLONG_INTERNALS
79  #define CYTHON_USE_PYLONG_INTERNALS 0
80  #undef CYTHON_AVOID_BORROWED_REFS
81  #define CYTHON_AVOID_BORROWED_REFS 1
82  #undef CYTHON_ASSUME_SAFE_MACROS
83  #define CYTHON_ASSUME_SAFE_MACROS 0
84  #undef CYTHON_UNPACK_METHODS
85  #define CYTHON_UNPACK_METHODS 0
86  #undef CYTHON_FAST_THREAD_STATE
87  #define CYTHON_FAST_THREAD_STATE 0
88  #undef CYTHON_FAST_PYCALL
89  #define CYTHON_FAST_PYCALL 0
90  #undef CYTHON_PEP489_MULTI_PHASE_INIT
91  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
92  #undef CYTHON_USE_TP_FINALIZE
93  #define CYTHON_USE_TP_FINALIZE 0
94  #undef CYTHON_USE_DICT_VERSIONS
95  #define CYTHON_USE_DICT_VERSIONS 0
96  #undef CYTHON_USE_EXC_INFO_STACK
97  #define CYTHON_USE_EXC_INFO_STACK 0
98 #elif defined(PYSTON_VERSION)
99  #define CYTHON_COMPILING_IN_PYPY 0
100  #define CYTHON_COMPILING_IN_PYSTON 1
101  #define CYTHON_COMPILING_IN_CPYTHON 0
102  #ifndef CYTHON_USE_TYPE_SLOTS
103  #define CYTHON_USE_TYPE_SLOTS 1
104  #endif
105  #undef CYTHON_USE_PYTYPE_LOOKUP
106  #define CYTHON_USE_PYTYPE_LOOKUP 0
107  #undef CYTHON_USE_ASYNC_SLOTS
108  #define CYTHON_USE_ASYNC_SLOTS 0
109  #undef CYTHON_USE_PYLIST_INTERNALS
110  #define CYTHON_USE_PYLIST_INTERNALS 0
111  #ifndef CYTHON_USE_UNICODE_INTERNALS
112  #define CYTHON_USE_UNICODE_INTERNALS 1
113  #endif
114  #undef CYTHON_USE_UNICODE_WRITER
115  #define CYTHON_USE_UNICODE_WRITER 0
116  #undef CYTHON_USE_PYLONG_INTERNALS
117  #define CYTHON_USE_PYLONG_INTERNALS 0
118  #ifndef CYTHON_AVOID_BORROWED_REFS
119  #define CYTHON_AVOID_BORROWED_REFS 0
120  #endif
121  #ifndef CYTHON_ASSUME_SAFE_MACROS
122  #define CYTHON_ASSUME_SAFE_MACROS 1
123  #endif
124  #ifndef CYTHON_UNPACK_METHODS
125  #define CYTHON_UNPACK_METHODS 1
126  #endif
127  #undef CYTHON_FAST_THREAD_STATE
128  #define CYTHON_FAST_THREAD_STATE 0
129  #undef CYTHON_FAST_PYCALL
130  #define CYTHON_FAST_PYCALL 0
131  #undef CYTHON_PEP489_MULTI_PHASE_INIT
132  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
133  #undef CYTHON_USE_TP_FINALIZE
134  #define CYTHON_USE_TP_FINALIZE 0
135  #undef CYTHON_USE_DICT_VERSIONS
136  #define CYTHON_USE_DICT_VERSIONS 0
137  #undef CYTHON_USE_EXC_INFO_STACK
138  #define CYTHON_USE_EXC_INFO_STACK 0
139 #else
140  #define CYTHON_COMPILING_IN_PYPY 0
141  #define CYTHON_COMPILING_IN_PYSTON 0
142  #define CYTHON_COMPILING_IN_CPYTHON 1
143  #ifndef CYTHON_USE_TYPE_SLOTS
144  #define CYTHON_USE_TYPE_SLOTS 1
145  #endif
146  #if PY_VERSION_HEX < 0x02070000
147  #undef CYTHON_USE_PYTYPE_LOOKUP
148  #define CYTHON_USE_PYTYPE_LOOKUP 0
149  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
150  #define CYTHON_USE_PYTYPE_LOOKUP 1
151  #endif
152  #if PY_MAJOR_VERSION < 3
153  #undef CYTHON_USE_ASYNC_SLOTS
154  #define CYTHON_USE_ASYNC_SLOTS 0
155  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
156  #define CYTHON_USE_ASYNC_SLOTS 1
157  #endif
158  #if PY_VERSION_HEX < 0x02070000
159  #undef CYTHON_USE_PYLONG_INTERNALS
160  #define CYTHON_USE_PYLONG_INTERNALS 0
161  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
162  #define CYTHON_USE_PYLONG_INTERNALS 1
163  #endif
164  #ifndef CYTHON_USE_PYLIST_INTERNALS
165  #define CYTHON_USE_PYLIST_INTERNALS 1
166  #endif
167  #ifndef CYTHON_USE_UNICODE_INTERNALS
168  #define CYTHON_USE_UNICODE_INTERNALS 1
169  #endif
170  #if PY_VERSION_HEX < 0x030300F0
171  #undef CYTHON_USE_UNICODE_WRITER
172  #define CYTHON_USE_UNICODE_WRITER 0
173  #elif !defined(CYTHON_USE_UNICODE_WRITER)
174  #define CYTHON_USE_UNICODE_WRITER 1
175  #endif
176  #ifndef CYTHON_AVOID_BORROWED_REFS
177  #define CYTHON_AVOID_BORROWED_REFS 0
178  #endif
179  #ifndef CYTHON_ASSUME_SAFE_MACROS
180  #define CYTHON_ASSUME_SAFE_MACROS 1
181  #endif
182  #ifndef CYTHON_UNPACK_METHODS
183  #define CYTHON_UNPACK_METHODS 1
184  #endif
185  #ifndef CYTHON_FAST_THREAD_STATE
186  #define CYTHON_FAST_THREAD_STATE 1
187  #endif
188  #ifndef CYTHON_FAST_PYCALL
189  #define CYTHON_FAST_PYCALL 1
190  #endif
191  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
192  #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
193  #endif
194  #ifndef CYTHON_USE_TP_FINALIZE
195  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
196  #endif
197  #ifndef CYTHON_USE_DICT_VERSIONS
198  #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
199  #endif
200  #ifndef CYTHON_USE_EXC_INFO_STACK
201  #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
202  #endif
203 #endif
204 #if !defined(CYTHON_FAST_PYCCALL)
205 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
206 #endif
207 #if CYTHON_USE_PYLONG_INTERNALS
208  #include "longintrepr.h"
209  #undef SHIFT
210  #undef BASE
211  #undef MASK
212  #ifdef SIZEOF_VOID_P
213  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
214  #endif
215 #endif
216 #ifndef __has_attribute
217  #define __has_attribute(x) 0
218 #endif
219 #ifndef __has_cpp_attribute
220  #define __has_cpp_attribute(x) 0
221 #endif
222 #ifndef CYTHON_RESTRICT
223  #if defined(__GNUC__)
224  #define CYTHON_RESTRICT __restrict__
225  #elif defined(_MSC_VER) && _MSC_VER >= 1400
226  #define CYTHON_RESTRICT __restrict
227  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
228  #define CYTHON_RESTRICT restrict
229  #else
230  #define CYTHON_RESTRICT
231  #endif
232 #endif
233 #ifndef CYTHON_UNUSED
234 # if defined(__GNUC__)
235 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
236 # define CYTHON_UNUSED __attribute__ ((__unused__))
237 # else
238 # define CYTHON_UNUSED
239 # endif
240 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
241 # define CYTHON_UNUSED __attribute__ ((__unused__))
242 # else
243 # define CYTHON_UNUSED
244 # endif
245 #endif
246 #ifndef CYTHON_MAYBE_UNUSED_VAR
247 # if defined(__cplusplus)
248  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
249 # else
250 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
251 # endif
252 #endif
253 #ifndef CYTHON_NCP_UNUSED
254 # if CYTHON_COMPILING_IN_CPYTHON
255 # define CYTHON_NCP_UNUSED
256 # else
257 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
258 # endif
259 #endif
260 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
261 #ifdef _MSC_VER
262  #ifndef _MSC_STDINT_H_
263  #if _MSC_VER < 1300
264  typedef unsigned char uint8_t;
265  typedef unsigned int uint32_t;
266  #else
267  typedef unsigned __int8 uint8_t;
268  typedef unsigned __int32 uint32_t;
269  #endif
270  #endif
271 #else
272  #include <stdint.h>
273 #endif
274 #ifndef CYTHON_FALLTHROUGH
275  #if defined(__cplusplus) && __cplusplus >= 201103L
276  #if __has_cpp_attribute(fallthrough)
277  #define CYTHON_FALLTHROUGH [[fallthrough]]
278  #elif __has_cpp_attribute(clang::fallthrough)
279  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
280  #elif __has_cpp_attribute(gnu::fallthrough)
281  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
282  #endif
283  #endif
284  #ifndef CYTHON_FALLTHROUGH
285  #if __has_attribute(fallthrough)
286  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
287  #else
288  #define CYTHON_FALLTHROUGH
289  #endif
290  #endif
291  #if defined(__clang__ ) && defined(__apple_build_version__)
292  #if __apple_build_version__ < 7000000
293  #undef CYTHON_FALLTHROUGH
294  #define CYTHON_FALLTHROUGH
295  #endif
296  #endif
297 #endif
298 
299 #ifndef CYTHON_INLINE
300  #if defined(__clang__)
301  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
302  #elif defined(__GNUC__)
303  #define CYTHON_INLINE __inline__
304  #elif defined(_MSC_VER)
305  #define CYTHON_INLINE __inline
306  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
307  #define CYTHON_INLINE inline
308  #else
309  #define CYTHON_INLINE
310  #endif
311 #endif
312 
313 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
314  #define Py_OptimizeFlag 0
315 #endif
316 #define __PYX_BUILD_PY_SSIZE_T "n"
317 #define CYTHON_FORMAT_SSIZE_T "z"
318 #if PY_MAJOR_VERSION < 3
319  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
320  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
321  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
322  #define __Pyx_DefaultClassType PyClass_Type
323 #else
324  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
325 #if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
326  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
327  PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
328 #else
329  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
330  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
331 #endif
332  #define __Pyx_DefaultClassType PyType_Type
333 #endif
334 #ifndef Py_TPFLAGS_CHECKTYPES
335  #define Py_TPFLAGS_CHECKTYPES 0
336 #endif
337 #ifndef Py_TPFLAGS_HAVE_INDEX
338  #define Py_TPFLAGS_HAVE_INDEX 0
339 #endif
340 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
341  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
342 #endif
343 #ifndef Py_TPFLAGS_HAVE_FINALIZE
344  #define Py_TPFLAGS_HAVE_FINALIZE 0
345 #endif
346 #ifndef METH_STACKLESS
347  #define METH_STACKLESS 0
348 #endif
349 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
350  #ifndef METH_FASTCALL
351  #define METH_FASTCALL 0x80
352  #endif
353  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
354  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
355  Py_ssize_t nargs, PyObject *kwnames);
356 #else
357  #define __Pyx_PyCFunctionFast _PyCFunctionFast
358  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
359 #endif
360 #if CYTHON_FAST_PYCCALL
361 #define __Pyx_PyFastCFunction_Check(func)\
362  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
363 #else
364 #define __Pyx_PyFastCFunction_Check(func) 0
365 #endif
366 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
367  #define PyObject_Malloc(s) PyMem_Malloc(s)
368  #define PyObject_Free(p) PyMem_Free(p)
369  #define PyObject_Realloc(p) PyMem_Realloc(p)
370 #endif
371 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
372  #define PyMem_RawMalloc(n) PyMem_Malloc(n)
373  #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
374  #define PyMem_RawFree(p) PyMem_Free(p)
375 #endif
376 #if CYTHON_COMPILING_IN_PYSTON
377  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
378  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
379 #else
380  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
381  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
382 #endif
383 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
384  #define __Pyx_PyThreadState_Current PyThreadState_GET()
385 #elif PY_VERSION_HEX >= 0x03060000
386  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
387 #elif PY_VERSION_HEX >= 0x03000000
388  #define __Pyx_PyThreadState_Current PyThreadState_GET()
389 #else
390  #define __Pyx_PyThreadState_Current _PyThreadState_Current
391 #endif
392 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
393 #include "pythread.h"
394 #define Py_tss_NEEDS_INIT 0
395 typedef int Py_tss_t;
396 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
397  *key = PyThread_create_key();
398  return 0;
399 }
400 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
401  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
402  *key = Py_tss_NEEDS_INIT;
403  return key;
404 }
405 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
406  PyObject_Free(key);
407 }
408 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
409  return *key != Py_tss_NEEDS_INIT;
410 }
411 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
412  PyThread_delete_key(*key);
413  *key = Py_tss_NEEDS_INIT;
414 }
415 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
416  return PyThread_set_key_value(*key, value);
417 }
418 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
419  return PyThread_get_key_value(*key);
420 }
421 #endif
422 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
423 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
424 #else
425 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
426 #endif
427 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
428  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
429  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
430 #else
431  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
432  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
433 #endif
434 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
435 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
436 #else
437 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
438 #endif
439 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
440  #define CYTHON_PEP393_ENABLED 1
441  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
442  0 : _PyUnicode_Ready((PyObject *)(op)))
443  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
444  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
445  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
446  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
447  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
448  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
449  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
450  #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
451  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
452  #else
453  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
454  #endif
455 #else
456  #define CYTHON_PEP393_ENABLED 0
457  #define PyUnicode_1BYTE_KIND 1
458  #define PyUnicode_2BYTE_KIND 2
459  #define PyUnicode_4BYTE_KIND 4
460  #define __Pyx_PyUnicode_READY(op) (0)
461  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
462  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
463  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
464  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
465  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
466  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
467  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
468  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
469 #endif
470 #if CYTHON_COMPILING_IN_PYPY
471  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
472  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
473 #else
474  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
475  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
476  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
477 #endif
478 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
479  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
480 #endif
481 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
482  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
483 #endif
484 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
485  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
486 #endif
487 #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))
488 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
489 #if PY_MAJOR_VERSION >= 3
490  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
491 #else
492  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
493 #endif
494 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
495  #define PyObject_ASCII(o) PyObject_Repr(o)
496 #endif
497 #if PY_MAJOR_VERSION >= 3
498  #define PyBaseString_Type PyUnicode_Type
499  #define PyStringObject PyUnicodeObject
500  #define PyString_Type PyUnicode_Type
501  #define PyString_Check PyUnicode_Check
502  #define PyString_CheckExact PyUnicode_CheckExact
503 #ifndef PyObject_Unicode
504  #define PyObject_Unicode PyObject_Str
505 #endif
506 #endif
507 #if PY_MAJOR_VERSION >= 3
508  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
509  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
510 #else
511  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
512  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
513 #endif
514 #ifndef PySet_CheckExact
515  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
516 #endif
517 #if PY_VERSION_HEX >= 0x030900A4
518  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
519  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
520 #else
521  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
522  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
523 #endif
524 #if CYTHON_ASSUME_SAFE_MACROS
525  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
526 #else
527  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
528 #endif
529 #if PY_MAJOR_VERSION >= 3
530  #define PyIntObject PyLongObject
531  #define PyInt_Type PyLong_Type
532  #define PyInt_Check(op) PyLong_Check(op)
533  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
534  #define PyInt_FromString PyLong_FromString
535  #define PyInt_FromUnicode PyLong_FromUnicode
536  #define PyInt_FromLong PyLong_FromLong
537  #define PyInt_FromSize_t PyLong_FromSize_t
538  #define PyInt_FromSsize_t PyLong_FromSsize_t
539  #define PyInt_AsLong PyLong_AsLong
540  #define PyInt_AS_LONG PyLong_AS_LONG
541  #define PyInt_AsSsize_t PyLong_AsSsize_t
542  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
543  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
544  #define PyNumber_Int PyNumber_Long
545 #endif
546 #if PY_MAJOR_VERSION >= 3
547  #define PyBoolObject PyLongObject
548 #endif
549 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
550  #ifndef PyUnicode_InternFromString
551  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
552  #endif
553 #endif
554 #if PY_VERSION_HEX < 0x030200A4
555  typedef long Py_hash_t;
556  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
557  #define __Pyx_PyInt_AsHash_t PyInt_AsLong
558 #else
559  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
560  #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
561 #endif
562 #if PY_MAJOR_VERSION >= 3
563  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
564 #else
565  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
566 #endif
567 #if CYTHON_USE_ASYNC_SLOTS
568  #if PY_VERSION_HEX >= 0x030500B1
569  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
570  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
571  #else
572  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
573  #endif
574 #else
575  #define __Pyx_PyType_AsAsync(obj) NULL
576 #endif
577 #ifndef __Pyx_PyAsyncMethodsStruct
578  typedef struct {
579  unaryfunc am_await;
580  unaryfunc am_aiter;
581  unaryfunc am_anext;
582  } __Pyx_PyAsyncMethodsStruct;
583 #endif
584 
585 #if defined(WIN32) || defined(MS_WINDOWS)
586  #define _USE_MATH_DEFINES
587 #endif
588 #include <math.h>
589 #ifdef NAN
590 #define __PYX_NAN() ((float) NAN)
591 #else
592 static CYTHON_INLINE float __PYX_NAN() {
593  float value;
594  memset(&value, 0xFF, sizeof(value));
595  return value;
596 }
597 #endif
598 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
599 #define __Pyx_truncl trunc
600 #else
601 #define __Pyx_truncl truncl
602 #endif
603 
604 #define __PYX_MARK_ERR_POS(f_index, lineno) \
605  { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
606 #define __PYX_ERR(f_index, lineno, Ln_error) \
607  { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
608 
609 #ifndef __PYX_EXTERN_C
610  #ifdef __cplusplus
611  #define __PYX_EXTERN_C extern "C"
612  #else
613  #define __PYX_EXTERN_C extern
614  #endif
615 #endif
616 
617 #define __PYX_HAVE__dtocean
618 #define __PYX_HAVE_API__dtocean
619 /* Early includes */
620 #ifdef _OPENMP
621 #include <omp.h>
622 #endif /* _OPENMP */
623 
624 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
625 #define CYTHON_WITHOUT_ASSERTIONS
626 #endif
627 
628 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
629  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
630 
631 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
632 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
633 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
634 #define __PYX_DEFAULT_STRING_ENCODING ""
635 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
636 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
637 #define __Pyx_uchar_cast(c) ((unsigned char)c)
638 #define __Pyx_long_cast(x) ((long)x)
639 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
640  (sizeof(type) < sizeof(Py_ssize_t)) ||\
641  (sizeof(type) > sizeof(Py_ssize_t) &&\
642  likely(v < (type)PY_SSIZE_T_MAX ||\
643  v == (type)PY_SSIZE_T_MAX) &&\
644  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
645  v == (type)PY_SSIZE_T_MIN))) ||\
646  (sizeof(type) == sizeof(Py_ssize_t) &&\
647  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
648  v == (type)PY_SSIZE_T_MAX))) )
649 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
650  return (size_t) i < (size_t) limit;
651 }
652 #if defined (__cplusplus) && __cplusplus >= 201103L
653  #include <cstdlib>
654  #define __Pyx_sst_abs(value) std::abs(value)
655 #elif SIZEOF_INT >= SIZEOF_SIZE_T
656  #define __Pyx_sst_abs(value) abs(value)
657 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
658  #define __Pyx_sst_abs(value) labs(value)
659 #elif defined (_MSC_VER)
660  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
661 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
662  #define __Pyx_sst_abs(value) llabs(value)
663 #elif defined (__GNUC__)
664  #define __Pyx_sst_abs(value) __builtin_llabs(value)
665 #else
666  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
667 #endif
668 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
669 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
670 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
671 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
672 #define __Pyx_PyBytes_FromString PyBytes_FromString
673 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
674 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
675 #if PY_MAJOR_VERSION < 3
676  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
677  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
678 #else
679  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
680  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
681 #endif
682 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
683 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
684 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
685 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
686 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
687 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
688 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
689 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
690 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
691 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
692 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
693 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
694 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
695 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
696 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
697 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
698 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
699  const Py_UNICODE *u_end = u;
700  while (*u_end++) ;
701  return (size_t)(u_end - u - 1);
702 }
703 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
704 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
705 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
706 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
707 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
708 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
709 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
710 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
711 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
712 #define __Pyx_PySequence_Tuple(obj)\
713  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
714 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
715 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
716 #if CYTHON_ASSUME_SAFE_MACROS
717 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
718 #else
719 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
720 #endif
721 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
722 #if PY_MAJOR_VERSION >= 3
723 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
724 #else
725 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
726 #endif
727 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
728 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
729 static int __Pyx_sys_getdefaultencoding_not_ascii;
730 static int __Pyx_init_sys_getdefaultencoding_params(void) {
731  PyObject* sys;
732  PyObject* default_encoding = NULL;
733  PyObject* ascii_chars_u = NULL;
734  PyObject* ascii_chars_b = NULL;
735  const char* default_encoding_c;
736  sys = PyImport_ImportModule("sys");
737  if (!sys) goto bad;
738  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
739  Py_DECREF(sys);
740  if (!default_encoding) goto bad;
741  default_encoding_c = PyBytes_AsString(default_encoding);
742  if (!default_encoding_c) goto bad;
743  if (strcmp(default_encoding_c, "ascii") == 0) {
744  __Pyx_sys_getdefaultencoding_not_ascii = 0;
745  } else {
746  char ascii_chars[128];
747  int c;
748  for (c = 0; c < 128; c++) {
749  ascii_chars[c] = c;
750  }
751  __Pyx_sys_getdefaultencoding_not_ascii = 1;
752  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
753  if (!ascii_chars_u) goto bad;
754  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
755  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
756  PyErr_Format(
757  PyExc_ValueError,
758  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
759  default_encoding_c);
760  goto bad;
761  }
762  Py_DECREF(ascii_chars_u);
763  Py_DECREF(ascii_chars_b);
764  }
765  Py_DECREF(default_encoding);
766  return 0;
767 bad:
768  Py_XDECREF(default_encoding);
769  Py_XDECREF(ascii_chars_u);
770  Py_XDECREF(ascii_chars_b);
771  return -1;
772 }
773 #endif
774 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
775 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
776 #else
777 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
778 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
779 static char* __PYX_DEFAULT_STRING_ENCODING;
780 static int __Pyx_init_sys_getdefaultencoding_params(void) {
781  PyObject* sys;
782  PyObject* default_encoding = NULL;
783  char* default_encoding_c;
784  sys = PyImport_ImportModule("sys");
785  if (!sys) goto bad;
786  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
787  Py_DECREF(sys);
788  if (!default_encoding) goto bad;
789  default_encoding_c = PyBytes_AsString(default_encoding);
790  if (!default_encoding_c) goto bad;
791  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
792  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
793  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
794  Py_DECREF(default_encoding);
795  return 0;
796 bad:
797  Py_XDECREF(default_encoding);
798  return -1;
799 }
800 #endif
801 #endif
802 
803 
804 /* Test for GCC > 2.95 */
805 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
806  #define likely(x) __builtin_expect(!!(x), 1)
807  #define unlikely(x) __builtin_expect(!!(x), 0)
808 #else /* !__GNUC__ or GCC < 2.95 */
809  #define likely(x) (x)
810  #define unlikely(x) (x)
811 #endif /* __GNUC__ */
812 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
813 
814 static PyObject *__pyx_m = NULL;
815 static PyObject *__pyx_d;
816 static PyObject *__pyx_b;
817 static PyObject *__pyx_cython_runtime = NULL;
818 static PyObject *__pyx_empty_tuple;
819 static PyObject *__pyx_empty_bytes;
820 static PyObject *__pyx_empty_unicode;
821 static int __pyx_lineno;
822 static int __pyx_clineno = 0;
823 static const char * __pyx_cfilenm= __FILE__;
824 static const char *__pyx_filename;
825 
826 
827 static const char *__pyx_f[] = {
828  "dtocean.pyx",
829 };
830 
831 /*--- Type declarations ---*/
832 
833 /* --- Runtime support code (head) --- */
834 /* Refnanny.proto */
835 #ifndef CYTHON_REFNANNY
836  #define CYTHON_REFNANNY 0
837 #endif
838 #if CYTHON_REFNANNY
839  typedef struct {
840  void (*INCREF)(void*, PyObject*, int);
841  void (*DECREF)(void*, PyObject*, int);
842  void (*GOTREF)(void*, PyObject*, int);
843  void (*GIVEREF)(void*, PyObject*, int);
844  void* (*SetupContext)(const char*, int, const char*);
845  void (*FinishContext)(void**);
846  } __Pyx_RefNannyAPIStruct;
847  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
848  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
849  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
850 #ifdef WITH_THREAD
851  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
852  if (acquire_gil) {\
853  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
854  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
855  PyGILState_Release(__pyx_gilstate_save);\
856  } else {\
857  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
858  }
859 #else
860  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
861  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
862 #endif
863  #define __Pyx_RefNannyFinishContext()\
864  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
865  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
866  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
867  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
868  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
869  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
870  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
871  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
872  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
873 #else
874  #define __Pyx_RefNannyDeclarations
875  #define __Pyx_RefNannySetupContext(name, acquire_gil)
876  #define __Pyx_RefNannyFinishContext()
877  #define __Pyx_INCREF(r) Py_INCREF(r)
878  #define __Pyx_DECREF(r) Py_DECREF(r)
879  #define __Pyx_GOTREF(r)
880  #define __Pyx_GIVEREF(r)
881  #define __Pyx_XINCREF(r) Py_XINCREF(r)
882  #define __Pyx_XDECREF(r) Py_XDECREF(r)
883  #define __Pyx_XGOTREF(r)
884  #define __Pyx_XGIVEREF(r)
885 #endif
886 #define __Pyx_XDECREF_SET(r, v) do {\
887  PyObject *tmp = (PyObject *) r;\
888  r = v; __Pyx_XDECREF(tmp);\
889  } while (0)
890 #define __Pyx_DECREF_SET(r, v) do {\
891  PyObject *tmp = (PyObject *) r;\
892  r = v; __Pyx_DECREF(tmp);\
893  } while (0)
894 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
895 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
896 
897 /* PyObjectGetAttrStr.proto */
898 #if CYTHON_USE_TYPE_SLOTS
899 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
900 #else
901 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
902 #endif
903 
904 /* GetBuiltinName.proto */
905 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
906 
907 /* RaiseArgTupleInvalid.proto */
908 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
909  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
910 
911 /* RaiseDoubleKeywords.proto */
912 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
913 
914 /* ParseKeywords.proto */
915 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
916  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
917  const char* function_name);
918 
919 /* PyCFunctionFastCall.proto */
920 #if CYTHON_FAST_PYCCALL
921 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
922 #else
923 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
924 #endif
925 
926 /* PyFunctionFastCall.proto */
927 #if CYTHON_FAST_PYCALL
928 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
929  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
930 #if 1 || PY_VERSION_HEX < 0x030600B1
931 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
932 #else
933 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
934 #endif
935 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
936  (sizeof(char [1 - 2*!(cond)]) - 1)
937 #ifndef Py_MEMBER_SIZE
938 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
939 #endif
940  static size_t __pyx_pyframe_localsplus_offset = 0;
941  #include "frameobject.h"
942  #define __Pxy_PyFrame_Initialize_Offsets()\
943  ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
944  (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
945  #define __Pyx_PyFrame_GetLocalsplus(frame)\
946  (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
947 #endif
948 
949 /* PyObjectCall.proto */
950 #if CYTHON_COMPILING_IN_CPYTHON
951 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
952 #else
953 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
954 #endif
955 
956 /* PyObjectCallMethO.proto */
957 #if CYTHON_COMPILING_IN_CPYTHON
958 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
959 #endif
960 
961 /* PyObjectCallOneArg.proto */
962 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
963 
964 /* PyDictVersioning.proto */
965 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
966 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
967 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
968 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
969  (version_var) = __PYX_GET_DICT_VERSION(dict);\
970  (cache_var) = (value);
971 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
972  static PY_UINT64_T __pyx_dict_version = 0;\
973  static PyObject *__pyx_dict_cached_value = NULL;\
974  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
975  (VAR) = __pyx_dict_cached_value;\
976  } else {\
977  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
978  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
979  }\
980 }
981 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
982 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
983 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
984 #else
985 #define __PYX_GET_DICT_VERSION(dict) (0)
986 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
987 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
988 #endif
989 
990 /* GetModuleGlobalName.proto */
991 #if CYTHON_USE_DICT_VERSIONS
992 #define __Pyx_GetModuleGlobalName(var, name) {\
993  static PY_UINT64_T __pyx_dict_version = 0;\
994  static PyObject *__pyx_dict_cached_value = NULL;\
995  (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
996  (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
997  __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
998 }
999 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
1000  PY_UINT64_T __pyx_dict_version;\
1001  PyObject *__pyx_dict_cached_value;\
1002  (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1003 }
1004 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1005 #else
1006 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1007 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1008 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1009 #endif
1010 
1011 /* PyObjectCall2Args.proto */
1012 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1013 
1014 /* PyObjectSetAttrStr.proto */
1015 #if CYTHON_USE_TYPE_SLOTS
1016 #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
1017 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
1018 #else
1019 #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n)
1020 #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
1021 #endif
1022 
1023 /* DictGetItem.proto */
1024 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
1025 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
1026 #define __Pyx_PyObject_Dict_GetItem(obj, name)\
1027  (likely(PyDict_CheckExact(obj)) ?\
1028  __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
1029 #else
1030 #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
1031 #define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name)
1032 #endif
1033 
1034 /* GetItemInt.proto */
1035 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1036  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1037  __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
1038  (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
1039  __Pyx_GetItemInt_Generic(o, to_py_func(i))))
1040 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1041  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1042  __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1043  (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1044 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
1045  int wraparound, int boundscheck);
1046 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1047  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1048  __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1049  (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
1050 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
1051  int wraparound, int boundscheck);
1052 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
1053 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
1054  int is_list, int wraparound, int boundscheck);
1055 
1056 /* ObjectGetItem.proto */
1057 #if CYTHON_USE_TYPE_SLOTS
1058 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
1059 #else
1060 #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
1061 #endif
1062 
1063 /* GetTopmostException.proto */
1064 #if CYTHON_USE_EXC_INFO_STACK
1065 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1066 #endif
1067 
1068 /* PyThreadStateGet.proto */
1069 #if CYTHON_FAST_THREAD_STATE
1070 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1071 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1072 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1073 #else
1074 #define __Pyx_PyThreadState_declare
1075 #define __Pyx_PyThreadState_assign
1076 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1077 #endif
1078 
1079 /* SaveResetException.proto */
1080 #if CYTHON_FAST_THREAD_STATE
1081 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1082 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1083 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1084 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1085 #else
1086 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1087 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1088 #endif
1089 
1090 /* PyErrExceptionMatches.proto */
1091 #if CYTHON_FAST_THREAD_STATE
1092 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1093 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1094 #else
1095 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1096 #endif
1097 
1098 /* GetException.proto */
1099 #if CYTHON_FAST_THREAD_STATE
1100 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1101 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1102 #else
1103 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1104 #endif
1105 
1106 /* PyObjectCallNoArg.proto */
1107 #if CYTHON_COMPILING_IN_CPYTHON
1108 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1109 #else
1110 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1111 #endif
1112 
1113 /* PyErrFetchRestore.proto */
1114 #if CYTHON_FAST_THREAD_STATE
1115 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1116 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1117 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1118 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1119 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1120 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1121 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1122 #if CYTHON_COMPILING_IN_CPYTHON
1123 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1124 #else
1125 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1126 #endif
1127 #else
1128 #define __Pyx_PyErr_Clear() PyErr_Clear()
1129 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1130 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1131 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1132 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1133 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1134 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1135 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1136 #endif
1137 
1138 /* SwapException.proto */
1139 #if CYTHON_FAST_THREAD_STATE
1140 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1141 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1142 #else
1143 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1144 #endif
1145 
1146 /* PyIntBinop.proto */
1147 #if !CYTHON_COMPILING_IN_PYPY
1148 static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1149 #else
1150 #define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\
1151  (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
1152 #endif
1153 
1154 /* PyIntBinop.proto */
1155 #if !CYTHON_COMPILING_IN_PYPY
1156 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1157 #else
1158 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
1159  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1160 #endif
1161 
1162 /* None.proto */
1163 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
1164 
1165 /* PyFloatBinop.proto */
1166 #if !CYTHON_COMPILING_IN_PYPY
1167 static PyObject* __Pyx_PyFloat_AddObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
1168 #else
1169 #define __Pyx_PyFloat_AddObjC(op1, op2, floatval, inplace, zerodivision_check)\
1170  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1171 #endif
1172 
1173 /* SliceObject.proto */
1174 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
1175  PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
1176  PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
1177  int has_cstart, int has_cstop, int wraparound);
1178 
1179 /* PyFloatBinop.proto */
1180 #if !CYTHON_COMPILING_IN_PYPY
1181 static PyObject* __Pyx_PyFloat_SubtractCObj(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
1182 #else
1183 #define __Pyx_PyFloat_SubtractCObj(op1, op2, floatval, inplace, zerodivision_check)\
1184  (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
1185 #endif
1186 
1187 /* RaiseTooManyValuesToUnpack.proto */
1188 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
1189 
1190 /* RaiseNeedMoreValuesToUnpack.proto */
1191 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
1192 
1193 /* IterFinish.proto */
1194 static CYTHON_INLINE int __Pyx_IterFinish(void);
1195 
1196 /* UnpackItemEndCheck.proto */
1197 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
1198 
1199 /* Import.proto */
1200 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1201 
1202 /* ImportFrom.proto */
1203 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
1204 
1205 /* PyFloatBinop.proto */
1206 #if !CYTHON_COMPILING_IN_PYPY
1207 static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
1208 #else
1209 #define __Pyx_PyFloat_TrueDivideObjC(op1, op2, floatval, inplace, zerodivision_check)\
1210  (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2))
1211 #endif
1212 
1213 /* CalculateMetaclass.proto */
1214 static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
1215 
1216 /* FetchCommonType.proto */
1217 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1218 
1219 /* CythonFunctionShared.proto */
1220 #define __Pyx_CyFunction_USED 1
1221 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01
1222 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
1223 #define __Pyx_CYFUNCTION_CCLASS 0x04
1224 #define __Pyx_CyFunction_GetClosure(f)\
1225  (((__pyx_CyFunctionObject *) (f))->func_closure)
1226 #define __Pyx_CyFunction_GetClassObj(f)\
1227  (((__pyx_CyFunctionObject *) (f))->func_classobj)
1228 #define __Pyx_CyFunction_Defaults(type, f)\
1229  ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
1230 #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
1231  ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
1232 typedef struct {
1233  PyCFunctionObject func;
1234 #if PY_VERSION_HEX < 0x030500A0
1235  PyObject *func_weakreflist;
1236 #endif
1237  PyObject *func_dict;
1238  PyObject *func_name;
1239  PyObject *func_qualname;
1240  PyObject *func_doc;
1241  PyObject *func_globals;
1242  PyObject *func_code;
1243  PyObject *func_closure;
1244  PyObject *func_classobj;
1245  void *defaults;
1246  int defaults_pyobjects;
1247  size_t defaults_size; // used by FusedFunction for copying defaults
1248  int flags;
1249  PyObject *defaults_tuple;
1250  PyObject *defaults_kwdict;
1251  PyObject *(*defaults_getter)(PyObject *);
1252  PyObject *func_annotations;
1253 } __pyx_CyFunctionObject;
1254 static PyTypeObject *__pyx_CyFunctionType = 0;
1255 #define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
1256 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
1257  int flags, PyObject* qualname,
1258  PyObject *self,
1259  PyObject *module, PyObject *globals,
1260  PyObject* code);
1261 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
1262  size_t size,
1263  int pyobjects);
1264 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
1265  PyObject *tuple);
1266 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
1267  PyObject *dict);
1268 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
1269  PyObject *dict);
1270 static int __pyx_CyFunction_init(void);
1271 
1272 /* CythonFunction.proto */
1273 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
1274  int flags, PyObject* qualname,
1275  PyObject *closure,
1276  PyObject *module, PyObject *globals,
1277  PyObject* code);
1278 
1279 /* SetNameInClass.proto */
1280 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
1281 #define __Pyx_SetNameInClass(ns, name, value)\
1282  (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
1283 #elif CYTHON_COMPILING_IN_CPYTHON
1284 #define __Pyx_SetNameInClass(ns, name, value)\
1285  (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
1286 #else
1287 #define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value)
1288 #endif
1289 
1290 /* Py3ClassCreate.proto */
1291 static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
1292  PyObject *mkw, PyObject *modname, PyObject *doc);
1293 static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
1294  PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
1295 
1296 /* IncludeStringH.proto */
1297 #include <string.h>
1298 
1299 /* BytesEquals.proto */
1300 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1301 
1302 /* UnicodeEquals.proto */
1303 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1304 
1305 /* CLineInTraceback.proto */
1306 #ifdef CYTHON_CLINE_IN_TRACEBACK
1307 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1308 #else
1309 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1310 #endif
1311 
1312 /* CodeObjectCache.proto */
1313 typedef struct {
1314  PyCodeObject* code_object;
1315  int code_line;
1316 } __Pyx_CodeObjectCacheEntry;
1317 struct __Pyx_CodeObjectCache {
1318  int count;
1319  int max_count;
1320  __Pyx_CodeObjectCacheEntry* entries;
1321 };
1322 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1323 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1324 static PyCodeObject *__pyx_find_code_object(int code_line);
1325 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1326 
1327 /* AddTraceback.proto */
1328 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1329  int py_line, const char *filename);
1330 
1331 /* CIntToPy.proto */
1332 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1333 
1334 /* CIntFromPy.proto */
1335 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1336 
1337 /* CIntFromPy.proto */
1338 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1339 
1340 /* FastTypeChecks.proto */
1341 #if CYTHON_COMPILING_IN_CPYTHON
1342 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1343 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1344 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1345 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1346 #else
1347 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1348 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1349 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1350 #endif
1351 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1352 
1353 /* CStringEquals.proto */
1354 static CYTHON_INLINE int __Pyx_StrEq(const char *, const char *);
1355 
1356 /* CheckBinaryVersion.proto */
1357 static int __Pyx_check_binary_version(void);
1358 
1359 /* InitStrings.proto */
1360 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1361 
1362 
1363 /* Module declarations from 'dtocean' */
1364 #define __Pyx_MODULE_NAME "dtocean"
1365 extern int __pyx_module_is_main_dtocean;
1366 int __pyx_module_is_main_dtocean = 0;
1367 
1368 /* Implementation of 'dtocean' */
1369 static PyObject *__pyx_builtin_object;
1370 static PyObject *__pyx_builtin_print;
1371 static PyObject *__pyx_builtin_range;
1372 static const char __pyx_k_b[] = "b";
1373 static const char __pyx_k_c[] = "c";
1374 static const char __pyx_k_g[] = "g";
1375 static const char __pyx_k_i[] = "-i";
1376 static const char __pyx_k_k[] = "k";
1377 static const char __pyx_k_l[] = "-l";
1378 static const char __pyx_k_m[] = "-m";
1379 static const char __pyx_k_o[] = "o";
1380 static const char __pyx_k_p[] = "-p";
1381 static const char __pyx_k_r[] = "r";
1382 static const char __pyx_k_s[] = "s";
1383 static const char __pyx_k_w[] = "w";
1384 static const char __pyx_k_x[] = "x";
1385 static const char __pyx_k_y[] = "y";
1386 static const char __pyx_k_z[] = "z";
1387 static const char __pyx_k_3d[] = "3d";
1388 static const char __pyx_k__8[] = ".";
1389 static const char __pyx_k_ax[] = "ax";
1390 static const char __pyx_k_ds[] = "ds";
1391 static const char __pyx_k_im[] = "im";
1392 static const char __pyx_k_ix[] = "ix";
1393 static const char __pyx_k_iy[] = "iy";
1394 static const char __pyx_k_lb[] = "lb";
1395 static const char __pyx_k_ls[] = "ls";
1396 static const char __pyx_k_np[] = "np";
1397 static const char __pyx_k_os[] = "os";
1398 static const char __pyx_k_pi[] = "pi";
1399 static const char __pyx_k_ts[] = "ts";
1400 static const char __pyx_k_wl[] = "wl";
1401 static const char __pyx_k_ws[] = "ws";
1402 static const char __pyx_k_xb[] = "xb";
1403 static const char __pyx_k_xm[] = "xm";
1404 static const char __pyx_k_xp[] = "xp";
1405 static const char __pyx_k_xr[] = "xr";
1406 static const char __pyx_k_xs[] = "xs";
1407 static const char __pyx_k_yb[] = "yb";
1408 static const char __pyx_k_ym[] = "ym";
1409 static const char __pyx_k_yp[] = "yp";
1410 static const char __pyx_k_ys[] = "ys";
1411 static const char __pyx_k_zb[] = "zb";
1412 static const char __pyx_k_zm[] = "zm";
1413 static const char __pyx_k_zp[] = "zp";
1414 static const char __pyx_k_zs[] = "zs";
1415 static const char __pyx_k_D2R[] = "D2R";
1416 static const char __pyx_k_NWL[] = "NWL";
1417 static const char __pyx_k_NWS[] = "NWS";
1418 static const char __pyx_k_PHC[] = "PHC";
1419 static const char __pyx_k__30[] = "";
1420 static const char __pyx_k__32[] = "*";
1421 static const char __pyx_k_aot[] = "aot";
1422 static const char __pyx_k_big[] = "big";
1423 static const char __pyx_k_cld[] = "cld";
1424 static const char __pyx_k_clf[] = "clf";
1425 static const char __pyx_k_col[] = "col";
1426 static const char __pyx_k_cos[] = "cos";
1427 static const char __pyx_k_doc[] = "__doc__";
1428 static const char __pyx_k_dot[] = "dot";
1429 static const char __pyx_k_dto[] = "dto";
1430 static const char __pyx_k_end[] = "end";
1431 static const char __pyx_k_err[] = "err";
1432 static const char __pyx_k_fig[] = "fig";
1433 static const char __pyx_k_fmf[] = "fmf";
1434 static const char __pyx_k_i_2[] = "i";
1435 static const char __pyx_k_ibm[] = "ibm";
1436 static const char __pyx_k_iph[] = "iph";
1437 static const char __pyx_k_ism[] = "ism";
1438 static const char __pyx_k_isz[] = "isz";
1439 static const char __pyx_k_ith[] = "ith";
1440 static const char __pyx_k_iwl[] = "iwl";
1441 static const char __pyx_k_iwn[] = "iwn";
1442 static const char __pyx_k_lat[] = "lat";
1443 static const char __pyx_k_loc[] = "loc";
1444 static const char __pyx_k_lon[] = "lon";
1445 static const char __pyx_k_lut[] = "--lut";
1446 static const char __pyx_k_max[] = "max";
1447 static const char __pyx_k_min[] = "min";
1448 static const char __pyx_k_num[] = "num";
1449 static const char __pyx_k_o_2[] = "-o";
1450 static const char __pyx_k_plt[] = "plt";
1451 static const char __pyx_k_pts[] = "pts";
1452 static const char __pyx_k_raa[] = "raa";
1453 static const char __pyx_k_rfl[] = "rfl";
1454 static const char __pyx_k_row[] = "row";
1455 static const char __pyx_k_rsd[] = "rsd";
1456 static const char __pyx_k_sb2[] = "sb2";
1457 static const char __pyx_k_sse[] = "sse";
1458 static const char __pyx_k_sys[] = "sys";
1459 static const char __pyx_k_sza[] = "sza";
1460 static const char __pyx_k_vin[] = "vin";
1461 static const char __pyx_k_vza[] = "vza";
1462 static const char __pyx_k_wnd[] = "wnd";
1463 static const char __pyx_k_xin[] = "xin";
1464 static const char __pyx_k_xit[] = "xit";
1465 static const char __pyx_k_Done[] = " Done!";
1466 static const char __pyx_k_NAOT[] = "NAOT";
1467 static const char __pyx_k_NBIG[] = "NBIG";
1468 static const char __pyx_k_NRAA[] = "NRAA";
1469 static const char __pyx_k_NSZA[] = "NSZA";
1470 static const char __pyx_k_NVZA[] = "NVZA";
1471 static const char __pyx_k_THET[] = "THET";
1472 static const char __pyx_k_W124[] = "W124";
1473 static const char __pyx_k_W164[] = "W164";
1474 static const char __pyx_k_W213[] = "W213";
1475 static const char __pyx_k_W470[] = "W470";
1476 static const char __pyx_k_W550[] = "W550";
1477 static const char __pyx_k_W659[] = "W659";
1478 static const char __pyx_k_W860[] = "W860";
1479 static const char __pyx_k_WAVE[] = "WAVE";
1480 static const char __pyx_k_args[] = "args";
1481 static const char __pyx_k_axis[] = "axis";
1482 static const char __pyx_k_clip[] = "clip";
1483 static const char __pyx_k_dims[] = "dims";
1484 static const char __pyx_k_exit[] = "exit";
1485 static const char __pyx_k_grid[] = "grid";
1486 static const char __pyx_k_help[] = "help";
1487 static const char __pyx_k_init[] = "__init__";
1488 static const char __pyx_k_inst[] = "inst";
1489 static const char __pyx_k_itau[] = "itau";
1490 static const char __pyx_k_main[] = "__main__";
1491 static const char __pyx_k_math[] = "math";
1492 static const char __pyx_k_mode[] = "mode";
1493 static const char __pyx_k_mrfl[] = "mrfl";
1494 static const char __pyx_k_name[] = "name";
1495 static const char __pyx_k_plot[] = "plot";
1496 static const char __pyx_k_rayl[] = "rayl";
1497 static const char __pyx_k_rbsb[] = "rbsb";
1498 static const char __pyx_k_self[] = "self";
1499 static const char __pyx_k_show[] = "show";
1500 static const char __pyx_k_shpb[] = "shpb";
1501 static const char __pyx_k_shps[] = "shps";
1502 static const char __pyx_k_taub[] = "taub";
1503 static const char __pyx_k_taus[] = "taus";
1504 static const char __pyx_k_test[] = "__test__";
1505 static const char __pyx_k_toab[] = "toab";
1506 static const char __pyx_k_toar[] = "toar";
1507 static const char __pyx_k_toas[] = "toas";
1508 static const char __pyx_k_tstr[] = "tstr";
1509 static const char __pyx_k_type[] = "type";
1510 static const char __pyx_k_vout[] = "vout";
1511 static const char __pyx_k_xdim[] = "xdim";
1512 static const char __pyx_k_ydim[] = "ydim";
1513 static const char __pyx_k_yout[] = "yout";
1514 static const char __pyx_k_AINTB[] = "AINTB";
1515 static const char __pyx_k_AINTS[] = "AINTS";
1516 static const char __pyx_k_TAUAB[] = "TAUAB";
1517 static const char __pyx_k_TAUAS[] = "TAUAS";
1518 static const char __pyx_k_THET0[] = "THET0";
1519 static const char __pyx_k_array[] = "array";
1520 static const char __pyx_k_color[] = "color";
1521 static const char __pyx_k_denom[] = "denom";
1522 static const char __pyx_k_group[] = "group";
1523 static const char __pyx_k_ifile[] = "ifile";
1524 static const char __pyx_k_input[] = "input";
1525 static const char __pyx_k_label[] = "label";
1526 static const char __pyx_k_lut_2[] = "lut";
1527 static const char __pyx_k_mrflb[] = "mrflb";
1528 static const char __pyx_k_mrflr[] = "mrflr";
1529 static const char __pyx_k_mrfls[] = "mrfls";
1530 static const char __pyx_k_numpy[] = "numpy";
1531 static const char __pyx_k_ofile[] = "ofile";
1532 static const char __pyx_k_print[] = "print";
1533 static const char __pyx_k_r_pts[] = "r_pts";
1534 static const char __pyx_k_range[] = "range";
1535 static const char __pyx_k_rbdif[] = "rbdif";
1536 static const char __pyx_k_sbdif[] = "sbdif";
1537 static const char __pyx_k_shape[] = "shape";
1538 static const char __pyx_k_small[] = "small";
1539 static const char __pyx_k_stack[] = "stack";
1540 static const char __pyx_k_tauxb[] = "tauxb";
1541 static const char __pyx_k_tauxs[] = "tauxs";
1542 static const char __pyx_k_tblut[] = "tblut";
1543 static const char __pyx_k_title[] = "title";
1544 static const char __pyx_k_toabt[] = "toabt";
1545 static const char __pyx_k_toast[] = "toast";
1546 static const char __pyx_k_trflb[] = "trflb";
1547 static const char __pyx_k_trfls[] = "trfls";
1548 static const char __pyx_k_tslut[] = "tslut";
1549 static const char __pyx_k_units[] = "units";
1550 static const char __pyx_k_write[] = "write";
1551 static const char __pyx_k_zeros[] = "zeros";
1552 static const char __pyx_k_Axes3D[] = "Axes3D";
1553 static const char __pyx_k_NSMALL[] = "NSMALL";
1554 static const char __pyx_k_append[] = "append";
1555 static const char __pyx_k_arange[] = "arange";
1556 static const char __pyx_k_argmin[] = "argmin";
1557 static const char __pyx_k_astype[] = "astype";
1558 static const char __pyx_k_bspair[] = "bspair";
1559 static const char __pyx_k_double[] = "double";
1560 static const char __pyx_k_figure[] = "figure";
1561 static const char __pyx_k_format[] = "format";
1562 static const char __pyx_k_import[] = "__import__";
1563 static const char __pyx_k_interp[] = "interp";
1564 static const char __pyx_k_legend[] = "legend";
1565 static const char __pyx_k_main_2[] = "main";
1566 static const char __pyx_k_marker[] = "marker";
1567 static const char __pyx_k_mode_2[] = "--mode";
1568 static const char __pyx_k_module[] = "__module__";
1569 static const char __pyx_k_name_2[] = "__name__";
1570 static const char __pyx_k_object[] = "object";
1571 static const char __pyx_k_output[] = "output";
1572 static const char __pyx_k_parser[] = "parser";
1573 static const char __pyx_k_plot_2[] = "--plot";
1574 static const char __pyx_k_values[] = "values";
1575 static const char __pyx_k_wl_pts[] = "wl_pts";
1576 static const char __pyx_k_xarray[] = "xarray";
1577 static const char __pyx_k_xlabel[] = "xlabel";
1578 static const char __pyx_k_ylabel[] = "ylabel";
1579 static const char __pyx_k_Dataset[] = "Dataset";
1580 static const char __pyx_k_default[] = "default";
1581 static const char __pyx_k_dtocean[] = "dtocean";
1582 static const char __pyx_k_ifile_2[] = "--ifile";
1583 static const char __pyx_k_interpn[] = "interpn";
1584 static const char __pyx_k_max_rfl[] = "max_rfl";
1585 static const char __pyx_k_min_rfl[] = "min_rfl";
1586 static const char __pyx_k_modeled[] = "modeled";
1587 static const char __pyx_k_ofile_2[] = "--ofile";
1588 static const char __pyx_k_prepare[] = "__prepare__";
1589 static const char __pyx_k_process[] = "process";
1590 static const char __pyx_k_raa_pts[] = "raa_pts";
1591 static const char __pyx_k_rfl_pts[] = "rfl_pts";
1592 static const char __pyx_k_scatter[] = "scatter";
1593 static const char __pyx_k_sza_pts[] = "sza_pts";
1594 static const char __pyx_k_tau_pts[] = "tau_pts";
1595 static const char __pyx_k_vza_pts[] = "vza_pts";
1596 static const char __pyx_k_wnd_pts[] = "wnd_pts";
1597 static const char __pyx_k_FileType[] = "FileType";
1598 static const char __pyx_k_argparse[] = "argparse";
1599 static const char __pyx_k_datetime[] = "datetime";
1600 static const char __pyx_k_latitude[] = "latitude";
1601 static const char __pyx_k_linspace[] = "linspace";
1602 static const char __pyx_k_measured[] = "measured";
1603 static const char __pyx_k_meshgrid[] = "meshgrid";
1604 static const char __pyx_k_qualname[] = "__qualname__";
1605 static const char __pyx_k_required[] = "required";
1606 static const char __pyx_k_residual[] = "residual";
1607 static const char __pyx_k_DataArray[] = "DataArray";
1608 static const char __pyx_k_ancillary[] = "/ancillary";
1609 static const char __pyx_k_big_model[] = "big model";
1610 static const char __pyx_k_longitude[] = "longitude";
1611 static const char __pyx_k_metaclass[] = "__metaclass__";
1612 static const char __pyx_k_proc_gran[] = "proc_gran";
1613 static const char __pyx_k_to_netcdf[] = "to_netcdf";
1614 static const char __pyx_k_transpose[] = "transpose";
1615 static const char __pyx_k_REF_RAYALL[] = "REF_RAYALL";
1616 static const char __pyx_k_cloud_mask[] = "cloud_mask";
1617 static const char __pyx_k_input_file[] = "input file";
1618 static const char __pyx_k_matplotlib[] = "matplotlib";
1619 static const char __pyx_k_parse_args[] = "parse_args";
1620 static const char __pyx_k_projection[] = "projection";
1621 static const char __pyx_k_set_xlabel[] = "set_xlabel";
1622 static const char __pyx_k_set_ylabel[] = "set_ylabel";
1623 static const char __pyx_k_set_zlabel[] = "set_zlabel";
1624 static const char __pyx_k_start_line[] = "start line";
1625 static const char __pyx_k_wind_speed[] = "wind_speed";
1626 static const char __pyx_k_zeros_like[] = "zeros_like";
1627 static const char __pyx_k_MaxNLocator[] = "MaxNLocator";
1628 static const char __pyx_k_add_subplot[] = "add_subplot";
1629 static const char __pyx_k_dtocean_pyx[] = "dtocean.pyx";
1630 static const char __pyx_k_geolocation[] = "/geolocation";
1631 static const char __pyx_k_mode_option[] = "mode option";
1632 static const char __pyx_k_output_file[] = "output file";
1633 static const char __pyx_k_plot_points[] = "plot_points";
1634 static const char __pyx_k_reflectance[] = "reflectance";
1635 static const char __pyx_k_small_model[] = "small model";
1636 static const char __pyx_k_square_side[] = "square side ";
1637 static const char __pyx_k_start_pixel[] = "start pixel";
1638 static const char __pyx_k_upper_right[] = "upper right";
1639 static const char __pyx_k_add_argument[] = "add_argument";
1640 static const char __pyx_k_dtocean_plot[] = "dtocean.plot";
1641 static const char __pyx_k_input___init[] = "input.__init__";
1642 static const char __pyx_k_l1b_filepath[] = "l1b_filepath";
1643 static const char __pyx_k_load_dataset[] = "load_dataset";
1644 static const char __pyx_k_lut_filepath[] = "lut_filepath";
1645 static const char __pyx_k_out_filepath[] = "out_filepath";
1646 static const char __pyx_k_output_write[] = "output.write";
1647 static const char __pyx_k_solar_zenith[] = "solar_zenith";
1648 static const char __pyx_k_OCEAN_AEROSOL[] = "/OCEAN_AEROSOL";
1649 static const char __pyx_k_interp_extrap[] = "interp_extrap";
1650 static const char __pyx_k_output___init[] = "output.__init__";
1651 static const char __pyx_k_reflectance_2[] = "/reflectance";
1652 static const char __pyx_k_sensor_zenith[] = "sensor_zenith";
1653 static const char __pyx_k_wavelength_nm[] = "wavelength (nm)";
1654 static const char __pyx_k_ArgumentParser[] = "ArgumentParser";
1655 static const char __pyx_k_dtocean___init[] = "dtocean.__init__";
1656 static const char __pyx_k_plot_wireframe[] = "plot_wireframe";
1657 static const char __pyx_k_Writing_to_file[] = "Writing to file: ";
1658 static const char __pyx_k_dtocean_process[] = "dtocean.process";
1659 static const char __pyx_k_navigation_data[] = "/navigation_data";
1660 static const char __pyx_k_plot_pixel_data[] = "plot pixel data";
1661 static const char __pyx_k_toa_reflectance[] = "toa_reflectance";
1662 static const char __pyx_k_relative_azimuth[] = "relative_azimuth";
1663 static const char __pyx_k_Processing_mode_0[] = "Processing mode {0}";
1664 static const char __pyx_k_dtocean_proc_gran[] = "dtocean.proc_gran";
1665 static const char __pyx_k_lookup_table_file[] = "lookup table file";
1666 static const char __pyx_k_matplotlib_pyplot[] = "matplotlib.pyplot";
1667 static const char __pyx_k_matplotlib_ticker[] = "matplotlib.ticker";
1668 static const char __pyx_k_scipy_interpolate[] = "scipy.interpolate";
1669 static const char __pyx_k_Reading_VIIRS_Data[] = "Reading VIIRS Data: ";
1670 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
1671 static const char __pyx_k_big_small_continuum[] = "big/small continuum";
1672 static const char __pyx_k_dtocean_plot_points[] = "dtocean.plot_points";
1673 static const char __pyx_k_mpl_toolkits_mplot3d[] = "mpl_toolkits.mplot3d";
1674 static const char __pyx_k_dtocean_interp_extrap[] = "dtocean.interp_extrap";
1675 static const char __pyx_k_Reading_Darktarget_LUT[] = "Reading Darktarget LUT: ";
1676 static const char __pyx_k_Unable_to_read_LUT_file_exiting[] = "Unable to read LUT file ... exiting";
1677 static const char __pyx_k_Unable_to_initialize_output_file[] = "Unable to initialize output file ... exiting";
1678 static const char __pyx_k_Unable_to_read_from_input_file_e[] = "Unable to read from input file ... exiting";
1679 static const char __pyx_k_dtocean_y_3_x_4_aot_0_3f_fmf_1_3[] = "dtocean -- y={3:}, x={4:} aot: {0:.3f} fmf: {1:.3f} sse: {2:.3}";
1680 static const char __pyx_k_interpolate_to_reflectance_for_e[] = "interpolate to reflectance for each wavelength and model";
1681 static PyObject *__pyx_kp_u_3d;
1682 static PyObject *__pyx_n_u_AINTB;
1683 static PyObject *__pyx_n_u_AINTS;
1684 static PyObject *__pyx_n_s_ArgumentParser;
1685 static PyObject *__pyx_n_s_Axes3D;
1686 static PyObject *__pyx_n_s_D2R;
1687 static PyObject *__pyx_n_s_DataArray;
1688 static PyObject *__pyx_n_s_Dataset;
1689 static PyObject *__pyx_kp_u_Done;
1690 static PyObject *__pyx_n_s_FileType;
1691 static PyObject *__pyx_n_s_MaxNLocator;
1692 static PyObject *__pyx_n_s_NAOT;
1693 static PyObject *__pyx_n_s_NBIG;
1694 static PyObject *__pyx_n_s_NRAA;
1695 static PyObject *__pyx_n_s_NSMALL;
1696 static PyObject *__pyx_n_s_NSZA;
1697 static PyObject *__pyx_n_s_NVZA;
1698 static PyObject *__pyx_n_s_NWL;
1699 static PyObject *__pyx_n_s_NWS;
1700 static PyObject *__pyx_kp_u_OCEAN_AEROSOL;
1701 static PyObject *__pyx_n_u_PHC;
1702 static PyObject *__pyx_kp_u_Processing_mode_0;
1703 static PyObject *__pyx_n_u_REF_RAYALL;
1704 static PyObject *__pyx_kp_u_Reading_Darktarget_LUT;
1705 static PyObject *__pyx_kp_u_Reading_VIIRS_Data;
1706 static PyObject *__pyx_n_u_TAUAB;
1707 static PyObject *__pyx_n_u_TAUAS;
1708 static PyObject *__pyx_n_u_THET;
1709 static PyObject *__pyx_n_u_THET0;
1710 static PyObject *__pyx_kp_u_Unable_to_initialize_output_file;
1711 static PyObject *__pyx_kp_u_Unable_to_read_LUT_file_exiting;
1712 static PyObject *__pyx_kp_u_Unable_to_read_from_input_file_e;
1713 static PyObject *__pyx_n_s_W124;
1714 static PyObject *__pyx_n_s_W164;
1715 static PyObject *__pyx_n_s_W213;
1716 static PyObject *__pyx_n_s_W470;
1717 static PyObject *__pyx_n_s_W550;
1718 static PyObject *__pyx_n_u_W550;
1719 static PyObject *__pyx_n_s_W659;
1720 static PyObject *__pyx_n_u_W659;
1721 static PyObject *__pyx_n_s_W860;
1722 static PyObject *__pyx_n_u_W860;
1723 static PyObject *__pyx_n_u_WAVE;
1724 static PyObject *__pyx_kp_u_Writing_to_file;
1725 static PyObject *__pyx_kp_u__30;
1726 static PyObject *__pyx_n_s__32;
1727 static PyObject *__pyx_kp_u__8;
1728 static PyObject *__pyx_n_s_add_argument;
1729 static PyObject *__pyx_n_s_add_subplot;
1730 static PyObject *__pyx_kp_u_ancillary;
1731 static PyObject *__pyx_n_s_aot;
1732 static PyObject *__pyx_n_u_aot;
1733 static PyObject *__pyx_n_s_append;
1734 static PyObject *__pyx_n_s_arange;
1735 static PyObject *__pyx_n_s_argmin;
1736 static PyObject *__pyx_n_s_argparse;
1737 static PyObject *__pyx_n_s_args;
1738 static PyObject *__pyx_n_s_array;
1739 static PyObject *__pyx_n_s_astype;
1740 static PyObject *__pyx_n_s_ax;
1741 static PyObject *__pyx_n_s_axis;
1742 static PyObject *__pyx_n_s_b;
1743 static PyObject *__pyx_n_u_b;
1744 static PyObject *__pyx_n_s_big;
1745 static PyObject *__pyx_kp_u_big_model;
1746 static PyObject *__pyx_kp_u_big_small_continuum;
1747 static PyObject *__pyx_n_s_bspair;
1748 static PyObject *__pyx_n_s_c;
1749 static PyObject *__pyx_n_s_cld;
1750 static PyObject *__pyx_n_s_clf;
1751 static PyObject *__pyx_n_s_cline_in_traceback;
1752 static PyObject *__pyx_n_s_clip;
1753 static PyObject *__pyx_n_u_cloud_mask;
1754 static PyObject *__pyx_n_s_col;
1755 static PyObject *__pyx_n_s_color;
1756 static PyObject *__pyx_n_s_cos;
1757 static PyObject *__pyx_n_s_datetime;
1758 static PyObject *__pyx_n_s_default;
1759 static PyObject *__pyx_n_s_denom;
1760 static PyObject *__pyx_n_s_dims;
1761 static PyObject *__pyx_n_s_doc;
1762 static PyObject *__pyx_n_s_dot;
1763 static PyObject *__pyx_n_s_double;
1764 static PyObject *__pyx_n_s_ds;
1765 static PyObject *__pyx_n_s_dto;
1766 static PyObject *__pyx_n_s_dtocean;
1767 static PyObject *__pyx_n_s_dtocean___init;
1768 static PyObject *__pyx_n_s_dtocean_interp_extrap;
1769 static PyObject *__pyx_n_s_dtocean_plot;
1770 static PyObject *__pyx_n_s_dtocean_plot_points;
1771 static PyObject *__pyx_n_s_dtocean_proc_gran;
1772 static PyObject *__pyx_n_s_dtocean_process;
1773 static PyObject *__pyx_kp_s_dtocean_pyx;
1774 static PyObject *__pyx_kp_u_dtocean_y_3_x_4_aot_0_3f_fmf_1_3;
1775 static PyObject *__pyx_n_s_end;
1776 static PyObject *__pyx_n_s_err;
1777 static PyObject *__pyx_n_s_exit;
1778 static PyObject *__pyx_n_s_fig;
1779 static PyObject *__pyx_n_s_figure;
1780 static PyObject *__pyx_n_s_fmf;
1781 static PyObject *__pyx_n_u_fmf;
1782 static PyObject *__pyx_n_s_format;
1783 static PyObject *__pyx_n_u_g;
1784 static PyObject *__pyx_kp_u_geolocation;
1785 static PyObject *__pyx_n_s_grid;
1786 static PyObject *__pyx_n_s_group;
1787 static PyObject *__pyx_n_s_help;
1788 static PyObject *__pyx_kp_u_i;
1789 static PyObject *__pyx_n_s_i_2;
1790 static PyObject *__pyx_n_s_ibm;
1791 static PyObject *__pyx_n_s_ifile;
1792 static PyObject *__pyx_kp_u_ifile_2;
1793 static PyObject *__pyx_n_s_im;
1794 static PyObject *__pyx_n_s_import;
1795 static PyObject *__pyx_n_s_init;
1796 static PyObject *__pyx_n_s_input;
1797 static PyObject *__pyx_n_s_input___init;
1798 static PyObject *__pyx_kp_u_input_file;
1799 static PyObject *__pyx_n_s_inst;
1800 static PyObject *__pyx_n_s_interp;
1801 static PyObject *__pyx_n_s_interp_extrap;
1802 static PyObject *__pyx_n_s_interpn;
1803 static PyObject *__pyx_kp_u_interpolate_to_reflectance_for_e;
1804 static PyObject *__pyx_n_s_iph;
1805 static PyObject *__pyx_n_s_ism;
1806 static PyObject *__pyx_n_s_isz;
1807 static PyObject *__pyx_n_s_itau;
1808 static PyObject *__pyx_n_s_ith;
1809 static PyObject *__pyx_n_s_iwl;
1810 static PyObject *__pyx_n_s_iwn;
1811 static PyObject *__pyx_n_s_ix;
1812 static PyObject *__pyx_n_s_iy;
1813 static PyObject *__pyx_n_u_k;
1814 static PyObject *__pyx_kp_u_l;
1815 static PyObject *__pyx_n_s_l1b_filepath;
1816 static PyObject *__pyx_n_s_label;
1817 static PyObject *__pyx_n_s_lat;
1818 static PyObject *__pyx_n_u_lat;
1819 static PyObject *__pyx_n_u_latitude;
1820 static PyObject *__pyx_n_s_lb;
1821 static PyObject *__pyx_n_s_legend;
1822 static PyObject *__pyx_n_s_linspace;
1823 static PyObject *__pyx_n_s_load_dataset;
1824 static PyObject *__pyx_n_s_loc;
1825 static PyObject *__pyx_n_s_lon;
1826 static PyObject *__pyx_n_u_lon;
1827 static PyObject *__pyx_n_u_longitude;
1828 static PyObject *__pyx_kp_u_lookup_table_file;
1829 static PyObject *__pyx_n_s_ls;
1830 static PyObject *__pyx_kp_u_lut;
1831 static PyObject *__pyx_n_s_lut_2;
1832 static PyObject *__pyx_n_s_lut_filepath;
1833 static PyObject *__pyx_kp_u_m;
1834 static PyObject *__pyx_n_s_main;
1835 static PyObject *__pyx_n_u_main;
1836 static PyObject *__pyx_n_s_main_2;
1837 static PyObject *__pyx_n_s_marker;
1838 static PyObject *__pyx_n_s_math;
1839 static PyObject *__pyx_n_s_matplotlib;
1840 static PyObject *__pyx_n_s_matplotlib_pyplot;
1841 static PyObject *__pyx_n_s_matplotlib_ticker;
1842 static PyObject *__pyx_n_s_max;
1843 static PyObject *__pyx_n_s_max_rfl;
1844 static PyObject *__pyx_n_u_measured;
1845 static PyObject *__pyx_n_s_meshgrid;
1846 static PyObject *__pyx_n_s_metaclass;
1847 static PyObject *__pyx_n_s_min;
1848 static PyObject *__pyx_n_s_min_rfl;
1849 static PyObject *__pyx_n_s_mode;
1850 static PyObject *__pyx_kp_u_mode_2;
1851 static PyObject *__pyx_kp_u_mode_option;
1852 static PyObject *__pyx_n_u_modeled;
1853 static PyObject *__pyx_n_s_module;
1854 static PyObject *__pyx_n_s_mpl_toolkits_mplot3d;
1855 static PyObject *__pyx_n_s_mrfl;
1856 static PyObject *__pyx_n_s_mrflb;
1857 static PyObject *__pyx_n_s_mrflr;
1858 static PyObject *__pyx_n_s_mrfls;
1859 static PyObject *__pyx_n_s_name;
1860 static PyObject *__pyx_n_s_name_2;
1861 static PyObject *__pyx_kp_u_navigation_data;
1862 static PyObject *__pyx_n_s_np;
1863 static PyObject *__pyx_n_s_num;
1864 static PyObject *__pyx_n_s_numpy;
1865 static PyObject *__pyx_n_u_o;
1866 static PyObject *__pyx_kp_u_o_2;
1867 static PyObject *__pyx_n_s_object;
1868 static PyObject *__pyx_n_s_ofile;
1869 static PyObject *__pyx_kp_u_ofile_2;
1870 static PyObject *__pyx_n_s_os;
1871 static PyObject *__pyx_n_s_out_filepath;
1872 static PyObject *__pyx_n_s_output;
1873 static PyObject *__pyx_n_s_output___init;
1874 static PyObject *__pyx_kp_u_output_file;
1875 static PyObject *__pyx_n_s_output_write;
1876 static PyObject *__pyx_kp_u_p;
1877 static PyObject *__pyx_n_s_parse_args;
1878 static PyObject *__pyx_n_s_parser;
1879 static PyObject *__pyx_n_s_pi;
1880 static PyObject *__pyx_n_s_plot;
1881 static PyObject *__pyx_kp_u_plot_2;
1882 static PyObject *__pyx_kp_u_plot_pixel_data;
1883 static PyObject *__pyx_n_s_plot_points;
1884 static PyObject *__pyx_n_s_plot_wireframe;
1885 static PyObject *__pyx_n_s_plt;
1886 static PyObject *__pyx_n_s_prepare;
1887 static PyObject *__pyx_n_s_print;
1888 static PyObject *__pyx_n_s_proc_gran;
1889 static PyObject *__pyx_n_s_process;
1890 static PyObject *__pyx_n_s_projection;
1891 static PyObject *__pyx_n_s_pts;
1892 static PyObject *__pyx_n_s_qualname;
1893 static PyObject *__pyx_n_u_r;
1894 static PyObject *__pyx_n_s_r_pts;
1895 static PyObject *__pyx_n_s_raa;
1896 static PyObject *__pyx_n_u_raa;
1897 static PyObject *__pyx_n_s_raa_pts;
1898 static PyObject *__pyx_n_s_range;
1899 static PyObject *__pyx_n_s_rayl;
1900 static PyObject *__pyx_n_s_rbdif;
1901 static PyObject *__pyx_n_s_rbsb;
1902 static PyObject *__pyx_n_u_reflectance;
1903 static PyObject *__pyx_kp_u_reflectance_2;
1904 static PyObject *__pyx_n_u_relative_azimuth;
1905 static PyObject *__pyx_n_s_required;
1906 static PyObject *__pyx_n_u_residual;
1907 static PyObject *__pyx_n_s_rfl;
1908 static PyObject *__pyx_n_u_rfl;
1909 static PyObject *__pyx_n_s_rfl_pts;
1910 static PyObject *__pyx_n_s_row;
1911 static PyObject *__pyx_n_s_rsd;
1912 static PyObject *__pyx_n_s_s;
1913 static PyObject *__pyx_n_s_sb2;
1914 static PyObject *__pyx_n_s_sbdif;
1915 static PyObject *__pyx_n_s_scatter;
1916 static PyObject *__pyx_n_s_scipy_interpolate;
1917 static PyObject *__pyx_n_s_self;
1918 static PyObject *__pyx_n_u_sensor_zenith;
1919 static PyObject *__pyx_n_s_set_xlabel;
1920 static PyObject *__pyx_n_s_set_ylabel;
1921 static PyObject *__pyx_n_s_set_zlabel;
1922 static PyObject *__pyx_n_s_shape;
1923 static PyObject *__pyx_n_s_show;
1924 static PyObject *__pyx_n_s_shpb;
1925 static PyObject *__pyx_n_s_shps;
1926 static PyObject *__pyx_n_s_small;
1927 static PyObject *__pyx_kp_u_small_model;
1928 static PyObject *__pyx_n_u_solar_zenith;
1929 static PyObject *__pyx_kp_u_square_side;
1930 static PyObject *__pyx_n_s_sse;
1931 static PyObject *__pyx_n_u_sse;
1932 static PyObject *__pyx_n_s_stack;
1933 static PyObject *__pyx_kp_u_start_line;
1934 static PyObject *__pyx_kp_u_start_pixel;
1935 static PyObject *__pyx_n_s_sys;
1936 static PyObject *__pyx_n_s_sza;
1937 static PyObject *__pyx_n_u_sza;
1938 static PyObject *__pyx_n_s_sza_pts;
1939 static PyObject *__pyx_n_s_tau_pts;
1940 static PyObject *__pyx_n_s_taub;
1941 static PyObject *__pyx_n_s_taus;
1942 static PyObject *__pyx_n_s_tauxb;
1943 static PyObject *__pyx_n_s_tauxs;
1944 static PyObject *__pyx_n_s_tblut;
1945 static PyObject *__pyx_n_s_test;
1946 static PyObject *__pyx_n_s_title;
1947 static PyObject *__pyx_n_s_to_netcdf;
1948 static PyObject *__pyx_n_u_toa_reflectance;
1949 static PyObject *__pyx_n_s_toab;
1950 static PyObject *__pyx_n_s_toabt;
1951 static PyObject *__pyx_n_s_toar;
1952 static PyObject *__pyx_n_s_toas;
1953 static PyObject *__pyx_n_s_toast;
1954 static PyObject *__pyx_n_s_transpose;
1955 static PyObject *__pyx_n_s_trflb;
1956 static PyObject *__pyx_n_s_trfls;
1957 static PyObject *__pyx_n_s_ts;
1958 static PyObject *__pyx_n_s_tslut;
1959 static PyObject *__pyx_n_s_tstr;
1960 static PyObject *__pyx_n_s_type;
1961 static PyObject *__pyx_n_u_type;
1962 static PyObject *__pyx_n_s_units;
1963 static PyObject *__pyx_kp_u_upper_right;
1964 static PyObject *__pyx_n_s_values;
1965 static PyObject *__pyx_n_s_vin;
1966 static PyObject *__pyx_n_s_vout;
1967 static PyObject *__pyx_n_s_vza;
1968 static PyObject *__pyx_n_u_vza;
1969 static PyObject *__pyx_n_s_vza_pts;
1970 static PyObject *__pyx_n_u_w;
1971 static PyObject *__pyx_kp_u_wavelength_nm;
1972 static PyObject *__pyx_n_u_wind_speed;
1973 static PyObject *__pyx_n_u_wl;
1974 static PyObject *__pyx_n_s_wl_pts;
1975 static PyObject *__pyx_n_s_wnd;
1976 static PyObject *__pyx_n_u_wnd;
1977 static PyObject *__pyx_n_s_wnd_pts;
1978 static PyObject *__pyx_n_s_write;
1979 static PyObject *__pyx_n_s_ws;
1980 static PyObject *__pyx_n_s_x;
1981 static PyObject *__pyx_n_u_x;
1982 static PyObject *__pyx_n_s_xarray;
1983 static PyObject *__pyx_n_s_xb;
1984 static PyObject *__pyx_n_s_xdim;
1985 static PyObject *__pyx_n_s_xin;
1986 static PyObject *__pyx_n_s_xit;
1987 static PyObject *__pyx_n_s_xlabel;
1988 static PyObject *__pyx_n_s_xm;
1989 static PyObject *__pyx_n_s_xp;
1990 static PyObject *__pyx_n_s_xr;
1991 static PyObject *__pyx_n_s_xs;
1992 static PyObject *__pyx_n_s_y;
1993 static PyObject *__pyx_n_u_y;
1994 static PyObject *__pyx_n_s_yb;
1995 static PyObject *__pyx_n_s_ydim;
1996 static PyObject *__pyx_n_s_ylabel;
1997 static PyObject *__pyx_n_s_ym;
1998 static PyObject *__pyx_n_s_yout;
1999 static PyObject *__pyx_n_s_yp;
2000 static PyObject *__pyx_n_s_ys;
2001 static PyObject *__pyx_n_s_z;
2002 static PyObject *__pyx_n_u_z;
2003 static PyObject *__pyx_n_s_zb;
2004 static PyObject *__pyx_n_s_zeros;
2005 static PyObject *__pyx_n_s_zeros_like;
2006 static PyObject *__pyx_n_s_zm;
2007 static PyObject *__pyx_n_s_zp;
2008 static PyObject *__pyx_n_s_zs;
2009 static PyObject *__pyx_pf_7dtocean_7dtocean___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_lut_filepath, CYTHON_UNUSED PyObject *__pyx_v_mode); /* proto */
2010 static PyObject *__pyx_pf_7dtocean_7dtocean_2interp_extrap(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_num, PyObject *__pyx_v_xin, PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */
2011 static PyObject *__pyx_pf_7dtocean_7dtocean_4proc_gran(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_rfl, PyObject *__pyx_v_sza, PyObject *__pyx_v_vza, PyObject *__pyx_v_raa, PyObject *__pyx_v_wnd); /* proto */
2012 static PyObject *__pyx_pf_7dtocean_7dtocean_6process(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_rfl, PyObject *__pyx_v_sza, PyObject *__pyx_v_vza, PyObject *__pyx_v_raa, PyObject *__pyx_v_wnd); /* proto */
2013 static PyObject *__pyx_pf_7dtocean_7dtocean_8plot(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_iy, PyObject *__pyx_v_ix); /* proto */
2014 static PyObject *__pyx_pf_7dtocean_7dtocean_10plot_points(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
2015 static PyObject *__pyx_pf_7dtocean_5input___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_l1b_filepath); /* proto */
2016 static PyObject *__pyx_pf_7dtocean_6output___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_out_filepath, PyObject *__pyx_v_ydim, PyObject *__pyx_v_xdim); /* proto */
2017 static PyObject *__pyx_pf_7dtocean_6output_2write(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
2018 static PyObject *__pyx_pf_7dtocean_main(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2019 static PyObject *__pyx_float_0_0;
2020 static PyObject *__pyx_float_0_5;
2021 static PyObject *__pyx_float_1_0;
2022 static PyObject *__pyx_float_1_2;
2023 static PyObject *__pyx_float_6_0;
2024 static PyObject *__pyx_float_0_01;
2025 static PyObject *__pyx_float_10_0;
2026 static PyObject *__pyx_float_16_0;
2027 static PyObject *__pyx_float_180_0;
2028 static PyObject *__pyx_float_neg_999_9;
2029 static PyObject *__pyx_int_0;
2030 static PyObject *__pyx_int_1;
2031 static PyObject *__pyx_int_2;
2032 static PyObject *__pyx_int_3;
2033 static PyObject *__pyx_int_4;
2034 static PyObject *__pyx_int_5;
2035 static PyObject *__pyx_int_6;
2036 static PyObject *__pyx_int_7;
2037 static PyObject *__pyx_int_8;
2038 static PyObject *__pyx_int_11;
2039 static PyObject *__pyx_int_16;
2040 static PyObject *__pyx_int_50;
2041 static PyObject *__pyx_int_111;
2042 static PyObject *__pyx_int_neg_1;
2043 static PyObject *__pyx_int_neg_999;
2044 static PyObject *__pyx_tuple_;
2045 static PyObject *__pyx_slice__4;
2046 static PyObject *__pyx_slice__7;
2047 static PyObject *__pyx_tuple__2;
2048 static PyObject *__pyx_tuple__3;
2049 static PyObject *__pyx_tuple__5;
2050 static PyObject *__pyx_tuple__6;
2051 static PyObject *__pyx_tuple__9;
2052 static PyObject *__pyx_slice__10;
2053 static PyObject *__pyx_slice__12;
2054 static PyObject *__pyx_slice__14;
2055 static PyObject *__pyx_tuple__11;
2056 static PyObject *__pyx_tuple__13;
2057 static PyObject *__pyx_tuple__15;
2058 static PyObject *__pyx_tuple__16;
2059 static PyObject *__pyx_tuple__17;
2060 static PyObject *__pyx_tuple__18;
2061 static PyObject *__pyx_tuple__19;
2062 static PyObject *__pyx_tuple__20;
2063 static PyObject *__pyx_tuple__21;
2064 static PyObject *__pyx_tuple__22;
2065 static PyObject *__pyx_tuple__23;
2066 static PyObject *__pyx_tuple__24;
2067 static PyObject *__pyx_tuple__25;
2068 static PyObject *__pyx_tuple__26;
2069 static PyObject *__pyx_tuple__27;
2070 static PyObject *__pyx_tuple__28;
2071 static PyObject *__pyx_tuple__29;
2072 static PyObject *__pyx_tuple__31;
2073 static PyObject *__pyx_tuple__33;
2074 static PyObject *__pyx_tuple__34;
2075 static PyObject *__pyx_tuple__36;
2076 static PyObject *__pyx_tuple__38;
2077 static PyObject *__pyx_tuple__40;
2078 static PyObject *__pyx_tuple__42;
2079 static PyObject *__pyx_tuple__44;
2080 static PyObject *__pyx_tuple__46;
2081 static PyObject *__pyx_tuple__47;
2082 static PyObject *__pyx_tuple__49;
2083 static PyObject *__pyx_tuple__50;
2084 static PyObject *__pyx_tuple__52;
2085 static PyObject *__pyx_tuple__54;
2086 static PyObject *__pyx_codeobj__35;
2087 static PyObject *__pyx_codeobj__37;
2088 static PyObject *__pyx_codeobj__39;
2089 static PyObject *__pyx_codeobj__41;
2090 static PyObject *__pyx_codeobj__43;
2091 static PyObject *__pyx_codeobj__45;
2092 static PyObject *__pyx_codeobj__48;
2093 static PyObject *__pyx_codeobj__51;
2094 static PyObject *__pyx_codeobj__53;
2095 static PyObject *__pyx_codeobj__55;
2096 /* Late includes */
2097 
2098 /* "dtocean.pyx":35
2099  * class dtocean(object):
2100  *
2101  * def __init__(self, lut_filepath, mode): # <<<<<<<<<<<<<<
2102  * print ("Reading Darktarget LUT: " + lut_filepath)
2103  * self.toas = np.zeros((NWL,NSMALL,NAOT,NWS,NSZA,NVZA,NRAA))
2104  */
2105 
2106 /* Python wrapper */
2107 static PyObject *__pyx_pw_7dtocean_7dtocean_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2108 static PyMethodDef __pyx_mdef_7dtocean_7dtocean_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7dtocean_7dtocean_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
2109 static PyObject *__pyx_pw_7dtocean_7dtocean_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2110  PyObject *__pyx_v_self = 0;
2111  PyObject *__pyx_v_lut_filepath = 0;
2112  CYTHON_UNUSED PyObject *__pyx_v_mode = 0;
2113  int __pyx_lineno = 0;
2114  const char *__pyx_filename = NULL;
2115  int __pyx_clineno = 0;
2116  PyObject *__pyx_r = 0;
2117  __Pyx_RefNannyDeclarations
2118  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
2119  {
2120  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_lut_filepath,&__pyx_n_s_mode,0};
2121  PyObject* values[3] = {0,0,0};
2122  if (unlikely(__pyx_kwds)) {
2123  Py_ssize_t kw_args;
2124  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2125  switch (pos_args) {
2126  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2127  CYTHON_FALLTHROUGH;
2128  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2129  CYTHON_FALLTHROUGH;
2130  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2131  CYTHON_FALLTHROUGH;
2132  case 0: break;
2133  default: goto __pyx_L5_argtuple_error;
2134  }
2135  kw_args = PyDict_Size(__pyx_kwds);
2136  switch (pos_args) {
2137  case 0:
2138  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
2139  else goto __pyx_L5_argtuple_error;
2140  CYTHON_FALLTHROUGH;
2141  case 1:
2142  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lut_filepath)) != 0)) kw_args--;
2143  else {
2144  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 35, __pyx_L3_error)
2145  }
2146  CYTHON_FALLTHROUGH;
2147  case 2:
2148  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode)) != 0)) kw_args--;
2149  else {
2150  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 35, __pyx_L3_error)
2151  }
2152  }
2153  if (unlikely(kw_args > 0)) {
2154  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 35, __pyx_L3_error)
2155  }
2156  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
2157  goto __pyx_L5_argtuple_error;
2158  } else {
2159  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2160  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2161  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2162  }
2163  __pyx_v_self = values[0];
2164  __pyx_v_lut_filepath = values[1];
2165  __pyx_v_mode = values[2];
2166  }
2167  goto __pyx_L4_argument_unpacking_done;
2168  __pyx_L5_argtuple_error:;
2169  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 35, __pyx_L3_error)
2170  __pyx_L3_error:;
2171  __Pyx_AddTraceback("dtocean.dtocean.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2172  __Pyx_RefNannyFinishContext();
2173  return NULL;
2174  __pyx_L4_argument_unpacking_done:;
2175  __pyx_r = __pyx_pf_7dtocean_7dtocean___init__(__pyx_self, __pyx_v_self, __pyx_v_lut_filepath, __pyx_v_mode);
2176 
2177  /* function exit code */
2178  __Pyx_RefNannyFinishContext();
2179  return __pyx_r;
2180 }
2181 
2182 static PyObject *__pyx_pf_7dtocean_7dtocean___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_lut_filepath, CYTHON_UNUSED PyObject *__pyx_v_mode) {
2183  PyObject *__pyx_v_inst = NULL;
2184  PyObject *__pyx_r = NULL;
2185  __Pyx_RefNannyDeclarations
2186  PyObject *__pyx_t_1 = NULL;
2187  PyObject *__pyx_t_2 = NULL;
2188  PyObject *__pyx_t_3 = NULL;
2189  PyObject *__pyx_t_4 = NULL;
2190  PyObject *__pyx_t_5 = NULL;
2191  PyObject *__pyx_t_6 = NULL;
2192  PyObject *__pyx_t_7 = NULL;
2193  PyObject *__pyx_t_8 = NULL;
2194  PyObject *__pyx_t_9 = NULL;
2195  PyObject *__pyx_t_10 = NULL;
2196  PyObject *__pyx_t_11 = NULL;
2197  PyObject *__pyx_t_12 = NULL;
2198  PyObject *__pyx_t_13 = NULL;
2199  int __pyx_t_14;
2200  int __pyx_t_15;
2201  char const *__pyx_t_16;
2202  PyObject *__pyx_t_17 = NULL;
2203  PyObject *__pyx_t_18 = NULL;
2204  PyObject *__pyx_t_19 = NULL;
2205  PyObject *__pyx_t_20 = NULL;
2206  PyObject *__pyx_t_21 = NULL;
2207  PyObject *__pyx_t_22 = NULL;
2208  int __pyx_lineno = 0;
2209  const char *__pyx_filename = NULL;
2210  int __pyx_clineno = 0;
2211  __Pyx_RefNannySetupContext("__init__", 0);
2212 
2213  /* "dtocean.pyx":36
2214  *
2215  * def __init__(self, lut_filepath, mode):
2216  * print ("Reading Darktarget LUT: " + lut_filepath) # <<<<<<<<<<<<<<
2217  * self.toas = np.zeros((NWL,NSMALL,NAOT,NWS,NSZA,NVZA,NRAA))
2218  * self.toab = np.zeros((NWL,NBIG,NAOT,NWS,NSZA,NVZA,NRAA))
2219  */
2220  __pyx_t_1 = PyNumber_Add(__pyx_kp_u_Reading_Darktarget_LUT, __pyx_v_lut_filepath); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
2221  __Pyx_GOTREF(__pyx_t_1);
2222  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)
2223  __Pyx_GOTREF(__pyx_t_2);
2224  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2225  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2226 
2227  /* "dtocean.pyx":37
2228  * def __init__(self, lut_filepath, mode):
2229  * print ("Reading Darktarget LUT: " + lut_filepath)
2230  * self.toas = np.zeros((NWL,NSMALL,NAOT,NWS,NSZA,NVZA,NRAA)) # <<<<<<<<<<<<<<
2231  * self.toab = np.zeros((NWL,NBIG,NAOT,NWS,NSZA,NVZA,NRAA))
2232  * self.toar = np.zeros((NWL,NWS,NSZA,NVZA,NRAA))
2233  */
2234  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
2235  __Pyx_GOTREF(__pyx_t_1);
2236  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 37, __pyx_L1_error)
2237  __Pyx_GOTREF(__pyx_t_3);
2238  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2239  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NWL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
2240  __Pyx_GOTREF(__pyx_t_1);
2241  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_NSMALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 37, __pyx_L1_error)
2242  __Pyx_GOTREF(__pyx_t_4);
2243  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NAOT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 37, __pyx_L1_error)
2244  __Pyx_GOTREF(__pyx_t_5);
2245  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NWS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 37, __pyx_L1_error)
2246  __Pyx_GOTREF(__pyx_t_6);
2247  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NSZA); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 37, __pyx_L1_error)
2248  __Pyx_GOTREF(__pyx_t_7);
2249  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_NVZA); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 37, __pyx_L1_error)
2250  __Pyx_GOTREF(__pyx_t_8);
2251  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_NRAA); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 37, __pyx_L1_error)
2252  __Pyx_GOTREF(__pyx_t_9);
2253  __pyx_t_10 = PyTuple_New(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 37, __pyx_L1_error)
2254  __Pyx_GOTREF(__pyx_t_10);
2255  __Pyx_GIVEREF(__pyx_t_1);
2256  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
2257  __Pyx_GIVEREF(__pyx_t_4);
2258  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_4);
2259  __Pyx_GIVEREF(__pyx_t_5);
2260  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_5);
2261  __Pyx_GIVEREF(__pyx_t_6);
2262  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_6);
2263  __Pyx_GIVEREF(__pyx_t_7);
2264  PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_7);
2265  __Pyx_GIVEREF(__pyx_t_8);
2266  PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_t_8);
2267  __Pyx_GIVEREF(__pyx_t_9);
2268  PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_t_9);
2269  __pyx_t_1 = 0;
2270  __pyx_t_4 = 0;
2271  __pyx_t_5 = 0;
2272  __pyx_t_6 = 0;
2273  __pyx_t_7 = 0;
2274  __pyx_t_8 = 0;
2275  __pyx_t_9 = 0;
2276  __pyx_t_9 = NULL;
2277  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
2278  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
2279  if (likely(__pyx_t_9)) {
2280  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
2281  __Pyx_INCREF(__pyx_t_9);
2282  __Pyx_INCREF(function);
2283  __Pyx_DECREF_SET(__pyx_t_3, function);
2284  }
2285  }
2286  __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10);
2287  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
2288  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2289  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
2290  __Pyx_GOTREF(__pyx_t_2);
2291  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2292  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_toas, __pyx_t_2) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
2293  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2294 
2295  /* "dtocean.pyx":38
2296  * print ("Reading Darktarget LUT: " + lut_filepath)
2297  * self.toas = np.zeros((NWL,NSMALL,NAOT,NWS,NSZA,NVZA,NRAA))
2298  * self.toab = np.zeros((NWL,NBIG,NAOT,NWS,NSZA,NVZA,NRAA)) # <<<<<<<<<<<<<<
2299  * self.toar = np.zeros((NWL,NWS,NSZA,NVZA,NRAA))
2300  * self.taus = np.zeros((NWL,NSMALL,NAOT))
2301  */
2302  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 38, __pyx_L1_error)
2303  __Pyx_GOTREF(__pyx_t_3);
2304  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 38, __pyx_L1_error)
2305  __Pyx_GOTREF(__pyx_t_10);
2306  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2307  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NWL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 38, __pyx_L1_error)
2308  __Pyx_GOTREF(__pyx_t_3);
2309  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_NBIG); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 38, __pyx_L1_error)
2310  __Pyx_GOTREF(__pyx_t_9);
2311  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_NAOT); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 38, __pyx_L1_error)
2312  __Pyx_GOTREF(__pyx_t_8);
2313  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NWS); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 38, __pyx_L1_error)
2314  __Pyx_GOTREF(__pyx_t_7);
2315  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NSZA); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 38, __pyx_L1_error)
2316  __Pyx_GOTREF(__pyx_t_6);
2317  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NVZA); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 38, __pyx_L1_error)
2318  __Pyx_GOTREF(__pyx_t_5);
2319  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_NRAA); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 38, __pyx_L1_error)
2320  __Pyx_GOTREF(__pyx_t_4);
2321  __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
2322  __Pyx_GOTREF(__pyx_t_1);
2323  __Pyx_GIVEREF(__pyx_t_3);
2324  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
2325  __Pyx_GIVEREF(__pyx_t_9);
2326  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_9);
2327  __Pyx_GIVEREF(__pyx_t_8);
2328  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_8);
2329  __Pyx_GIVEREF(__pyx_t_7);
2330  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_7);
2331  __Pyx_GIVEREF(__pyx_t_6);
2332  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_t_6);
2333  __Pyx_GIVEREF(__pyx_t_5);
2334  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_5);
2335  __Pyx_GIVEREF(__pyx_t_4);
2336  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_t_4);
2337  __pyx_t_3 = 0;
2338  __pyx_t_9 = 0;
2339  __pyx_t_8 = 0;
2340  __pyx_t_7 = 0;
2341  __pyx_t_6 = 0;
2342  __pyx_t_5 = 0;
2343  __pyx_t_4 = 0;
2344  __pyx_t_4 = NULL;
2345  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
2346  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_10);
2347  if (likely(__pyx_t_4)) {
2348  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
2349  __Pyx_INCREF(__pyx_t_4);
2350  __Pyx_INCREF(function);
2351  __Pyx_DECREF_SET(__pyx_t_10, function);
2352  }
2353  }
2354  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_1);
2355  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2356  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2357  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
2358  __Pyx_GOTREF(__pyx_t_2);
2359  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2360  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_toab, __pyx_t_2) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
2361  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2362 
2363  /* "dtocean.pyx":39
2364  * self.toas = np.zeros((NWL,NSMALL,NAOT,NWS,NSZA,NVZA,NRAA))
2365  * self.toab = np.zeros((NWL,NBIG,NAOT,NWS,NSZA,NVZA,NRAA))
2366  * self.toar = np.zeros((NWL,NWS,NSZA,NVZA,NRAA)) # <<<<<<<<<<<<<<
2367  * self.taus = np.zeros((NWL,NSMALL,NAOT))
2368  * self.taub = np.zeros((NWL,NBIG,NAOT))
2369  */
2370  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 39, __pyx_L1_error)
2371  __Pyx_GOTREF(__pyx_t_10);
2372  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error)
2373  __Pyx_GOTREF(__pyx_t_1);
2374  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2375  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_NWL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 39, __pyx_L1_error)
2376  __Pyx_GOTREF(__pyx_t_10);
2377  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_NWS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 39, __pyx_L1_error)
2378  __Pyx_GOTREF(__pyx_t_4);
2379  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NSZA); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 39, __pyx_L1_error)
2380  __Pyx_GOTREF(__pyx_t_5);
2381  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NVZA); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 39, __pyx_L1_error)
2382  __Pyx_GOTREF(__pyx_t_6);
2383  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NRAA); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 39, __pyx_L1_error)
2384  __Pyx_GOTREF(__pyx_t_7);
2385  __pyx_t_8 = PyTuple_New(5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 39, __pyx_L1_error)
2386  __Pyx_GOTREF(__pyx_t_8);
2387  __Pyx_GIVEREF(__pyx_t_10);
2388  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10);
2389  __Pyx_GIVEREF(__pyx_t_4);
2390  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_4);
2391  __Pyx_GIVEREF(__pyx_t_5);
2392  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_5);
2393  __Pyx_GIVEREF(__pyx_t_6);
2394  PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_6);
2395  __Pyx_GIVEREF(__pyx_t_7);
2396  PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_t_7);
2397  __pyx_t_10 = 0;
2398  __pyx_t_4 = 0;
2399  __pyx_t_5 = 0;
2400  __pyx_t_6 = 0;
2401  __pyx_t_7 = 0;
2402  __pyx_t_7 = NULL;
2403  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
2404  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
2405  if (likely(__pyx_t_7)) {
2406  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
2407  __Pyx_INCREF(__pyx_t_7);
2408  __Pyx_INCREF(function);
2409  __Pyx_DECREF_SET(__pyx_t_1, function);
2410  }
2411  }
2412  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8);
2413  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
2414  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
2415  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error)
2416  __Pyx_GOTREF(__pyx_t_2);
2417  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2418  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_toar, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
2419  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2420 
2421  /* "dtocean.pyx":40
2422  * self.toab = np.zeros((NWL,NBIG,NAOT,NWS,NSZA,NVZA,NRAA))
2423  * self.toar = np.zeros((NWL,NWS,NSZA,NVZA,NRAA))
2424  * self.taus = np.zeros((NWL,NSMALL,NAOT)) # <<<<<<<<<<<<<<
2425  * self.taub = np.zeros((NWL,NBIG,NAOT))
2426  * try:
2427  */
2428  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
2429  __Pyx_GOTREF(__pyx_t_1);
2430  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 40, __pyx_L1_error)
2431  __Pyx_GOTREF(__pyx_t_8);
2432  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2433  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NWL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
2434  __Pyx_GOTREF(__pyx_t_1);
2435  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NSMALL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 40, __pyx_L1_error)
2436  __Pyx_GOTREF(__pyx_t_7);
2437  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NAOT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 40, __pyx_L1_error)
2438  __Pyx_GOTREF(__pyx_t_6);
2439  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 40, __pyx_L1_error)
2440  __Pyx_GOTREF(__pyx_t_5);
2441  __Pyx_GIVEREF(__pyx_t_1);
2442  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
2443  __Pyx_GIVEREF(__pyx_t_7);
2444  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7);
2445  __Pyx_GIVEREF(__pyx_t_6);
2446  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_6);
2447  __pyx_t_1 = 0;
2448  __pyx_t_7 = 0;
2449  __pyx_t_6 = 0;
2450  __pyx_t_6 = NULL;
2451  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
2452  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
2453  if (likely(__pyx_t_6)) {
2454  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
2455  __Pyx_INCREF(__pyx_t_6);
2456  __Pyx_INCREF(function);
2457  __Pyx_DECREF_SET(__pyx_t_8, function);
2458  }
2459  }
2460  __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5);
2461  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
2462  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2463  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
2464  __Pyx_GOTREF(__pyx_t_2);
2465  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
2466  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_taus, __pyx_t_2) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
2467  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2468 
2469  /* "dtocean.pyx":41
2470  * self.toar = np.zeros((NWL,NWS,NSZA,NVZA,NRAA))
2471  * self.taus = np.zeros((NWL,NSMALL,NAOT))
2472  * self.taub = np.zeros((NWL,NBIG,NAOT)) # <<<<<<<<<<<<<<
2473  * try:
2474  * self.toas=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['AINTS'].values
2475  */
2476  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 41, __pyx_L1_error)
2477  __Pyx_GOTREF(__pyx_t_8);
2478  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 41, __pyx_L1_error)
2479  __Pyx_GOTREF(__pyx_t_5);
2480  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
2481  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_NWL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 41, __pyx_L1_error)
2482  __Pyx_GOTREF(__pyx_t_8);
2483  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NBIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 41, __pyx_L1_error)
2484  __Pyx_GOTREF(__pyx_t_6);
2485  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NAOT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 41, __pyx_L1_error)
2486  __Pyx_GOTREF(__pyx_t_7);
2487  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error)
2488  __Pyx_GOTREF(__pyx_t_1);
2489  __Pyx_GIVEREF(__pyx_t_8);
2490  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8);
2491  __Pyx_GIVEREF(__pyx_t_6);
2492  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
2493  __Pyx_GIVEREF(__pyx_t_7);
2494  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_7);
2495  __pyx_t_8 = 0;
2496  __pyx_t_6 = 0;
2497  __pyx_t_7 = 0;
2498  __pyx_t_7 = NULL;
2499  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
2500  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
2501  if (likely(__pyx_t_7)) {
2502  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
2503  __Pyx_INCREF(__pyx_t_7);
2504  __Pyx_INCREF(function);
2505  __Pyx_DECREF_SET(__pyx_t_5, function);
2506  }
2507  }
2508  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1);
2509  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
2510  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2511  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
2512  __Pyx_GOTREF(__pyx_t_2);
2513  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2514  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_taub, __pyx_t_2) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
2515  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2516 
2517  /* "dtocean.pyx":42
2518  * self.taus = np.zeros((NWL,NSMALL,NAOT))
2519  * self.taub = np.zeros((NWL,NBIG,NAOT))
2520  * try: # <<<<<<<<<<<<<<
2521  * self.toas=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['AINTS'].values
2522  * self.toab=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['AINTB'].values
2523  */
2524  {
2525  __Pyx_PyThreadState_declare
2526  __Pyx_PyThreadState_assign
2527  __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
2528  __Pyx_XGOTREF(__pyx_t_11);
2529  __Pyx_XGOTREF(__pyx_t_12);
2530  __Pyx_XGOTREF(__pyx_t_13);
2531  /*try:*/ {
2532 
2533  /* "dtocean.pyx":43
2534  * self.taub = np.zeros((NWL,NBIG,NAOT))
2535  * try:
2536  * self.toas=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['AINTS'].values # <<<<<<<<<<<<<<
2537  * self.toab=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['AINTB'].values
2538  * self.toar=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['REF_RAYALL'].values
2539  */
2540  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_xr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L3_error)
2541  __Pyx_GOTREF(__pyx_t_2);
2542  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 43, __pyx_L3_error)
2543  __Pyx_GOTREF(__pyx_t_5);
2544  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2545  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L3_error)
2546  __Pyx_GOTREF(__pyx_t_2);
2547  __Pyx_INCREF(__pyx_v_lut_filepath);
2548  __Pyx_GIVEREF(__pyx_v_lut_filepath);
2549  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lut_filepath);
2550  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L3_error)
2551  __Pyx_GOTREF(__pyx_t_1);
2552  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL) < 0) __PYX_ERR(0, 43, __pyx_L3_error)
2553  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 43, __pyx_L3_error)
2554  __Pyx_GOTREF(__pyx_t_7);
2555  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2556  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2557  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2558  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_7, __pyx_n_u_AINTS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L3_error)
2559  __Pyx_GOTREF(__pyx_t_1);
2560  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2561  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 43, __pyx_L3_error)
2562  __Pyx_GOTREF(__pyx_t_7);
2563  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2564  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_toas, __pyx_t_7) < 0) __PYX_ERR(0, 43, __pyx_L3_error)
2565  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2566 
2567  /* "dtocean.pyx":44
2568  * try:
2569  * self.toas=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['AINTS'].values
2570  * self.toab=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['AINTB'].values # <<<<<<<<<<<<<<
2571  * self.toar=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['REF_RAYALL'].values
2572  * self.taus=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['TAUAS'].values
2573  */
2574  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_xr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 44, __pyx_L3_error)
2575  __Pyx_GOTREF(__pyx_t_7);
2576  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L3_error)
2577  __Pyx_GOTREF(__pyx_t_1);
2578  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2579  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 44, __pyx_L3_error)
2580  __Pyx_GOTREF(__pyx_t_7);
2581  __Pyx_INCREF(__pyx_v_lut_filepath);
2582  __Pyx_GIVEREF(__pyx_v_lut_filepath);
2583  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_lut_filepath);
2584  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L3_error)
2585  __Pyx_GOTREF(__pyx_t_2);
2586  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL) < 0) __PYX_ERR(0, 44, __pyx_L3_error)
2587  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 44, __pyx_L3_error)
2588  __Pyx_GOTREF(__pyx_t_5);
2589  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2590  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2591  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2592  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_n_u_AINTB); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L3_error)
2593  __Pyx_GOTREF(__pyx_t_2);
2594  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2595  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 44, __pyx_L3_error)
2596  __Pyx_GOTREF(__pyx_t_5);
2597  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2598  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_toab, __pyx_t_5) < 0) __PYX_ERR(0, 44, __pyx_L3_error)
2599  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2600 
2601  /* "dtocean.pyx":45
2602  * self.toas=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['AINTS'].values
2603  * self.toab=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['AINTB'].values
2604  * self.toar=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['REF_RAYALL'].values # <<<<<<<<<<<<<<
2605  * self.taus=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['TAUAS'].values
2606  * self.taub=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['TAUAB'].values
2607  */
2608  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_xr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 45, __pyx_L3_error)
2609  __Pyx_GOTREF(__pyx_t_5);
2610  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L3_error)
2611  __Pyx_GOTREF(__pyx_t_2);
2612  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2613  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 45, __pyx_L3_error)
2614  __Pyx_GOTREF(__pyx_t_5);
2615  __Pyx_INCREF(__pyx_v_lut_filepath);
2616  __Pyx_GIVEREF(__pyx_v_lut_filepath);
2617  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_lut_filepath);
2618  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 45, __pyx_L3_error)
2619  __Pyx_GOTREF(__pyx_t_7);
2620  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL) < 0) __PYX_ERR(0, 45, __pyx_L3_error)
2621  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L3_error)
2622  __Pyx_GOTREF(__pyx_t_1);
2623  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2624  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2625  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2626  __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_REF_RAYALL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 45, __pyx_L3_error)
2627  __Pyx_GOTREF(__pyx_t_7);
2628  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2629  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L3_error)
2630  __Pyx_GOTREF(__pyx_t_1);
2631  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2632  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_toar, __pyx_t_1) < 0) __PYX_ERR(0, 45, __pyx_L3_error)
2633  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2634 
2635  /* "dtocean.pyx":46
2636  * self.toab=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['AINTB'].values
2637  * self.toar=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['REF_RAYALL'].values
2638  * self.taus=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['TAUAS'].values # <<<<<<<<<<<<<<
2639  * self.taub=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['TAUAB'].values
2640  * self.wl_pts=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['WAVE'].values
2641  */
2642  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_xr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L3_error)
2643  __Pyx_GOTREF(__pyx_t_1);
2644  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L3_error)
2645  __Pyx_GOTREF(__pyx_t_7);
2646  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2647  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L3_error)
2648  __Pyx_GOTREF(__pyx_t_1);
2649  __Pyx_INCREF(__pyx_v_lut_filepath);
2650  __Pyx_GIVEREF(__pyx_v_lut_filepath);
2651  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_lut_filepath);
2652  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 46, __pyx_L3_error)
2653  __Pyx_GOTREF(__pyx_t_5);
2654  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL) < 0) __PYX_ERR(0, 46, __pyx_L3_error)
2655  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L3_error)
2656  __Pyx_GOTREF(__pyx_t_2);
2657  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2658  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2659  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2660  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_TAUAS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 46, __pyx_L3_error)
2661  __Pyx_GOTREF(__pyx_t_5);
2662  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2663  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L3_error)
2664  __Pyx_GOTREF(__pyx_t_2);
2665  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2666  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_taus, __pyx_t_2) < 0) __PYX_ERR(0, 46, __pyx_L3_error)
2667  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2668 
2669  /* "dtocean.pyx":47
2670  * self.toar=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['REF_RAYALL'].values
2671  * self.taus=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['TAUAS'].values
2672  * self.taub=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['TAUAB'].values # <<<<<<<<<<<<<<
2673  * self.wl_pts=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['WAVE'].values
2674  * self.raa_pts=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['PHC'].values
2675  */
2676  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_xr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L3_error)
2677  __Pyx_GOTREF(__pyx_t_2);
2678  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 47, __pyx_L3_error)
2679  __Pyx_GOTREF(__pyx_t_5);
2680  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2681  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L3_error)
2682  __Pyx_GOTREF(__pyx_t_2);
2683  __Pyx_INCREF(__pyx_v_lut_filepath);
2684  __Pyx_GIVEREF(__pyx_v_lut_filepath);
2685  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lut_filepath);
2686  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L3_error)
2687  __Pyx_GOTREF(__pyx_t_1);
2688  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL) < 0) __PYX_ERR(0, 47, __pyx_L3_error)
2689  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 47, __pyx_L3_error)
2690  __Pyx_GOTREF(__pyx_t_7);
2691  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2692  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2693  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2694  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_7, __pyx_n_u_TAUAB); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L3_error)
2695  __Pyx_GOTREF(__pyx_t_1);
2696  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2697  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 47, __pyx_L3_error)
2698  __Pyx_GOTREF(__pyx_t_7);
2699  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2700  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_taub, __pyx_t_7) < 0) __PYX_ERR(0, 47, __pyx_L3_error)
2701  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2702 
2703  /* "dtocean.pyx":48
2704  * self.taus=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['TAUAS'].values
2705  * self.taub=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['TAUAB'].values
2706  * self.wl_pts=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['WAVE'].values # <<<<<<<<<<<<<<
2707  * self.raa_pts=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['PHC'].values
2708  * self.vza_pts=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['THET'].values
2709  */
2710  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_xr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 48, __pyx_L3_error)
2711  __Pyx_GOTREF(__pyx_t_7);
2712  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L3_error)
2713  __Pyx_GOTREF(__pyx_t_1);
2714  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2715  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 48, __pyx_L3_error)
2716  __Pyx_GOTREF(__pyx_t_7);
2717  __Pyx_INCREF(__pyx_v_lut_filepath);
2718  __Pyx_GIVEREF(__pyx_v_lut_filepath);
2719  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_lut_filepath);
2720  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L3_error)
2721  __Pyx_GOTREF(__pyx_t_2);
2722  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL) < 0) __PYX_ERR(0, 48, __pyx_L3_error)
2723  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 48, __pyx_L3_error)
2724  __Pyx_GOTREF(__pyx_t_5);
2725  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2726  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2727  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2728  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_n_u_WAVE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L3_error)
2729  __Pyx_GOTREF(__pyx_t_2);
2730  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2731  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 48, __pyx_L3_error)
2732  __Pyx_GOTREF(__pyx_t_5);
2733  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2734  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wl_pts, __pyx_t_5) < 0) __PYX_ERR(0, 48, __pyx_L3_error)
2735  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2736 
2737  /* "dtocean.pyx":49
2738  * self.taub=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['TAUAB'].values
2739  * self.wl_pts=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['WAVE'].values
2740  * self.raa_pts=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['PHC'].values # <<<<<<<<<<<<<<
2741  * self.vza_pts=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['THET'].values
2742  * self.sza_pts=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['THET0'].values
2743  */
2744  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_xr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 49, __pyx_L3_error)
2745  __Pyx_GOTREF(__pyx_t_5);
2746  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L3_error)
2747  __Pyx_GOTREF(__pyx_t_2);
2748  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2749  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 49, __pyx_L3_error)
2750  __Pyx_GOTREF(__pyx_t_5);
2751  __Pyx_INCREF(__pyx_v_lut_filepath);
2752  __Pyx_GIVEREF(__pyx_v_lut_filepath);
2753  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_lut_filepath);
2754  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 49, __pyx_L3_error)
2755  __Pyx_GOTREF(__pyx_t_7);
2756  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL) < 0) __PYX_ERR(0, 49, __pyx_L3_error)
2757  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L3_error)
2758  __Pyx_GOTREF(__pyx_t_1);
2759  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2760  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2761  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2762  __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_PHC); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 49, __pyx_L3_error)
2763  __Pyx_GOTREF(__pyx_t_7);
2764  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2765  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L3_error)
2766  __Pyx_GOTREF(__pyx_t_1);
2767  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2768  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_raa_pts, __pyx_t_1) < 0) __PYX_ERR(0, 49, __pyx_L3_error)
2769  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2770 
2771  /* "dtocean.pyx":50
2772  * self.wl_pts=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['WAVE'].values
2773  * self.raa_pts=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['PHC'].values
2774  * self.vza_pts=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['THET'].values # <<<<<<<<<<<<<<
2775  * self.sza_pts=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['THET0'].values
2776  * self.taus = np.transpose(self.taus,(0,1,2))
2777  */
2778  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_xr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L3_error)
2779  __Pyx_GOTREF(__pyx_t_1);
2780  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 50, __pyx_L3_error)
2781  __Pyx_GOTREF(__pyx_t_7);
2782  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2783  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L3_error)
2784  __Pyx_GOTREF(__pyx_t_1);
2785  __Pyx_INCREF(__pyx_v_lut_filepath);
2786  __Pyx_GIVEREF(__pyx_v_lut_filepath);
2787  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_lut_filepath);
2788  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 50, __pyx_L3_error)
2789  __Pyx_GOTREF(__pyx_t_5);
2790  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL) < 0) __PYX_ERR(0, 50, __pyx_L3_error)
2791  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L3_error)
2792  __Pyx_GOTREF(__pyx_t_2);
2793  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2794  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2795  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2796  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_THET); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 50, __pyx_L3_error)
2797  __Pyx_GOTREF(__pyx_t_5);
2798  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2799  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L3_error)
2800  __Pyx_GOTREF(__pyx_t_2);
2801  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2802  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_vza_pts, __pyx_t_2) < 0) __PYX_ERR(0, 50, __pyx_L3_error)
2803  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2804 
2805  /* "dtocean.pyx":51
2806  * self.raa_pts=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['PHC'].values
2807  * self.vza_pts=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['THET'].values
2808  * self.sza_pts=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['THET0'].values # <<<<<<<<<<<<<<
2809  * self.taus = np.transpose(self.taus,(0,1,2))
2810  * self.taub = np.transpose(self.taub,(0,1,2))
2811  */
2812  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_xr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L3_error)
2813  __Pyx_GOTREF(__pyx_t_2);
2814  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 51, __pyx_L3_error)
2815  __Pyx_GOTREF(__pyx_t_5);
2816  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2817  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L3_error)
2818  __Pyx_GOTREF(__pyx_t_2);
2819  __Pyx_INCREF(__pyx_v_lut_filepath);
2820  __Pyx_GIVEREF(__pyx_v_lut_filepath);
2821  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lut_filepath);
2822  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L3_error)
2823  __Pyx_GOTREF(__pyx_t_1);
2824  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL) < 0) __PYX_ERR(0, 51, __pyx_L3_error)
2825  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 51, __pyx_L3_error)
2826  __Pyx_GOTREF(__pyx_t_7);
2827  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2828  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2829  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2830  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_7, __pyx_n_u_THET0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L3_error)
2831  __Pyx_GOTREF(__pyx_t_1);
2832  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2833  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 51, __pyx_L3_error)
2834  __Pyx_GOTREF(__pyx_t_7);
2835  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2836  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sza_pts, __pyx_t_7) < 0) __PYX_ERR(0, 51, __pyx_L3_error)
2837  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2838 
2839  /* "dtocean.pyx":52
2840  * self.vza_pts=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['THET'].values
2841  * self.sza_pts=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['THET0'].values
2842  * self.taus = np.transpose(self.taus,(0,1,2)) # <<<<<<<<<<<<<<
2843  * self.taub = np.transpose(self.taub,(0,1,2))
2844  * self.toas = np.transpose(self.toas,(3,4,5,6,0,1,2))
2845  */
2846  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L3_error)
2847  __Pyx_GOTREF(__pyx_t_1);
2848  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_transpose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L3_error)
2849  __Pyx_GOTREF(__pyx_t_2);
2850  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2851  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_taus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L3_error)
2852  __Pyx_GOTREF(__pyx_t_1);
2853  __pyx_t_5 = NULL;
2854  __pyx_t_14 = 0;
2855  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
2856  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
2857  if (likely(__pyx_t_5)) {
2858  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
2859  __Pyx_INCREF(__pyx_t_5);
2860  __Pyx_INCREF(function);
2861  __Pyx_DECREF_SET(__pyx_t_2, function);
2862  __pyx_t_14 = 1;
2863  }
2864  }
2865  #if CYTHON_FAST_PYCALL
2866  if (PyFunction_Check(__pyx_t_2)) {
2867  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_tuple_};
2868  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L3_error)
2869  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
2870  __Pyx_GOTREF(__pyx_t_7);
2871  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2872  } else
2873  #endif
2874  #if CYTHON_FAST_PYCCALL
2875  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
2876  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_tuple_};
2877  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L3_error)
2878  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
2879  __Pyx_GOTREF(__pyx_t_7);
2880  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2881  } else
2882  #endif
2883  {
2884  __pyx_t_6 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 52, __pyx_L3_error)
2885  __Pyx_GOTREF(__pyx_t_6);
2886  if (__pyx_t_5) {
2887  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
2888  }
2889  __Pyx_GIVEREF(__pyx_t_1);
2890  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_14, __pyx_t_1);
2891  __Pyx_INCREF(__pyx_tuple_);
2892  __Pyx_GIVEREF(__pyx_tuple_);
2893  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_14, __pyx_tuple_);
2894  __pyx_t_1 = 0;
2895  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L3_error)
2896  __Pyx_GOTREF(__pyx_t_7);
2897  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
2898  }
2899  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2900  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_taus, __pyx_t_7) < 0) __PYX_ERR(0, 52, __pyx_L3_error)
2901  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2902 
2903  /* "dtocean.pyx":53
2904  * self.sza_pts=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['THET0'].values
2905  * self.taus = np.transpose(self.taus,(0,1,2))
2906  * self.taub = np.transpose(self.taub,(0,1,2)) # <<<<<<<<<<<<<<
2907  * self.toas = np.transpose(self.toas,(3,4,5,6,0,1,2))
2908  * self.toab = np.transpose(self.toab,(3,4,5,6,0,1,2))
2909  */
2910  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L3_error)
2911  __Pyx_GOTREF(__pyx_t_2);
2912  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_transpose); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 53, __pyx_L3_error)
2913  __Pyx_GOTREF(__pyx_t_6);
2914  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2915  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_taub); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L3_error)
2916  __Pyx_GOTREF(__pyx_t_2);
2917  __pyx_t_1 = NULL;
2918  __pyx_t_14 = 0;
2919  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
2920  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
2921  if (likely(__pyx_t_1)) {
2922  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
2923  __Pyx_INCREF(__pyx_t_1);
2924  __Pyx_INCREF(function);
2925  __Pyx_DECREF_SET(__pyx_t_6, function);
2926  __pyx_t_14 = 1;
2927  }
2928  }
2929  #if CYTHON_FAST_PYCALL
2930  if (PyFunction_Check(__pyx_t_6)) {
2931  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_2, __pyx_tuple_};
2932  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 53, __pyx_L3_error)
2933  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
2934  __Pyx_GOTREF(__pyx_t_7);
2935  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2936  } else
2937  #endif
2938  #if CYTHON_FAST_PYCCALL
2939  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
2940  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_2, __pyx_tuple_};
2941  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 53, __pyx_L3_error)
2942  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
2943  __Pyx_GOTREF(__pyx_t_7);
2944  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2945  } else
2946  #endif
2947  {
2948  __pyx_t_5 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 53, __pyx_L3_error)
2949  __Pyx_GOTREF(__pyx_t_5);
2950  if (__pyx_t_1) {
2951  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL;
2952  }
2953  __Pyx_GIVEREF(__pyx_t_2);
2954  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_14, __pyx_t_2);
2955  __Pyx_INCREF(__pyx_tuple_);
2956  __Pyx_GIVEREF(__pyx_tuple_);
2957  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_14, __pyx_tuple_);
2958  __pyx_t_2 = 0;
2959  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 53, __pyx_L3_error)
2960  __Pyx_GOTREF(__pyx_t_7);
2961  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2962  }
2963  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
2964  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_taub, __pyx_t_7) < 0) __PYX_ERR(0, 53, __pyx_L3_error)
2965  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2966 
2967  /* "dtocean.pyx":54
2968  * self.taus = np.transpose(self.taus,(0,1,2))
2969  * self.taub = np.transpose(self.taub,(0,1,2))
2970  * self.toas = np.transpose(self.toas,(3,4,5,6,0,1,2)) # <<<<<<<<<<<<<<
2971  * self.toab = np.transpose(self.toab,(3,4,5,6,0,1,2))
2972  * self.toar = np.transpose(self.toar,(1,2,3,4,0))
2973  */
2974  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 54, __pyx_L3_error)
2975  __Pyx_GOTREF(__pyx_t_6);
2976  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_transpose); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 54, __pyx_L3_error)
2977  __Pyx_GOTREF(__pyx_t_5);
2978  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
2979  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_toas); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 54, __pyx_L3_error)
2980  __Pyx_GOTREF(__pyx_t_6);
2981  __pyx_t_2 = NULL;
2982  __pyx_t_14 = 0;
2983  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
2984  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
2985  if (likely(__pyx_t_2)) {
2986  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
2987  __Pyx_INCREF(__pyx_t_2);
2988  __Pyx_INCREF(function);
2989  __Pyx_DECREF_SET(__pyx_t_5, function);
2990  __pyx_t_14 = 1;
2991  }
2992  }
2993  #if CYTHON_FAST_PYCALL
2994  if (PyFunction_Check(__pyx_t_5)) {
2995  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_6, __pyx_tuple__2};
2996  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 54, __pyx_L3_error)
2997  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
2998  __Pyx_GOTREF(__pyx_t_7);
2999  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3000  } else
3001  #endif
3002  #if CYTHON_FAST_PYCCALL
3003  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
3004  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_6, __pyx_tuple__2};
3005  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 54, __pyx_L3_error)
3006  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
3007  __Pyx_GOTREF(__pyx_t_7);
3008  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3009  } else
3010  #endif
3011  {
3012  __pyx_t_1 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L3_error)
3013  __Pyx_GOTREF(__pyx_t_1);
3014  if (__pyx_t_2) {
3015  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = NULL;
3016  }
3017  __Pyx_GIVEREF(__pyx_t_6);
3018  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_14, __pyx_t_6);
3019  __Pyx_INCREF(__pyx_tuple__2);
3020  __Pyx_GIVEREF(__pyx_tuple__2);
3021  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_14, __pyx_tuple__2);
3022  __pyx_t_6 = 0;
3023  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 54, __pyx_L3_error)
3024  __Pyx_GOTREF(__pyx_t_7);
3025  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3026  }
3027  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3028  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_toas, __pyx_t_7) < 0) __PYX_ERR(0, 54, __pyx_L3_error)
3029  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3030 
3031  /* "dtocean.pyx":55
3032  * self.taub = np.transpose(self.taub,(0,1,2))
3033  * self.toas = np.transpose(self.toas,(3,4,5,6,0,1,2))
3034  * self.toab = np.transpose(self.toab,(3,4,5,6,0,1,2)) # <<<<<<<<<<<<<<
3035  * self.toar = np.transpose(self.toar,(1,2,3,4,0))
3036  * self.wnd_pts = np.array([0.0, 6.0, 10.0, 16.0])
3037  */
3038  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 55, __pyx_L3_error)
3039  __Pyx_GOTREF(__pyx_t_5);
3040  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_transpose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L3_error)
3041  __Pyx_GOTREF(__pyx_t_1);
3042  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3043  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_toab); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 55, __pyx_L3_error)
3044  __Pyx_GOTREF(__pyx_t_5);
3045  __pyx_t_6 = NULL;
3046  __pyx_t_14 = 0;
3047  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
3048  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
3049  if (likely(__pyx_t_6)) {
3050  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
3051  __Pyx_INCREF(__pyx_t_6);
3052  __Pyx_INCREF(function);
3053  __Pyx_DECREF_SET(__pyx_t_1, function);
3054  __pyx_t_14 = 1;
3055  }
3056  }
3057  #if CYTHON_FAST_PYCALL
3058  if (PyFunction_Check(__pyx_t_1)) {
3059  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_tuple__2};
3060  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 55, __pyx_L3_error)
3061  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
3062  __Pyx_GOTREF(__pyx_t_7);
3063  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3064  } else
3065  #endif
3066  #if CYTHON_FAST_PYCCALL
3067  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
3068  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_tuple__2};
3069  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 55, __pyx_L3_error)
3070  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
3071  __Pyx_GOTREF(__pyx_t_7);
3072  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3073  } else
3074  #endif
3075  {
3076  __pyx_t_2 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L3_error)
3077  __Pyx_GOTREF(__pyx_t_2);
3078  if (__pyx_t_6) {
3079  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __pyx_t_6 = NULL;
3080  }
3081  __Pyx_GIVEREF(__pyx_t_5);
3082  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_14, __pyx_t_5);
3083  __Pyx_INCREF(__pyx_tuple__2);
3084  __Pyx_GIVEREF(__pyx_tuple__2);
3085  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_14, __pyx_tuple__2);
3086  __pyx_t_5 = 0;
3087  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 55, __pyx_L3_error)
3088  __Pyx_GOTREF(__pyx_t_7);
3089  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3090  }
3091  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3092  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_toab, __pyx_t_7) < 0) __PYX_ERR(0, 55, __pyx_L3_error)
3093  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3094 
3095  /* "dtocean.pyx":56
3096  * self.toas = np.transpose(self.toas,(3,4,5,6,0,1,2))
3097  * self.toab = np.transpose(self.toab,(3,4,5,6,0,1,2))
3098  * self.toar = np.transpose(self.toar,(1,2,3,4,0)) # <<<<<<<<<<<<<<
3099  * self.wnd_pts = np.array([0.0, 6.0, 10.0, 16.0])
3100  * self.tau_pts = (self.taus[W550,0,:])
3101  */
3102  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L3_error)
3103  __Pyx_GOTREF(__pyx_t_1);
3104  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_transpose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L3_error)
3105  __Pyx_GOTREF(__pyx_t_2);
3106  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3107  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_toar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L3_error)
3108  __Pyx_GOTREF(__pyx_t_1);
3109  __pyx_t_5 = NULL;
3110  __pyx_t_14 = 0;
3111  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
3112  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
3113  if (likely(__pyx_t_5)) {
3114  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
3115  __Pyx_INCREF(__pyx_t_5);
3116  __Pyx_INCREF(function);
3117  __Pyx_DECREF_SET(__pyx_t_2, function);
3118  __pyx_t_14 = 1;
3119  }
3120  }
3121  #if CYTHON_FAST_PYCALL
3122  if (PyFunction_Check(__pyx_t_2)) {
3123  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_tuple__3};
3124  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 56, __pyx_L3_error)
3125  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3126  __Pyx_GOTREF(__pyx_t_7);
3127  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3128  } else
3129  #endif
3130  #if CYTHON_FAST_PYCCALL
3131  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
3132  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_tuple__3};
3133  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 56, __pyx_L3_error)
3134  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3135  __Pyx_GOTREF(__pyx_t_7);
3136  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3137  } else
3138  #endif
3139  {
3140  __pyx_t_6 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 56, __pyx_L3_error)
3141  __Pyx_GOTREF(__pyx_t_6);
3142  if (__pyx_t_5) {
3143  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
3144  }
3145  __Pyx_GIVEREF(__pyx_t_1);
3146  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_14, __pyx_t_1);
3147  __Pyx_INCREF(__pyx_tuple__3);
3148  __Pyx_GIVEREF(__pyx_tuple__3);
3149  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_14, __pyx_tuple__3);
3150  __pyx_t_1 = 0;
3151  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 56, __pyx_L3_error)
3152  __Pyx_GOTREF(__pyx_t_7);
3153  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3154  }
3155  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3156  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_toar, __pyx_t_7) < 0) __PYX_ERR(0, 56, __pyx_L3_error)
3157  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3158 
3159  /* "dtocean.pyx":57
3160  * self.toab = np.transpose(self.toab,(3,4,5,6,0,1,2))
3161  * self.toar = np.transpose(self.toar,(1,2,3,4,0))
3162  * self.wnd_pts = np.array([0.0, 6.0, 10.0, 16.0]) # <<<<<<<<<<<<<<
3163  * self.tau_pts = (self.taus[W550,0,:])
3164  * self.pts = (self.wnd_pts, self.sza_pts, self.vza_pts, self.raa_pts)
3165  */
3166  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L3_error)
3167  __Pyx_GOTREF(__pyx_t_2);
3168  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 57, __pyx_L3_error)
3169  __Pyx_GOTREF(__pyx_t_6);
3170  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3171  __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L3_error)
3172  __Pyx_GOTREF(__pyx_t_2);
3173  __Pyx_INCREF(__pyx_float_0_0);
3174  __Pyx_GIVEREF(__pyx_float_0_0);
3175  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_float_0_0);
3176  __Pyx_INCREF(__pyx_float_6_0);
3177  __Pyx_GIVEREF(__pyx_float_6_0);
3178  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_float_6_0);
3179  __Pyx_INCREF(__pyx_float_10_0);
3180  __Pyx_GIVEREF(__pyx_float_10_0);
3181  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_float_10_0);
3182  __Pyx_INCREF(__pyx_float_16_0);
3183  __Pyx_GIVEREF(__pyx_float_16_0);
3184  PyList_SET_ITEM(__pyx_t_2, 3, __pyx_float_16_0);
3185  __pyx_t_1 = NULL;
3186  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
3187  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
3188  if (likely(__pyx_t_1)) {
3189  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
3190  __Pyx_INCREF(__pyx_t_1);
3191  __Pyx_INCREF(function);
3192  __Pyx_DECREF_SET(__pyx_t_6, function);
3193  }
3194  }
3195  __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2);
3196  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
3197  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3198  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 57, __pyx_L3_error)
3199  __Pyx_GOTREF(__pyx_t_7);
3200  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3201  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wnd_pts, __pyx_t_7) < 0) __PYX_ERR(0, 57, __pyx_L3_error)
3202  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3203 
3204  /* "dtocean.pyx":58
3205  * self.toar = np.transpose(self.toar,(1,2,3,4,0))
3206  * self.wnd_pts = np.array([0.0, 6.0, 10.0, 16.0])
3207  * self.tau_pts = (self.taus[W550,0,:]) # <<<<<<<<<<<<<<
3208  * self.pts = (self.wnd_pts, self.sza_pts, self.vza_pts, self.raa_pts)
3209  * except Exception as inst:
3210  */
3211  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_taus); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 58, __pyx_L3_error)
3212  __Pyx_GOTREF(__pyx_t_7);
3213  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_W550); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 58, __pyx_L3_error)
3214  __Pyx_GOTREF(__pyx_t_6);
3215  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L3_error)
3216  __Pyx_GOTREF(__pyx_t_2);
3217  __Pyx_GIVEREF(__pyx_t_6);
3218  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
3219  __Pyx_INCREF(__pyx_int_0);
3220  __Pyx_GIVEREF(__pyx_int_0);
3221  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_0);
3222  __Pyx_INCREF(__pyx_slice__4);
3223  __Pyx_GIVEREF(__pyx_slice__4);
3224  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_slice__4);
3225  __pyx_t_6 = 0;
3226  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 58, __pyx_L3_error)
3227  __Pyx_GOTREF(__pyx_t_6);
3228  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3229  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3230  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tau_pts, __pyx_t_6) < 0) __PYX_ERR(0, 58, __pyx_L3_error)
3231  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3232 
3233  /* "dtocean.pyx":59
3234  * self.wnd_pts = np.array([0.0, 6.0, 10.0, 16.0])
3235  * self.tau_pts = (self.taus[W550,0,:])
3236  * self.pts = (self.wnd_pts, self.sza_pts, self.vza_pts, self.raa_pts) # <<<<<<<<<<<<<<
3237  * except Exception as inst:
3238  * print(type(inst))
3239  */
3240  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wnd_pts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 59, __pyx_L3_error)
3241  __Pyx_GOTREF(__pyx_t_6);
3242  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_sza_pts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L3_error)
3243  __Pyx_GOTREF(__pyx_t_2);
3244  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_vza_pts); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 59, __pyx_L3_error)
3245  __Pyx_GOTREF(__pyx_t_7);
3246  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_raa_pts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L3_error)
3247  __Pyx_GOTREF(__pyx_t_1);
3248  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 59, __pyx_L3_error)
3249  __Pyx_GOTREF(__pyx_t_5);
3250  __Pyx_GIVEREF(__pyx_t_6);
3251  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
3252  __Pyx_GIVEREF(__pyx_t_2);
3253  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
3254  __Pyx_GIVEREF(__pyx_t_7);
3255  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_7);
3256  __Pyx_GIVEREF(__pyx_t_1);
3257  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_1);
3258  __pyx_t_6 = 0;
3259  __pyx_t_2 = 0;
3260  __pyx_t_7 = 0;
3261  __pyx_t_1 = 0;
3262  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pts, __pyx_t_5) < 0) __PYX_ERR(0, 59, __pyx_L3_error)
3263  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3264 
3265  /* "dtocean.pyx":42
3266  * self.taus = np.zeros((NWL,NSMALL,NAOT))
3267  * self.taub = np.zeros((NWL,NBIG,NAOT))
3268  * try: # <<<<<<<<<<<<<<
3269  * self.toas=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['AINTS'].values
3270  * self.toab=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['AINTB'].values
3271  */
3272  }
3273  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
3274  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
3275  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
3276  goto __pyx_L8_try_end;
3277  __pyx_L3_error:;
3278  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
3279  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3280  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
3281  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3282  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3283  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3284  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
3285  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
3286  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3287  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3288 
3289  /* "dtocean.pyx":60
3290  * self.tau_pts = (self.taus[W550,0,:])
3291  * self.pts = (self.wnd_pts, self.sza_pts, self.vza_pts, self.raa_pts)
3292  * except Exception as inst: # <<<<<<<<<<<<<<
3293  * print(type(inst))
3294  * print(inst)
3295  */
3296  __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
3297  if (__pyx_t_14) {
3298  __Pyx_AddTraceback("dtocean.dtocean.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3299  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(0, 60, __pyx_L5_except_error)
3300  __Pyx_GOTREF(__pyx_t_5);
3301  __Pyx_GOTREF(__pyx_t_1);
3302  __Pyx_GOTREF(__pyx_t_7);
3303  __Pyx_INCREF(__pyx_t_1);
3304  __pyx_v_inst = __pyx_t_1;
3305  /*try:*/ {
3306 
3307  /* "dtocean.pyx":61
3308  * self.pts = (self.wnd_pts, self.sza_pts, self.vza_pts, self.raa_pts)
3309  * except Exception as inst:
3310  * print(type(inst)) # <<<<<<<<<<<<<<
3311  * print(inst)
3312  * print ("Unable to read LUT file ... exiting")
3313  */
3314  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, ((PyObject *)Py_TYPE(__pyx_v_inst))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L14_error)
3315  __Pyx_GOTREF(__pyx_t_2);
3316  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3317 
3318  /* "dtocean.pyx":62
3319  * except Exception as inst:
3320  * print(type(inst))
3321  * print(inst) # <<<<<<<<<<<<<<
3322  * print ("Unable to read LUT file ... exiting")
3323  * sys.exit()
3324  */
3325  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v_inst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L14_error)
3326  __Pyx_GOTREF(__pyx_t_2);
3327  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3328 
3329  /* "dtocean.pyx":63
3330  * print(type(inst))
3331  * print(inst)
3332  * print ("Unable to read LUT file ... exiting") # <<<<<<<<<<<<<<
3333  * sys.exit()
3334  *
3335  */
3336  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L14_error)
3337  __Pyx_GOTREF(__pyx_t_2);
3338  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3339 
3340  /* "dtocean.pyx":64
3341  * print(inst)
3342  * print ("Unable to read LUT file ... exiting")
3343  * sys.exit() # <<<<<<<<<<<<<<
3344  *
3345  *
3346  */
3347  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 64, __pyx_L14_error)
3348  __Pyx_GOTREF(__pyx_t_6);
3349  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_exit); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 64, __pyx_L14_error)
3350  __Pyx_GOTREF(__pyx_t_8);
3351  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3352  __pyx_t_6 = NULL;
3353  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
3354  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
3355  if (likely(__pyx_t_6)) {
3356  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
3357  __Pyx_INCREF(__pyx_t_6);
3358  __Pyx_INCREF(function);
3359  __Pyx_DECREF_SET(__pyx_t_8, function);
3360  }
3361  }
3362  __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
3363  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
3364  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L14_error)
3365  __Pyx_GOTREF(__pyx_t_2);
3366  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
3367  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3368  }
3369 
3370  /* "dtocean.pyx":60
3371  * self.tau_pts = (self.taus[W550,0,:])
3372  * self.pts = (self.wnd_pts, self.sza_pts, self.vza_pts, self.raa_pts)
3373  * except Exception as inst: # <<<<<<<<<<<<<<
3374  * print(type(inst))
3375  * print(inst)
3376  */
3377  /*finally:*/ {
3378  /*normal exit:*/{
3379  __Pyx_DECREF(__pyx_v_inst);
3380  __pyx_v_inst = NULL;
3381  goto __pyx_L15;
3382  }
3383  __pyx_L14_error:;
3384  /*exception exit:*/{
3385  __Pyx_PyThreadState_declare
3386  __Pyx_PyThreadState_assign
3387  __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
3388  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3389  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
3390  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3391  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3392  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
3393  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3394  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3395  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
3396  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);
3397  __Pyx_XGOTREF(__pyx_t_17);
3398  __Pyx_XGOTREF(__pyx_t_18);
3399  __Pyx_XGOTREF(__pyx_t_19);
3400  __Pyx_XGOTREF(__pyx_t_20);
3401  __Pyx_XGOTREF(__pyx_t_21);
3402  __Pyx_XGOTREF(__pyx_t_22);
3403  __pyx_t_14 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
3404  {
3405  __Pyx_DECREF(__pyx_v_inst);
3406  __pyx_v_inst = NULL;
3407  }
3408  if (PY_MAJOR_VERSION >= 3) {
3409  __Pyx_XGIVEREF(__pyx_t_20);
3410  __Pyx_XGIVEREF(__pyx_t_21);
3411  __Pyx_XGIVEREF(__pyx_t_22);
3412  __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
3413  }
3414  __Pyx_XGIVEREF(__pyx_t_17);
3415  __Pyx_XGIVEREF(__pyx_t_18);
3416  __Pyx_XGIVEREF(__pyx_t_19);
3417  __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
3418  __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
3419  __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
3420  goto __pyx_L5_except_error;
3421  }
3422  __pyx_L15:;
3423  }
3424  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3425  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
3426  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
3427  goto __pyx_L4_exception_handled;
3428  }
3429  goto __pyx_L5_except_error;
3430  __pyx_L5_except_error:;
3431 
3432  /* "dtocean.pyx":42
3433  * self.taus = np.zeros((NWL,NSMALL,NAOT))
3434  * self.taub = np.zeros((NWL,NBIG,NAOT))
3435  * try: # <<<<<<<<<<<<<<
3436  * self.toas=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['AINTS'].values
3437  * self.toab=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['AINTB'].values
3438  */
3439  __Pyx_XGIVEREF(__pyx_t_11);
3440  __Pyx_XGIVEREF(__pyx_t_12);
3441  __Pyx_XGIVEREF(__pyx_t_13);
3442  __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
3443  goto __pyx_L1_error;
3444  __pyx_L4_exception_handled:;
3445  __Pyx_XGIVEREF(__pyx_t_11);
3446  __Pyx_XGIVEREF(__pyx_t_12);
3447  __Pyx_XGIVEREF(__pyx_t_13);
3448  __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
3449  __pyx_L8_try_end:;
3450  }
3451 
3452  /* "dtocean.pyx":35
3453  * class dtocean(object):
3454  *
3455  * def __init__(self, lut_filepath, mode): # <<<<<<<<<<<<<<
3456  * print ("Reading Darktarget LUT: " + lut_filepath)
3457  * self.toas = np.zeros((NWL,NSMALL,NAOT,NWS,NSZA,NVZA,NRAA))
3458  */
3459 
3460  /* function exit code */
3461  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3462  goto __pyx_L0;
3463  __pyx_L1_error:;
3464  __Pyx_XDECREF(__pyx_t_1);
3465  __Pyx_XDECREF(__pyx_t_2);
3466  __Pyx_XDECREF(__pyx_t_3);
3467  __Pyx_XDECREF(__pyx_t_4);
3468  __Pyx_XDECREF(__pyx_t_5);
3469  __Pyx_XDECREF(__pyx_t_6);
3470  __Pyx_XDECREF(__pyx_t_7);
3471  __Pyx_XDECREF(__pyx_t_8);
3472  __Pyx_XDECREF(__pyx_t_9);
3473  __Pyx_XDECREF(__pyx_t_10);
3474  __Pyx_AddTraceback("dtocean.dtocean.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3475  __pyx_r = NULL;
3476  __pyx_L0:;
3477  __Pyx_XDECREF(__pyx_v_inst);
3478  __Pyx_XGIVEREF(__pyx_r);
3479  __Pyx_RefNannyFinishContext();
3480  return __pyx_r;
3481 }
3482 
3483 /* "dtocean.pyx":67
3484  *
3485  *
3486  * def interp_extrap( self, num, xin, x, y ): # <<<<<<<<<<<<<<
3487  * if (xin <= x[0]):
3488  * yout = y[0]+(xin-x[0])*(y[1]-y[0])/(x[1]-x[0])
3489  */
3490 
3491 /* Python wrapper */
3492 static PyObject *__pyx_pw_7dtocean_7dtocean_3interp_extrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3493 static PyMethodDef __pyx_mdef_7dtocean_7dtocean_3interp_extrap = {"interp_extrap", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7dtocean_7dtocean_3interp_extrap, METH_VARARGS|METH_KEYWORDS, 0};
3494 static PyObject *__pyx_pw_7dtocean_7dtocean_3interp_extrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3495  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
3496  PyObject *__pyx_v_num = 0;
3497  PyObject *__pyx_v_xin = 0;
3498  PyObject *__pyx_v_x = 0;
3499  PyObject *__pyx_v_y = 0;
3500  int __pyx_lineno = 0;
3501  const char *__pyx_filename = NULL;
3502  int __pyx_clineno = 0;
3503  PyObject *__pyx_r = 0;
3504  __Pyx_RefNannyDeclarations
3505  __Pyx_RefNannySetupContext("interp_extrap (wrapper)", 0);
3506  {
3507  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_num,&__pyx_n_s_xin,&__pyx_n_s_x,&__pyx_n_s_y,0};
3508  PyObject* values[5] = {0,0,0,0,0};
3509  if (unlikely(__pyx_kwds)) {
3510  Py_ssize_t kw_args;
3511  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3512  switch (pos_args) {
3513  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3514  CYTHON_FALLTHROUGH;
3515  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3516  CYTHON_FALLTHROUGH;
3517  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3518  CYTHON_FALLTHROUGH;
3519  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3520  CYTHON_FALLTHROUGH;
3521  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3522  CYTHON_FALLTHROUGH;
3523  case 0: break;
3524  default: goto __pyx_L5_argtuple_error;
3525  }
3526  kw_args = PyDict_Size(__pyx_kwds);
3527  switch (pos_args) {
3528  case 0:
3529  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
3530  else goto __pyx_L5_argtuple_error;
3531  CYTHON_FALLTHROUGH;
3532  case 1:
3533  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_num)) != 0)) kw_args--;
3534  else {
3535  __Pyx_RaiseArgtupleInvalid("interp_extrap", 1, 5, 5, 1); __PYX_ERR(0, 67, __pyx_L3_error)
3536  }
3537  CYTHON_FALLTHROUGH;
3538  case 2:
3539  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xin)) != 0)) kw_args--;
3540  else {
3541  __Pyx_RaiseArgtupleInvalid("interp_extrap", 1, 5, 5, 2); __PYX_ERR(0, 67, __pyx_L3_error)
3542  }
3543  CYTHON_FALLTHROUGH;
3544  case 3:
3545  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
3546  else {
3547  __Pyx_RaiseArgtupleInvalid("interp_extrap", 1, 5, 5, 3); __PYX_ERR(0, 67, __pyx_L3_error)
3548  }
3549  CYTHON_FALLTHROUGH;
3550  case 4:
3551  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
3552  else {
3553  __Pyx_RaiseArgtupleInvalid("interp_extrap", 1, 5, 5, 4); __PYX_ERR(0, 67, __pyx_L3_error)
3554  }
3555  }
3556  if (unlikely(kw_args > 0)) {
3557  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "interp_extrap") < 0)) __PYX_ERR(0, 67, __pyx_L3_error)
3558  }
3559  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
3560  goto __pyx_L5_argtuple_error;
3561  } else {
3562  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3563  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3564  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3565  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3566  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3567  }
3568  __pyx_v_self = values[0];
3569  __pyx_v_num = values[1];
3570  __pyx_v_xin = values[2];
3571  __pyx_v_x = values[3];
3572  __pyx_v_y = values[4];
3573  }
3574  goto __pyx_L4_argument_unpacking_done;
3575  __pyx_L5_argtuple_error:;
3576  __Pyx_RaiseArgtupleInvalid("interp_extrap", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 67, __pyx_L3_error)
3577  __pyx_L3_error:;
3578  __Pyx_AddTraceback("dtocean.dtocean.interp_extrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
3579  __Pyx_RefNannyFinishContext();
3580  return NULL;
3581  __pyx_L4_argument_unpacking_done:;
3582  __pyx_r = __pyx_pf_7dtocean_7dtocean_2interp_extrap(__pyx_self, __pyx_v_self, __pyx_v_num, __pyx_v_xin, __pyx_v_x, __pyx_v_y);
3583 
3584  /* function exit code */
3585  __Pyx_RefNannyFinishContext();
3586  return __pyx_r;
3587 }
3588 
3589 static PyObject *__pyx_pf_7dtocean_7dtocean_2interp_extrap(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_num, PyObject *__pyx_v_xin, PyObject *__pyx_v_x, PyObject *__pyx_v_y) {
3590  PyObject *__pyx_v_yout = NULL;
3591  PyObject *__pyx_v_i = NULL;
3592  PyObject *__pyx_r = NULL;
3593  __Pyx_RefNannyDeclarations
3594  PyObject *__pyx_t_1 = NULL;
3595  PyObject *__pyx_t_2 = NULL;
3596  int __pyx_t_3;
3597  PyObject *__pyx_t_4 = NULL;
3598  PyObject *__pyx_t_5 = NULL;
3599  PyObject *__pyx_t_6 = NULL;
3600  Py_ssize_t __pyx_t_7;
3601  PyObject *(*__pyx_t_8)(PyObject *);
3602  int __pyx_t_9;
3603  PyObject *__pyx_t_10 = NULL;
3604  int __pyx_lineno = 0;
3605  const char *__pyx_filename = NULL;
3606  int __pyx_clineno = 0;
3607  __Pyx_RefNannySetupContext("interp_extrap", 0);
3608 
3609  /* "dtocean.pyx":68
3610  *
3611  * def interp_extrap( self, num, xin, x, y ):
3612  * if (xin <= x[0]): # <<<<<<<<<<<<<<
3613  * yout = y[0]+(xin-x[0])*(y[1]-y[0])/(x[1]-x[0])
3614  * elif (xin >= x[num-1]):
3615  */
3616  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_x, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error)
3617  __Pyx_GOTREF(__pyx_t_1);
3618  __pyx_t_2 = PyObject_RichCompare(__pyx_v_xin, __pyx_t_1, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error)
3619  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3620  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 68, __pyx_L1_error)
3621  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3622  if (__pyx_t_3) {
3623 
3624  /* "dtocean.pyx":69
3625  * def interp_extrap( self, num, xin, x, y ):
3626  * if (xin <= x[0]):
3627  * yout = y[0]+(xin-x[0])*(y[1]-y[0])/(x[1]-x[0]) # <<<<<<<<<<<<<<
3628  * elif (xin >= x[num-1]):
3629  * yout = y[num-2]+(xin-x[num-2])*(y[num-1]-y[num-2])/(x[num-1]-x[num-2])
3630  */
3631  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_y, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error)
3632  __Pyx_GOTREF(__pyx_t_2);
3633  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_x, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
3634  __Pyx_GOTREF(__pyx_t_1);
3635  __pyx_t_4 = PyNumber_Subtract(__pyx_v_xin, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error)
3636  __Pyx_GOTREF(__pyx_t_4);
3637  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3638  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_y, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
3639  __Pyx_GOTREF(__pyx_t_1);
3640  __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_y, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 69, __pyx_L1_error)
3641  __Pyx_GOTREF(__pyx_t_5);
3642  __pyx_t_6 = PyNumber_Subtract(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 69, __pyx_L1_error)
3643  __Pyx_GOTREF(__pyx_t_6);
3644  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3645  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3646  __pyx_t_5 = PyNumber_Multiply(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 69, __pyx_L1_error)
3647  __Pyx_GOTREF(__pyx_t_5);
3648  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3649  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3650  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_x, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 69, __pyx_L1_error)
3651  __Pyx_GOTREF(__pyx_t_6);
3652  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_x, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error)
3653  __Pyx_GOTREF(__pyx_t_4);
3654  __pyx_t_1 = PyNumber_Subtract(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
3655  __Pyx_GOTREF(__pyx_t_1);
3656  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3657  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3658  __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error)
3659  __Pyx_GOTREF(__pyx_t_4);
3660  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3661  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3662  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
3663  __Pyx_GOTREF(__pyx_t_1);
3664  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3665  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3666  __pyx_v_yout = __pyx_t_1;
3667  __pyx_t_1 = 0;
3668 
3669  /* "dtocean.pyx":68
3670  *
3671  * def interp_extrap( self, num, xin, x, y ):
3672  * if (xin <= x[0]): # <<<<<<<<<<<<<<
3673  * yout = y[0]+(xin-x[0])*(y[1]-y[0])/(x[1]-x[0])
3674  * elif (xin >= x[num-1]):
3675  */
3676  goto __pyx_L3;
3677  }
3678 
3679  /* "dtocean.pyx":70
3680  * if (xin <= x[0]):
3681  * yout = y[0]+(xin-x[0])*(y[1]-y[0])/(x[1]-x[0])
3682  * elif (xin >= x[num-1]): # <<<<<<<<<<<<<<
3683  * yout = y[num-2]+(xin-x[num-2])*(y[num-1]-y[num-2])/(x[num-1]-x[num-2])
3684  * else:
3685  */
3686  __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_v_num, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
3687  __Pyx_GOTREF(__pyx_t_1);
3688  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_x, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error)
3689  __Pyx_GOTREF(__pyx_t_4);
3690  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3691  __pyx_t_1 = PyObject_RichCompare(__pyx_v_xin, __pyx_t_4, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
3692  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3693  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 70, __pyx_L1_error)
3694  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3695  if (__pyx_t_3) {
3696 
3697  /* "dtocean.pyx":71
3698  * yout = y[0]+(xin-x[0])*(y[1]-y[0])/(x[1]-x[0])
3699  * elif (xin >= x[num-1]):
3700  * yout = y[num-2]+(xin-x[num-2])*(y[num-1]-y[num-2])/(x[num-1]-x[num-2]) # <<<<<<<<<<<<<<
3701  * else:
3702  * for i in range(num):
3703  */
3704  __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_v_num, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
3705  __Pyx_GOTREF(__pyx_t_1);
3706  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_y, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 71, __pyx_L1_error)
3707  __Pyx_GOTREF(__pyx_t_4);
3708  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3709  __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_v_num, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
3710  __Pyx_GOTREF(__pyx_t_1);
3711  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_x, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error)
3712  __Pyx_GOTREF(__pyx_t_2);
3713  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3714  __pyx_t_1 = PyNumber_Subtract(__pyx_v_xin, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
3715  __Pyx_GOTREF(__pyx_t_1);
3716  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3717  __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_v_num, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error)
3718  __Pyx_GOTREF(__pyx_t_2);
3719  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_y, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 71, __pyx_L1_error)
3720  __Pyx_GOTREF(__pyx_t_5);
3721  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3722  __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_v_num, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error)
3723  __Pyx_GOTREF(__pyx_t_2);
3724  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_y, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 71, __pyx_L1_error)
3725  __Pyx_GOTREF(__pyx_t_6);
3726  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3727  __pyx_t_2 = PyNumber_Subtract(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error)
3728  __Pyx_GOTREF(__pyx_t_2);
3729  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3730  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3731  __pyx_t_6 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 71, __pyx_L1_error)
3732  __Pyx_GOTREF(__pyx_t_6);
3733  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3734  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3735  __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_v_num, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error)
3736  __Pyx_GOTREF(__pyx_t_2);
3737  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_x, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
3738  __Pyx_GOTREF(__pyx_t_1);
3739  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3740  __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_v_num, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error)
3741  __Pyx_GOTREF(__pyx_t_2);
3742  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_x, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 71, __pyx_L1_error)
3743  __Pyx_GOTREF(__pyx_t_5);
3744  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3745  __pyx_t_2 = PyNumber_Subtract(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error)
3746  __Pyx_GOTREF(__pyx_t_2);
3747  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3748  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3749  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 71, __pyx_L1_error)
3750  __Pyx_GOTREF(__pyx_t_5);
3751  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3752  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3753  __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error)
3754  __Pyx_GOTREF(__pyx_t_2);
3755  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3756  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3757  __pyx_v_yout = __pyx_t_2;
3758  __pyx_t_2 = 0;
3759 
3760  /* "dtocean.pyx":70
3761  * if (xin <= x[0]):
3762  * yout = y[0]+(xin-x[0])*(y[1]-y[0])/(x[1]-x[0])
3763  * elif (xin >= x[num-1]): # <<<<<<<<<<<<<<
3764  * yout = y[num-2]+(xin-x[num-2])*(y[num-1]-y[num-2])/(x[num-1]-x[num-2])
3765  * else:
3766  */
3767  goto __pyx_L3;
3768  }
3769 
3770  /* "dtocean.pyx":73
3771  * yout = y[num-2]+(xin-x[num-2])*(y[num-1]-y[num-2])/(x[num-1]-x[num-2])
3772  * else:
3773  * for i in range(num): # <<<<<<<<<<<<<<
3774  * if ((xin >= x[i]) and (xin <= x[i+1])):
3775  * yout = y[i]+(xin-x[i])*(y[i+1]-y[i])/(x[i+1]-x[i])
3776  */
3777  /*else*/ {
3778  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_num); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error)
3779  __Pyx_GOTREF(__pyx_t_2);
3780  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
3781  __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0;
3782  __pyx_t_8 = NULL;
3783  } else {
3784  __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 73, __pyx_L1_error)
3785  __Pyx_GOTREF(__pyx_t_5);
3786  __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 73, __pyx_L1_error)
3787  }
3788  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3789  for (;;) {
3790  if (likely(!__pyx_t_8)) {
3791  if (likely(PyList_CheckExact(__pyx_t_5))) {
3792  if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break;
3793  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3794  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 73, __pyx_L1_error)
3795  #else
3796  __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error)
3797  __Pyx_GOTREF(__pyx_t_2);
3798  #endif
3799  } else {
3800  if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
3801  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3802  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 73, __pyx_L1_error)
3803  #else
3804  __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error)
3805  __Pyx_GOTREF(__pyx_t_2);
3806  #endif
3807  }
3808  } else {
3809  __pyx_t_2 = __pyx_t_8(__pyx_t_5);
3810  if (unlikely(!__pyx_t_2)) {
3811  PyObject* exc_type = PyErr_Occurred();
3812  if (exc_type) {
3813  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
3814  else __PYX_ERR(0, 73, __pyx_L1_error)
3815  }
3816  break;
3817  }
3818  __Pyx_GOTREF(__pyx_t_2);
3819  }
3820  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
3821  __pyx_t_2 = 0;
3822 
3823  /* "dtocean.pyx":74
3824  * else:
3825  * for i in range(num):
3826  * if ((xin >= x[i]) and (xin <= x[i+1])): # <<<<<<<<<<<<<<
3827  * yout = y[i]+(xin-x[i])*(y[i+1]-y[i])/(x[i+1]-x[i])
3828  * break
3829  */
3830  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_x, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error)
3831  __Pyx_GOTREF(__pyx_t_2);
3832  __pyx_t_4 = PyObject_RichCompare(__pyx_v_xin, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error)
3833  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3834  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 74, __pyx_L1_error)
3835  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3836  if (__pyx_t_9) {
3837  } else {
3838  __pyx_t_3 = __pyx_t_9;
3839  goto __pyx_L7_bool_binop_done;
3840  }
3841  __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error)
3842  __Pyx_GOTREF(__pyx_t_4);
3843  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_x, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error)
3844  __Pyx_GOTREF(__pyx_t_2);
3845  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3846  __pyx_t_4 = PyObject_RichCompare(__pyx_v_xin, __pyx_t_2, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error)
3847  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3848  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 74, __pyx_L1_error)
3849  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3850  __pyx_t_3 = __pyx_t_9;
3851  __pyx_L7_bool_binop_done:;
3852  if (__pyx_t_3) {
3853 
3854  /* "dtocean.pyx":75
3855  * for i in range(num):
3856  * if ((xin >= x[i]) and (xin <= x[i+1])):
3857  * yout = y[i]+(xin-x[i])*(y[i+1]-y[i])/(x[i+1]-x[i]) # <<<<<<<<<<<<<<
3858  * break
3859  * return yout;
3860  */
3861  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_y, __pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 75, __pyx_L1_error)
3862  __Pyx_GOTREF(__pyx_t_4);
3863  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_x, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error)
3864  __Pyx_GOTREF(__pyx_t_2);
3865  __pyx_t_6 = PyNumber_Subtract(__pyx_v_xin, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 75, __pyx_L1_error)
3866  __Pyx_GOTREF(__pyx_t_6);
3867  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3868  __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error)
3869  __Pyx_GOTREF(__pyx_t_2);
3870  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_y, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error)
3871  __Pyx_GOTREF(__pyx_t_1);
3872  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3873  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_y, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error)
3874  __Pyx_GOTREF(__pyx_t_2);
3875  __pyx_t_10 = PyNumber_Subtract(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 75, __pyx_L1_error)
3876  __Pyx_GOTREF(__pyx_t_10);
3877  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3878  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3879  __pyx_t_2 = PyNumber_Multiply(__pyx_t_6, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error)
3880  __Pyx_GOTREF(__pyx_t_2);
3881  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3882  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3883  __pyx_t_10 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 75, __pyx_L1_error)
3884  __Pyx_GOTREF(__pyx_t_10);
3885  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_x, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 75, __pyx_L1_error)
3886  __Pyx_GOTREF(__pyx_t_6);
3887  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3888  __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_x, __pyx_v_i); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 75, __pyx_L1_error)
3889  __Pyx_GOTREF(__pyx_t_10);
3890  __pyx_t_1 = PyNumber_Subtract(__pyx_t_6, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error)
3891  __Pyx_GOTREF(__pyx_t_1);
3892  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3893  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3894  __pyx_t_10 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 75, __pyx_L1_error)
3895  __Pyx_GOTREF(__pyx_t_10);
3896  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3897  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3898  __pyx_t_1 = PyNumber_Add(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error)
3899  __Pyx_GOTREF(__pyx_t_1);
3900  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3901  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3902  __pyx_v_yout = __pyx_t_1;
3903  __pyx_t_1 = 0;
3904 
3905  /* "dtocean.pyx":76
3906  * if ((xin >= x[i]) and (xin <= x[i+1])):
3907  * yout = y[i]+(xin-x[i])*(y[i+1]-y[i])/(x[i+1]-x[i])
3908  * break # <<<<<<<<<<<<<<
3909  * return yout;
3910  *
3911  */
3912  goto __pyx_L5_break;
3913 
3914  /* "dtocean.pyx":74
3915  * else:
3916  * for i in range(num):
3917  * if ((xin >= x[i]) and (xin <= x[i+1])): # <<<<<<<<<<<<<<
3918  * yout = y[i]+(xin-x[i])*(y[i+1]-y[i])/(x[i+1]-x[i])
3919  * break
3920  */
3921  }
3922 
3923  /* "dtocean.pyx":73
3924  * yout = y[num-2]+(xin-x[num-2])*(y[num-1]-y[num-2])/(x[num-1]-x[num-2])
3925  * else:
3926  * for i in range(num): # <<<<<<<<<<<<<<
3927  * if ((xin >= x[i]) and (xin <= x[i+1])):
3928  * yout = y[i]+(xin-x[i])*(y[i+1]-y[i])/(x[i+1]-x[i])
3929  */
3930  }
3931  __pyx_L5_break:;
3932  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3933  }
3934  __pyx_L3:;
3935 
3936  /* "dtocean.pyx":77
3937  * yout = y[i]+(xin-x[i])*(y[i+1]-y[i])/(x[i+1]-x[i])
3938  * break
3939  * return yout; # <<<<<<<<<<<<<<
3940  *
3941  * def proc_gran(self,rfl,sza,vza,raa,wnd):
3942  */
3943  __Pyx_XDECREF(__pyx_r);
3944  if (unlikely(!__pyx_v_yout)) { __Pyx_RaiseUnboundLocalError("yout"); __PYX_ERR(0, 77, __pyx_L1_error) }
3945  __Pyx_INCREF(__pyx_v_yout);
3946  __pyx_r = __pyx_v_yout;
3947  goto __pyx_L0;
3948 
3949  /* "dtocean.pyx":67
3950  *
3951  *
3952  * def interp_extrap( self, num, xin, x, y ): # <<<<<<<<<<<<<<
3953  * if (xin <= x[0]):
3954  * yout = y[0]+(xin-x[0])*(y[1]-y[0])/(x[1]-x[0])
3955  */
3956 
3957  /* function exit code */
3958  __pyx_L1_error:;
3959  __Pyx_XDECREF(__pyx_t_1);
3960  __Pyx_XDECREF(__pyx_t_2);
3961  __Pyx_XDECREF(__pyx_t_4);
3962  __Pyx_XDECREF(__pyx_t_5);
3963  __Pyx_XDECREF(__pyx_t_6);
3964  __Pyx_XDECREF(__pyx_t_10);
3965  __Pyx_AddTraceback("dtocean.dtocean.interp_extrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
3966  __pyx_r = NULL;
3967  __pyx_L0:;
3968  __Pyx_XDECREF(__pyx_v_yout);
3969  __Pyx_XDECREF(__pyx_v_i);
3970  __Pyx_XGIVEREF(__pyx_r);
3971  __Pyx_RefNannyFinishContext();
3972  return __pyx_r;
3973 }
3974 
3975 /* "dtocean.pyx":79
3976  * return yout;
3977  *
3978  * def proc_gran(self,rfl,sza,vza,raa,wnd): # <<<<<<<<<<<<<<
3979  * xit = np.stack((wnd, sza, vza, raa), axis=2)
3980  * mrfls = np.zeros((NSMALL, NWL))
3981  */
3982 
3983 /* Python wrapper */
3984 static PyObject *__pyx_pw_7dtocean_7dtocean_5proc_gran(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3985 static PyMethodDef __pyx_mdef_7dtocean_7dtocean_5proc_gran = {"proc_gran", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7dtocean_7dtocean_5proc_gran, METH_VARARGS|METH_KEYWORDS, 0};
3986 static PyObject *__pyx_pw_7dtocean_7dtocean_5proc_gran(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3987  PyObject *__pyx_v_self = 0;
3988  CYTHON_UNUSED PyObject *__pyx_v_rfl = 0;
3989  PyObject *__pyx_v_sza = 0;
3990  PyObject *__pyx_v_vza = 0;
3991  PyObject *__pyx_v_raa = 0;
3992  PyObject *__pyx_v_wnd = 0;
3993  int __pyx_lineno = 0;
3994  const char *__pyx_filename = NULL;
3995  int __pyx_clineno = 0;
3996  PyObject *__pyx_r = 0;
3997  __Pyx_RefNannyDeclarations
3998  __Pyx_RefNannySetupContext("proc_gran (wrapper)", 0);
3999  {
4000  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_rfl,&__pyx_n_s_sza,&__pyx_n_s_vza,&__pyx_n_s_raa,&__pyx_n_s_wnd,0};
4001  PyObject* values[6] = {0,0,0,0,0,0};
4002  if (unlikely(__pyx_kwds)) {
4003  Py_ssize_t kw_args;
4004  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4005  switch (pos_args) {
4006  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4007  CYTHON_FALLTHROUGH;
4008  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4009  CYTHON_FALLTHROUGH;
4010  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4011  CYTHON_FALLTHROUGH;
4012  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4013  CYTHON_FALLTHROUGH;
4014  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4015  CYTHON_FALLTHROUGH;
4016  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4017  CYTHON_FALLTHROUGH;
4018  case 0: break;
4019  default: goto __pyx_L5_argtuple_error;
4020  }
4021  kw_args = PyDict_Size(__pyx_kwds);
4022  switch (pos_args) {
4023  case 0:
4024  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
4025  else goto __pyx_L5_argtuple_error;
4026  CYTHON_FALLTHROUGH;
4027  case 1:
4028  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rfl)) != 0)) kw_args--;
4029  else {
4030  __Pyx_RaiseArgtupleInvalid("proc_gran", 1, 6, 6, 1); __PYX_ERR(0, 79, __pyx_L3_error)
4031  }
4032  CYTHON_FALLTHROUGH;
4033  case 2:
4034  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sza)) != 0)) kw_args--;
4035  else {
4036  __Pyx_RaiseArgtupleInvalid("proc_gran", 1, 6, 6, 2); __PYX_ERR(0, 79, __pyx_L3_error)
4037  }
4038  CYTHON_FALLTHROUGH;
4039  case 3:
4040  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vza)) != 0)) kw_args--;
4041  else {
4042  __Pyx_RaiseArgtupleInvalid("proc_gran", 1, 6, 6, 3); __PYX_ERR(0, 79, __pyx_L3_error)
4043  }
4044  CYTHON_FALLTHROUGH;
4045  case 4:
4046  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_raa)) != 0)) kw_args--;
4047  else {
4048  __Pyx_RaiseArgtupleInvalid("proc_gran", 1, 6, 6, 4); __PYX_ERR(0, 79, __pyx_L3_error)
4049  }
4050  CYTHON_FALLTHROUGH;
4051  case 5:
4052  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_wnd)) != 0)) kw_args--;
4053  else {
4054  __Pyx_RaiseArgtupleInvalid("proc_gran", 1, 6, 6, 5); __PYX_ERR(0, 79, __pyx_L3_error)
4055  }
4056  }
4057  if (unlikely(kw_args > 0)) {
4058  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "proc_gran") < 0)) __PYX_ERR(0, 79, __pyx_L3_error)
4059  }
4060  } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
4061  goto __pyx_L5_argtuple_error;
4062  } else {
4063  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4064  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4065  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4066  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4067  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4068  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4069  }
4070  __pyx_v_self = values[0];
4071  __pyx_v_rfl = values[1];
4072  __pyx_v_sza = values[2];
4073  __pyx_v_vza = values[3];
4074  __pyx_v_raa = values[4];
4075  __pyx_v_wnd = values[5];
4076  }
4077  goto __pyx_L4_argument_unpacking_done;
4078  __pyx_L5_argtuple_error:;
4079  __Pyx_RaiseArgtupleInvalid("proc_gran", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 79, __pyx_L3_error)
4080  __pyx_L3_error:;
4081  __Pyx_AddTraceback("dtocean.dtocean.proc_gran", __pyx_clineno, __pyx_lineno, __pyx_filename);
4082  __Pyx_RefNannyFinishContext();
4083  return NULL;
4084  __pyx_L4_argument_unpacking_done:;
4085  __pyx_r = __pyx_pf_7dtocean_7dtocean_4proc_gran(__pyx_self, __pyx_v_self, __pyx_v_rfl, __pyx_v_sza, __pyx_v_vza, __pyx_v_raa, __pyx_v_wnd);
4086 
4087  /* function exit code */
4088  __Pyx_RefNannyFinishContext();
4089  return __pyx_r;
4090 }
4091 
4092 static PyObject *__pyx_pf_7dtocean_7dtocean_4proc_gran(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_rfl, PyObject *__pyx_v_sza, PyObject *__pyx_v_vza, PyObject *__pyx_v_raa, PyObject *__pyx_v_wnd) {
4093  PyObject *__pyx_v_xit = NULL;
4094  PyObject *__pyx_v_mrfls = NULL;
4095  PyObject *__pyx_v_mrflb = NULL;
4096  PyObject *__pyx_v_mrflr = NULL;
4097  PyObject *__pyx_v_units = NULL;
4098  CYTHON_UNUSED PyObject *__pyx_v_max_rfl = NULL;
4099  CYTHON_UNUSED PyObject *__pyx_v_min_rfl = NULL;
4100  PyObject *__pyx_v_shps = NULL;
4101  PyObject *__pyx_v_shpb = NULL;
4102  PyObject *__pyx_v_iwl = NULL;
4103  PyObject *__pyx_v_ism = NULL;
4104  PyObject *__pyx_v_iwn = NULL;
4105  PyObject *__pyx_v_isz = NULL;
4106  PyObject *__pyx_v_ith = NULL;
4107  PyObject *__pyx_v_iph = NULL;
4108  PyObject *__pyx_v_itau = NULL;
4109  PyObject *__pyx_v_ibm = NULL;
4110  PyObject *__pyx_r = NULL;
4111  __Pyx_RefNannyDeclarations
4112  PyObject *__pyx_t_1 = NULL;
4113  PyObject *__pyx_t_2 = NULL;
4114  PyObject *__pyx_t_3 = NULL;
4115  PyObject *__pyx_t_4 = NULL;
4116  PyObject *__pyx_t_5 = NULL;
4117  PyObject *__pyx_t_6 = NULL;
4118  PyObject *__pyx_t_7 = NULL;
4119  int __pyx_t_8;
4120  Py_ssize_t __pyx_t_9;
4121  PyObject *(*__pyx_t_10)(PyObject *);
4122  Py_ssize_t __pyx_t_11;
4123  PyObject *(*__pyx_t_12)(PyObject *);
4124  Py_ssize_t __pyx_t_13;
4125  PyObject *(*__pyx_t_14)(PyObject *);
4126  Py_ssize_t __pyx_t_15;
4127  PyObject *(*__pyx_t_16)(PyObject *);
4128  Py_ssize_t __pyx_t_17;
4129  PyObject *(*__pyx_t_18)(PyObject *);
4130  Py_ssize_t __pyx_t_19;
4131  PyObject *(*__pyx_t_20)(PyObject *);
4132  PyObject *__pyx_t_21 = NULL;
4133  PyObject *__pyx_t_22 = NULL;
4134  PyObject *__pyx_t_23 = NULL;
4135  PyObject *__pyx_t_24 = NULL;
4136  PyObject *__pyx_t_25 = NULL;
4137  PyObject *__pyx_t_26 = NULL;
4138  int __pyx_lineno = 0;
4139  const char *__pyx_filename = NULL;
4140  int __pyx_clineno = 0;
4141  __Pyx_RefNannySetupContext("proc_gran", 0);
4142 
4143  /* "dtocean.pyx":80
4144  *
4145  * def proc_gran(self,rfl,sza,vza,raa,wnd):
4146  * xit = np.stack((wnd, sza, vza, raa), axis=2) # <<<<<<<<<<<<<<
4147  * mrfls = np.zeros((NSMALL, NWL))
4148  * mrflb = np.zeros((NBIG, NWL))
4149  */
4150  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error)
4151  __Pyx_GOTREF(__pyx_t_1);
4152  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stack); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
4153  __Pyx_GOTREF(__pyx_t_2);
4154  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4155  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error)
4156  __Pyx_GOTREF(__pyx_t_1);
4157  __Pyx_INCREF(__pyx_v_wnd);
4158  __Pyx_GIVEREF(__pyx_v_wnd);
4159  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_wnd);
4160  __Pyx_INCREF(__pyx_v_sza);
4161  __Pyx_GIVEREF(__pyx_v_sza);
4162  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sza);
4163  __Pyx_INCREF(__pyx_v_vza);
4164  __Pyx_GIVEREF(__pyx_v_vza);
4165  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_vza);
4166  __Pyx_INCREF(__pyx_v_raa);
4167  __Pyx_GIVEREF(__pyx_v_raa);
4168  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_raa);
4169  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 80, __pyx_L1_error)
4170  __Pyx_GOTREF(__pyx_t_3);
4171  __Pyx_GIVEREF(__pyx_t_1);
4172  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
4173  __pyx_t_1 = 0;
4174  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error)
4175  __Pyx_GOTREF(__pyx_t_1);
4176  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_axis, __pyx_int_2) < 0) __PYX_ERR(0, 80, __pyx_L1_error)
4177  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error)
4178  __Pyx_GOTREF(__pyx_t_4);
4179  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4180  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4181  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4182  __pyx_v_xit = __pyx_t_4;
4183  __pyx_t_4 = 0;
4184 
4185  /* "dtocean.pyx":81
4186  * def proc_gran(self,rfl,sza,vza,raa,wnd):
4187  * xit = np.stack((wnd, sza, vza, raa), axis=2)
4188  * mrfls = np.zeros((NSMALL, NWL)) # <<<<<<<<<<<<<<
4189  * mrflb = np.zeros((NBIG, NWL))
4190  * mrflr = np.zeros((NWL))
4191  */
4192  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error)
4193  __Pyx_GOTREF(__pyx_t_1);
4194  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 81, __pyx_L1_error)
4195  __Pyx_GOTREF(__pyx_t_3);
4196  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4197  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NSMALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error)
4198  __Pyx_GOTREF(__pyx_t_1);
4199  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_NWL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error)
4200  __Pyx_GOTREF(__pyx_t_2);
4201  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 81, __pyx_L1_error)
4202  __Pyx_GOTREF(__pyx_t_5);
4203  __Pyx_GIVEREF(__pyx_t_1);
4204  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
4205  __Pyx_GIVEREF(__pyx_t_2);
4206  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
4207  __pyx_t_1 = 0;
4208  __pyx_t_2 = 0;
4209  __pyx_t_2 = NULL;
4210  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4211  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
4212  if (likely(__pyx_t_2)) {
4213  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4214  __Pyx_INCREF(__pyx_t_2);
4215  __Pyx_INCREF(function);
4216  __Pyx_DECREF_SET(__pyx_t_3, function);
4217  }
4218  }
4219  __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
4220  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4221  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4222  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L1_error)
4223  __Pyx_GOTREF(__pyx_t_4);
4224  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4225  __pyx_v_mrfls = __pyx_t_4;
4226  __pyx_t_4 = 0;
4227 
4228  /* "dtocean.pyx":82
4229  * xit = np.stack((wnd, sza, vza, raa), axis=2)
4230  * mrfls = np.zeros((NSMALL, NWL))
4231  * mrflb = np.zeros((NBIG, NWL)) # <<<<<<<<<<<<<<
4232  * mrflr = np.zeros((NWL))
4233  * units = np.pi/np.cos(sza.astype(double)*D2R)
4234  */
4235  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L1_error)
4236  __Pyx_GOTREF(__pyx_t_3);
4237  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 82, __pyx_L1_error)
4238  __Pyx_GOTREF(__pyx_t_5);
4239  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4240  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NBIG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L1_error)
4241  __Pyx_GOTREF(__pyx_t_3);
4242  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_NWL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error)
4243  __Pyx_GOTREF(__pyx_t_2);
4244  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
4245  __Pyx_GOTREF(__pyx_t_1);
4246  __Pyx_GIVEREF(__pyx_t_3);
4247  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
4248  __Pyx_GIVEREF(__pyx_t_2);
4249  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
4250  __pyx_t_3 = 0;
4251  __pyx_t_2 = 0;
4252  __pyx_t_2 = NULL;
4253  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
4254  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
4255  if (likely(__pyx_t_2)) {
4256  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
4257  __Pyx_INCREF(__pyx_t_2);
4258  __Pyx_INCREF(function);
4259  __Pyx_DECREF_SET(__pyx_t_5, function);
4260  }
4261  }
4262  __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1);
4263  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4264  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4265  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error)
4266  __Pyx_GOTREF(__pyx_t_4);
4267  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4268  __pyx_v_mrflb = __pyx_t_4;
4269  __pyx_t_4 = 0;
4270 
4271  /* "dtocean.pyx":83
4272  * mrfls = np.zeros((NSMALL, NWL))
4273  * mrflb = np.zeros((NBIG, NWL))
4274  * mrflr = np.zeros((NWL)) # <<<<<<<<<<<<<<
4275  * units = np.pi/np.cos(sza.astype(double)*D2R)
4276  *
4277  */
4278  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 83, __pyx_L1_error)
4279  __Pyx_GOTREF(__pyx_t_5);
4280  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
4281  __Pyx_GOTREF(__pyx_t_1);
4282  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4283  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NWL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 83, __pyx_L1_error)
4284  __Pyx_GOTREF(__pyx_t_5);
4285  __pyx_t_2 = NULL;
4286  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
4287  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
4288  if (likely(__pyx_t_2)) {
4289  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
4290  __Pyx_INCREF(__pyx_t_2);
4291  __Pyx_INCREF(function);
4292  __Pyx_DECREF_SET(__pyx_t_1, function);
4293  }
4294  }
4295  __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
4296  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4297  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4298  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error)
4299  __Pyx_GOTREF(__pyx_t_4);
4300  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4301  __pyx_v_mrflr = __pyx_t_4;
4302  __pyx_t_4 = 0;
4303 
4304  /* "dtocean.pyx":84
4305  * mrflb = np.zeros((NBIG, NWL))
4306  * mrflr = np.zeros((NWL))
4307  * units = np.pi/np.cos(sza.astype(double)*D2R) # <<<<<<<<<<<<<<
4308  *
4309  * max_rfl = np.max(self.toas)
4310  */
4311  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error)
4312  __Pyx_GOTREF(__pyx_t_4);
4313  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_pi); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
4314  __Pyx_GOTREF(__pyx_t_1);
4315  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4316  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error)
4317  __Pyx_GOTREF(__pyx_t_5);
4318  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_cos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)
4319  __Pyx_GOTREF(__pyx_t_2);
4320  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4321  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sza, __pyx_n_s_astype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L1_error)
4322  __Pyx_GOTREF(__pyx_t_3);
4323  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_double); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 84, __pyx_L1_error)
4324  __Pyx_GOTREF(__pyx_t_6);
4325  __pyx_t_7 = NULL;
4326  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
4327  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
4328  if (likely(__pyx_t_7)) {
4329  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4330  __Pyx_INCREF(__pyx_t_7);
4331  __Pyx_INCREF(function);
4332  __Pyx_DECREF_SET(__pyx_t_3, function);
4333  }
4334  }
4335  __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6);
4336  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
4337  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4338  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error)
4339  __Pyx_GOTREF(__pyx_t_5);
4340  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4341  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_D2R); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L1_error)
4342  __Pyx_GOTREF(__pyx_t_3);
4343  __pyx_t_6 = PyNumber_Multiply(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 84, __pyx_L1_error)
4344  __Pyx_GOTREF(__pyx_t_6);
4345  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4346  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4347  __pyx_t_3 = NULL;
4348  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
4349  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4350  if (likely(__pyx_t_3)) {
4351  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4352  __Pyx_INCREF(__pyx_t_3);
4353  __Pyx_INCREF(function);
4354  __Pyx_DECREF_SET(__pyx_t_2, function);
4355  }
4356  }
4357  __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6);
4358  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4359  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4360  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error)
4361  __Pyx_GOTREF(__pyx_t_4);
4362  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4363  __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)
4364  __Pyx_GOTREF(__pyx_t_2);
4365  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4366  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4367  __pyx_v_units = __pyx_t_2;
4368  __pyx_t_2 = 0;
4369 
4370  /* "dtocean.pyx":86
4371  * units = np.pi/np.cos(sza.astype(double)*D2R)
4372  *
4373  * max_rfl = np.max(self.toas) # <<<<<<<<<<<<<<
4374  * min_rfl = np.min(self.toas)
4375  * shps = self.toas.shape
4376  */
4377  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error)
4378  __Pyx_GOTREF(__pyx_t_4);
4379  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_max); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error)
4380  __Pyx_GOTREF(__pyx_t_1);
4381  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4382  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_toas); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error)
4383  __Pyx_GOTREF(__pyx_t_4);
4384  __pyx_t_6 = NULL;
4385  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
4386  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
4387  if (likely(__pyx_t_6)) {
4388  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
4389  __Pyx_INCREF(__pyx_t_6);
4390  __Pyx_INCREF(function);
4391  __Pyx_DECREF_SET(__pyx_t_1, function);
4392  }
4393  }
4394  __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
4395  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
4396  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4397  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error)
4398  __Pyx_GOTREF(__pyx_t_2);
4399  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4400  __pyx_v_max_rfl = __pyx_t_2;
4401  __pyx_t_2 = 0;
4402 
4403  /* "dtocean.pyx":87
4404  *
4405  * max_rfl = np.max(self.toas)
4406  * min_rfl = np.min(self.toas) # <<<<<<<<<<<<<<
4407  * shps = self.toas.shape
4408  * shpb = self.toab.shape
4409  */
4410  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error)
4411  __Pyx_GOTREF(__pyx_t_1);
4412  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_min); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 87, __pyx_L1_error)
4413  __Pyx_GOTREF(__pyx_t_4);
4414  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4415  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_toas); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error)
4416  __Pyx_GOTREF(__pyx_t_1);
4417  __pyx_t_6 = NULL;
4418  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
4419  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
4420  if (likely(__pyx_t_6)) {
4421  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
4422  __Pyx_INCREF(__pyx_t_6);
4423  __Pyx_INCREF(function);
4424  __Pyx_DECREF_SET(__pyx_t_4, function);
4425  }
4426  }
4427  __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1);
4428  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
4429  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4430  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error)
4431  __Pyx_GOTREF(__pyx_t_2);
4432  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4433  __pyx_v_min_rfl = __pyx_t_2;
4434  __pyx_t_2 = 0;
4435 
4436  /* "dtocean.pyx":88
4437  * max_rfl = np.max(self.toas)
4438  * min_rfl = np.min(self.toas)
4439  * shps = self.toas.shape # <<<<<<<<<<<<<<
4440  * shpb = self.toab.shape
4441  * self.rfl_pts = np.linspace(0.0,0.5,shps[2])
4442  */
4443  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_toas); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
4444  __Pyx_GOTREF(__pyx_t_2);
4445  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 88, __pyx_L1_error)
4446  __Pyx_GOTREF(__pyx_t_4);
4447  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4448  __pyx_v_shps = __pyx_t_4;
4449  __pyx_t_4 = 0;
4450 
4451  /* "dtocean.pyx":89
4452  * min_rfl = np.min(self.toas)
4453  * shps = self.toas.shape
4454  * shpb = self.toab.shape # <<<<<<<<<<<<<<
4455  * self.rfl_pts = np.linspace(0.0,0.5,shps[2])
4456  *
4457  */
4458  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_toab); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 89, __pyx_L1_error)
4459  __Pyx_GOTREF(__pyx_t_4);
4460  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)
4461  __Pyx_GOTREF(__pyx_t_2);
4462  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4463  __pyx_v_shpb = __pyx_t_2;
4464  __pyx_t_2 = 0;
4465 
4466  /* "dtocean.pyx":90
4467  * shps = self.toas.shape
4468  * shpb = self.toab.shape
4469  * self.rfl_pts = np.linspace(0.0,0.5,shps[2]) # <<<<<<<<<<<<<<
4470  *
4471  * self.tslut = np.zeros_like(self.toas)
4472  */
4473  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error)
4474  __Pyx_GOTREF(__pyx_t_4);
4475  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_linspace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error)
4476  __Pyx_GOTREF(__pyx_t_1);
4477  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4478  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_shps, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error)
4479  __Pyx_GOTREF(__pyx_t_4);
4480  __pyx_t_6 = NULL;
4481  __pyx_t_8 = 0;
4482  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
4483  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
4484  if (likely(__pyx_t_6)) {
4485  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
4486  __Pyx_INCREF(__pyx_t_6);
4487  __Pyx_INCREF(function);
4488  __Pyx_DECREF_SET(__pyx_t_1, function);
4489  __pyx_t_8 = 1;
4490  }
4491  }
4492  #if CYTHON_FAST_PYCALL
4493  if (PyFunction_Check(__pyx_t_1)) {
4494  PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_float_0_0, __pyx_float_0_5, __pyx_t_4};
4495  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error)
4496  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
4497  __Pyx_GOTREF(__pyx_t_2);
4498  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4499  } else
4500  #endif
4501  #if CYTHON_FAST_PYCCALL
4502  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
4503  PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_float_0_0, __pyx_float_0_5, __pyx_t_4};
4504  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error)
4505  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
4506  __Pyx_GOTREF(__pyx_t_2);
4507  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4508  } else
4509  #endif
4510  {
4511  __pyx_t_3 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 90, __pyx_L1_error)
4512  __Pyx_GOTREF(__pyx_t_3);
4513  if (__pyx_t_6) {
4514  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL;
4515  }
4516  __Pyx_INCREF(__pyx_float_0_0);
4517  __Pyx_GIVEREF(__pyx_float_0_0);
4518  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_8, __pyx_float_0_0);
4519  __Pyx_INCREF(__pyx_float_0_5);
4520  __Pyx_GIVEREF(__pyx_float_0_5);
4521  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_8, __pyx_float_0_5);
4522  __Pyx_GIVEREF(__pyx_t_4);
4523  PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_8, __pyx_t_4);
4524  __pyx_t_4 = 0;
4525  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error)
4526  __Pyx_GOTREF(__pyx_t_2);
4527  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4528  }
4529  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4530  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rfl_pts, __pyx_t_2) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
4531  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4532 
4533  /* "dtocean.pyx":92
4534  * self.rfl_pts = np.linspace(0.0,0.5,shps[2])
4535  *
4536  * self.tslut = np.zeros_like(self.toas) # <<<<<<<<<<<<<<
4537  * self.tblut = np.zeros_like(self.toab)
4538  * for iwl in range(shps[0]):
4539  */
4540  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error)
4541  __Pyx_GOTREF(__pyx_t_1);
4542  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 92, __pyx_L1_error)
4543  __Pyx_GOTREF(__pyx_t_3);
4544  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4545  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_toas); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error)
4546  __Pyx_GOTREF(__pyx_t_1);
4547  __pyx_t_4 = NULL;
4548  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4549  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4550  if (likely(__pyx_t_4)) {
4551  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4552  __Pyx_INCREF(__pyx_t_4);
4553  __Pyx_INCREF(function);
4554  __Pyx_DECREF_SET(__pyx_t_3, function);
4555  }
4556  }
4557  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1);
4558  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4559  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4560  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error)
4561  __Pyx_GOTREF(__pyx_t_2);
4562  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4563  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tslut, __pyx_t_2) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
4564  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4565 
4566  /* "dtocean.pyx":93
4567  *
4568  * self.tslut = np.zeros_like(self.toas)
4569  * self.tblut = np.zeros_like(self.toab) # <<<<<<<<<<<<<<
4570  * for iwl in range(shps[0]):
4571  * for ism in range(shps[1]):
4572  */
4573  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error)
4574  __Pyx_GOTREF(__pyx_t_3);
4575  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error)
4576  __Pyx_GOTREF(__pyx_t_1);
4577  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4578  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_toab); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error)
4579  __Pyx_GOTREF(__pyx_t_3);
4580  __pyx_t_4 = NULL;
4581  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
4582  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
4583  if (likely(__pyx_t_4)) {
4584  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
4585  __Pyx_INCREF(__pyx_t_4);
4586  __Pyx_INCREF(function);
4587  __Pyx_DECREF_SET(__pyx_t_1, function);
4588  }
4589  }
4590  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3);
4591  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4592  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4593  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error)
4594  __Pyx_GOTREF(__pyx_t_2);
4595  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4596  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tblut, __pyx_t_2) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
4597  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4598 
4599  /* "dtocean.pyx":94
4600  * self.tslut = np.zeros_like(self.toas)
4601  * self.tblut = np.zeros_like(self.toab)
4602  * for iwl in range(shps[0]): # <<<<<<<<<<<<<<
4603  * for ism in range(shps[1]):
4604  * for iwn in range(shps[3]):
4605  */
4606  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_shps, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error)
4607  __Pyx_GOTREF(__pyx_t_2);
4608  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
4609  __Pyx_GOTREF(__pyx_t_1);
4610  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4611  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
4612  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
4613  __pyx_t_10 = NULL;
4614  } else {
4615  __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error)
4616  __Pyx_GOTREF(__pyx_t_2);
4617  __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 94, __pyx_L1_error)
4618  }
4619  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4620  for (;;) {
4621  if (likely(!__pyx_t_10)) {
4622  if (likely(PyList_CheckExact(__pyx_t_2))) {
4623  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
4624  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4625  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 94, __pyx_L1_error)
4626  #else
4627  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
4628  __Pyx_GOTREF(__pyx_t_1);
4629  #endif
4630  } else {
4631  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
4632  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4633  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 94, __pyx_L1_error)
4634  #else
4635  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
4636  __Pyx_GOTREF(__pyx_t_1);
4637  #endif
4638  }
4639  } else {
4640  __pyx_t_1 = __pyx_t_10(__pyx_t_2);
4641  if (unlikely(!__pyx_t_1)) {
4642  PyObject* exc_type = PyErr_Occurred();
4643  if (exc_type) {
4644  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4645  else __PYX_ERR(0, 94, __pyx_L1_error)
4646  }
4647  break;
4648  }
4649  __Pyx_GOTREF(__pyx_t_1);
4650  }
4651  __Pyx_XDECREF_SET(__pyx_v_iwl, __pyx_t_1);
4652  __pyx_t_1 = 0;
4653 
4654  /* "dtocean.pyx":95
4655  * self.tblut = np.zeros_like(self.toab)
4656  * for iwl in range(shps[0]):
4657  * for ism in range(shps[1]): # <<<<<<<<<<<<<<
4658  * for iwn in range(shps[3]):
4659  * for isz in range(shps[4]):
4660  */
4661  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_shps, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error)
4662  __Pyx_GOTREF(__pyx_t_1);
4663  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error)
4664  __Pyx_GOTREF(__pyx_t_3);
4665  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4666  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
4667  __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_11 = 0;
4668  __pyx_t_12 = NULL;
4669  } else {
4670  __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error)
4671  __Pyx_GOTREF(__pyx_t_1);
4672  __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 95, __pyx_L1_error)
4673  }
4674  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4675  for (;;) {
4676  if (likely(!__pyx_t_12)) {
4677  if (likely(PyList_CheckExact(__pyx_t_1))) {
4678  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_1)) break;
4679  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4680  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 95, __pyx_L1_error)
4681  #else
4682  __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error)
4683  __Pyx_GOTREF(__pyx_t_3);
4684  #endif
4685  } else {
4686  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
4687  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4688  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 95, __pyx_L1_error)
4689  #else
4690  __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error)
4691  __Pyx_GOTREF(__pyx_t_3);
4692  #endif
4693  }
4694  } else {
4695  __pyx_t_3 = __pyx_t_12(__pyx_t_1);
4696  if (unlikely(!__pyx_t_3)) {
4697  PyObject* exc_type = PyErr_Occurred();
4698  if (exc_type) {
4699  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4700  else __PYX_ERR(0, 95, __pyx_L1_error)
4701  }
4702  break;
4703  }
4704  __Pyx_GOTREF(__pyx_t_3);
4705  }
4706  __Pyx_XDECREF_SET(__pyx_v_ism, __pyx_t_3);
4707  __pyx_t_3 = 0;
4708 
4709  /* "dtocean.pyx":96
4710  * for iwl in range(shps[0]):
4711  * for ism in range(shps[1]):
4712  * for iwn in range(shps[3]): # <<<<<<<<<<<<<<
4713  * for isz in range(shps[4]):
4714  * for ith in range(shps[5]):
4715  */
4716  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_shps, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L1_error)
4717  __Pyx_GOTREF(__pyx_t_3);
4718  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error)
4719  __Pyx_GOTREF(__pyx_t_4);
4720  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4721  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
4722  __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_13 = 0;
4723  __pyx_t_14 = NULL;
4724  } else {
4725  __pyx_t_13 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L1_error)
4726  __Pyx_GOTREF(__pyx_t_3);
4727  __pyx_t_14 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 96, __pyx_L1_error)
4728  }
4729  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4730  for (;;) {
4731  if (likely(!__pyx_t_14)) {
4732  if (likely(PyList_CheckExact(__pyx_t_3))) {
4733  if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_3)) break;
4734  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4735  __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_13); __Pyx_INCREF(__pyx_t_4); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 96, __pyx_L1_error)
4736  #else
4737  __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error)
4738  __Pyx_GOTREF(__pyx_t_4);
4739  #endif
4740  } else {
4741  if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
4742  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4743  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_13); __Pyx_INCREF(__pyx_t_4); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 96, __pyx_L1_error)
4744  #else
4745  __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error)
4746  __Pyx_GOTREF(__pyx_t_4);
4747  #endif
4748  }
4749  } else {
4750  __pyx_t_4 = __pyx_t_14(__pyx_t_3);
4751  if (unlikely(!__pyx_t_4)) {
4752  PyObject* exc_type = PyErr_Occurred();
4753  if (exc_type) {
4754  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4755  else __PYX_ERR(0, 96, __pyx_L1_error)
4756  }
4757  break;
4758  }
4759  __Pyx_GOTREF(__pyx_t_4);
4760  }
4761  __Pyx_XDECREF_SET(__pyx_v_iwn, __pyx_t_4);
4762  __pyx_t_4 = 0;
4763 
4764  /* "dtocean.pyx":97
4765  * for ism in range(shps[1]):
4766  * for iwn in range(shps[3]):
4767  * for isz in range(shps[4]): # <<<<<<<<<<<<<<
4768  * for ith in range(shps[5]):
4769  * for iph in range(shps[6]):
4770  */
4771  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_shps, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error)
4772  __Pyx_GOTREF(__pyx_t_4);
4773  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error)
4774  __Pyx_GOTREF(__pyx_t_6);
4775  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4776  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
4777  __pyx_t_4 = __pyx_t_6; __Pyx_INCREF(__pyx_t_4); __pyx_t_15 = 0;
4778  __pyx_t_16 = NULL;
4779  } else {
4780  __pyx_t_15 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error)
4781  __Pyx_GOTREF(__pyx_t_4);
4782  __pyx_t_16 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 97, __pyx_L1_error)
4783  }
4784  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4785  for (;;) {
4786  if (likely(!__pyx_t_16)) {
4787  if (likely(PyList_CheckExact(__pyx_t_4))) {
4788  if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_4)) break;
4789  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4790  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_15); __Pyx_INCREF(__pyx_t_6); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 97, __pyx_L1_error)
4791  #else
4792  __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error)
4793  __Pyx_GOTREF(__pyx_t_6);
4794  #endif
4795  } else {
4796  if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
4797  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4798  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_15); __Pyx_INCREF(__pyx_t_6); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 97, __pyx_L1_error)
4799  #else
4800  __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error)
4801  __Pyx_GOTREF(__pyx_t_6);
4802  #endif
4803  }
4804  } else {
4805  __pyx_t_6 = __pyx_t_16(__pyx_t_4);
4806  if (unlikely(!__pyx_t_6)) {
4807  PyObject* exc_type = PyErr_Occurred();
4808  if (exc_type) {
4809  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4810  else __PYX_ERR(0, 97, __pyx_L1_error)
4811  }
4812  break;
4813  }
4814  __Pyx_GOTREF(__pyx_t_6);
4815  }
4816  __Pyx_XDECREF_SET(__pyx_v_isz, __pyx_t_6);
4817  __pyx_t_6 = 0;
4818 
4819  /* "dtocean.pyx":98
4820  * for iwn in range(shps[3]):
4821  * for isz in range(shps[4]):
4822  * for ith in range(shps[5]): # <<<<<<<<<<<<<<
4823  * for iph in range(shps[6]):
4824  * self.tslut[iwl,ism,:,iwn,isz,ith,iph] = \
4825  */
4826  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_shps, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error)
4827  __Pyx_GOTREF(__pyx_t_6);
4828  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 98, __pyx_L1_error)
4829  __Pyx_GOTREF(__pyx_t_5);
4830  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4831  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
4832  __pyx_t_6 = __pyx_t_5; __Pyx_INCREF(__pyx_t_6); __pyx_t_17 = 0;
4833  __pyx_t_18 = NULL;
4834  } else {
4835  __pyx_t_17 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error)
4836  __Pyx_GOTREF(__pyx_t_6);
4837  __pyx_t_18 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 98, __pyx_L1_error)
4838  }
4839  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4840  for (;;) {
4841  if (likely(!__pyx_t_18)) {
4842  if (likely(PyList_CheckExact(__pyx_t_6))) {
4843  if (__pyx_t_17 >= PyList_GET_SIZE(__pyx_t_6)) break;
4844  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4845  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_17); __Pyx_INCREF(__pyx_t_5); __pyx_t_17++; if (unlikely(0 < 0)) __PYX_ERR(0, 98, __pyx_L1_error)
4846  #else
4847  __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 98, __pyx_L1_error)
4848  __Pyx_GOTREF(__pyx_t_5);
4849  #endif
4850  } else {
4851  if (__pyx_t_17 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
4852  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4853  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_17); __Pyx_INCREF(__pyx_t_5); __pyx_t_17++; if (unlikely(0 < 0)) __PYX_ERR(0, 98, __pyx_L1_error)
4854  #else
4855  __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 98, __pyx_L1_error)
4856  __Pyx_GOTREF(__pyx_t_5);
4857  #endif
4858  }
4859  } else {
4860  __pyx_t_5 = __pyx_t_18(__pyx_t_6);
4861  if (unlikely(!__pyx_t_5)) {
4862  PyObject* exc_type = PyErr_Occurred();
4863  if (exc_type) {
4864  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4865  else __PYX_ERR(0, 98, __pyx_L1_error)
4866  }
4867  break;
4868  }
4869  __Pyx_GOTREF(__pyx_t_5);
4870  }
4871  __Pyx_XDECREF_SET(__pyx_v_ith, __pyx_t_5);
4872  __pyx_t_5 = 0;
4873 
4874  /* "dtocean.pyx":99
4875  * for isz in range(shps[4]):
4876  * for ith in range(shps[5]):
4877  * for iph in range(shps[6]): # <<<<<<<<<<<<<<
4878  * self.tslut[iwl,ism,:,iwn,isz,ith,iph] = \
4879  * np.interp(self.rfl_pts,self.toas[iwl,ism,:,iwn,isz,ith,iph],self.tau_pts)
4880  */
4881  __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_shps, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 99, __pyx_L1_error)
4882  __Pyx_GOTREF(__pyx_t_5);
4883  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 99, __pyx_L1_error)
4884  __Pyx_GOTREF(__pyx_t_7);
4885  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4886  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
4887  __pyx_t_5 = __pyx_t_7; __Pyx_INCREF(__pyx_t_5); __pyx_t_19 = 0;
4888  __pyx_t_20 = NULL;
4889  } else {
4890  __pyx_t_19 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 99, __pyx_L1_error)
4891  __Pyx_GOTREF(__pyx_t_5);
4892  __pyx_t_20 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 99, __pyx_L1_error)
4893  }
4894  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4895  for (;;) {
4896  if (likely(!__pyx_t_20)) {
4897  if (likely(PyList_CheckExact(__pyx_t_5))) {
4898  if (__pyx_t_19 >= PyList_GET_SIZE(__pyx_t_5)) break;
4899  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4900  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_19); __Pyx_INCREF(__pyx_t_7); __pyx_t_19++; if (unlikely(0 < 0)) __PYX_ERR(0, 99, __pyx_L1_error)
4901  #else
4902  __pyx_t_7 = PySequence_ITEM(__pyx_t_5, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 99, __pyx_L1_error)
4903  __Pyx_GOTREF(__pyx_t_7);
4904  #endif
4905  } else {
4906  if (__pyx_t_19 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
4907  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4908  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_19); __Pyx_INCREF(__pyx_t_7); __pyx_t_19++; if (unlikely(0 < 0)) __PYX_ERR(0, 99, __pyx_L1_error)
4909  #else
4910  __pyx_t_7 = PySequence_ITEM(__pyx_t_5, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 99, __pyx_L1_error)
4911  __Pyx_GOTREF(__pyx_t_7);
4912  #endif
4913  }
4914  } else {
4915  __pyx_t_7 = __pyx_t_20(__pyx_t_5);
4916  if (unlikely(!__pyx_t_7)) {
4917  PyObject* exc_type = PyErr_Occurred();
4918  if (exc_type) {
4919  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4920  else __PYX_ERR(0, 99, __pyx_L1_error)
4921  }
4922  break;
4923  }
4924  __Pyx_GOTREF(__pyx_t_7);
4925  }
4926  __Pyx_XDECREF_SET(__pyx_v_iph, __pyx_t_7);
4927  __pyx_t_7 = 0;
4928 
4929  /* "dtocean.pyx":101
4930  * for iph in range(shps[6]):
4931  * self.tslut[iwl,ism,:,iwn,isz,ith,iph] = \
4932  * np.interp(self.rfl_pts,self.toas[iwl,ism,:,iwn,isz,ith,iph],self.tau_pts) # <<<<<<<<<<<<<<
4933  *
4934  * for iwl in range(shpb[0]):
4935  */
4936  __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_n_s_np); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 101, __pyx_L1_error)
4937  __Pyx_GOTREF(__pyx_t_21);
4938  __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_interp); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 101, __pyx_L1_error)
4939  __Pyx_GOTREF(__pyx_t_22);
4940  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
4941  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rfl_pts); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 101, __pyx_L1_error)
4942  __Pyx_GOTREF(__pyx_t_21);
4943  __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_toas); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 101, __pyx_L1_error)
4944  __Pyx_GOTREF(__pyx_t_23);
4945  __pyx_t_24 = PyTuple_New(7); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 101, __pyx_L1_error)
4946  __Pyx_GOTREF(__pyx_t_24);
4947  __Pyx_INCREF(__pyx_v_iwl);
4948  __Pyx_GIVEREF(__pyx_v_iwl);
4949  PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_v_iwl);
4950  __Pyx_INCREF(__pyx_v_ism);
4951  __Pyx_GIVEREF(__pyx_v_ism);
4952  PyTuple_SET_ITEM(__pyx_t_24, 1, __pyx_v_ism);
4953  __Pyx_INCREF(__pyx_slice__4);
4954  __Pyx_GIVEREF(__pyx_slice__4);
4955  PyTuple_SET_ITEM(__pyx_t_24, 2, __pyx_slice__4);
4956  __Pyx_INCREF(__pyx_v_iwn);
4957  __Pyx_GIVEREF(__pyx_v_iwn);
4958  PyTuple_SET_ITEM(__pyx_t_24, 3, __pyx_v_iwn);
4959  __Pyx_INCREF(__pyx_v_isz);
4960  __Pyx_GIVEREF(__pyx_v_isz);
4961  PyTuple_SET_ITEM(__pyx_t_24, 4, __pyx_v_isz);
4962  __Pyx_INCREF(__pyx_v_ith);
4963  __Pyx_GIVEREF(__pyx_v_ith);
4964  PyTuple_SET_ITEM(__pyx_t_24, 5, __pyx_v_ith);
4965  __Pyx_INCREF(__pyx_v_iph);
4966  __Pyx_GIVEREF(__pyx_v_iph);
4967  PyTuple_SET_ITEM(__pyx_t_24, 6, __pyx_v_iph);
4968  __pyx_t_25 = __Pyx_PyObject_GetItem(__pyx_t_23, __pyx_t_24); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 101, __pyx_L1_error)
4969  __Pyx_GOTREF(__pyx_t_25);
4970  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
4971  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
4972  __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tau_pts); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 101, __pyx_L1_error)
4973  __Pyx_GOTREF(__pyx_t_24);
4974  __pyx_t_23 = NULL;
4975  __pyx_t_8 = 0;
4976  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_22))) {
4977  __pyx_t_23 = PyMethod_GET_SELF(__pyx_t_22);
4978  if (likely(__pyx_t_23)) {
4979  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_22);
4980  __Pyx_INCREF(__pyx_t_23);
4981  __Pyx_INCREF(function);
4982  __Pyx_DECREF_SET(__pyx_t_22, function);
4983  __pyx_t_8 = 1;
4984  }
4985  }
4986  #if CYTHON_FAST_PYCALL
4987  if (PyFunction_Check(__pyx_t_22)) {
4988  PyObject *__pyx_temp[4] = {__pyx_t_23, __pyx_t_21, __pyx_t_25, __pyx_t_24};
4989  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_22, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 101, __pyx_L1_error)
4990  __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
4991  __Pyx_GOTREF(__pyx_t_7);
4992  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
4993  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
4994  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
4995  } else
4996  #endif
4997  #if CYTHON_FAST_PYCCALL
4998  if (__Pyx_PyFastCFunction_Check(__pyx_t_22)) {
4999  PyObject *__pyx_temp[4] = {__pyx_t_23, __pyx_t_21, __pyx_t_25, __pyx_t_24};
5000  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_22, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 101, __pyx_L1_error)
5001  __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
5002  __Pyx_GOTREF(__pyx_t_7);
5003  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
5004  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
5005  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
5006  } else
5007  #endif
5008  {
5009  __pyx_t_26 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 101, __pyx_L1_error)
5010  __Pyx_GOTREF(__pyx_t_26);
5011  if (__pyx_t_23) {
5012  __Pyx_GIVEREF(__pyx_t_23); PyTuple_SET_ITEM(__pyx_t_26, 0, __pyx_t_23); __pyx_t_23 = NULL;
5013  }
5014  __Pyx_GIVEREF(__pyx_t_21);
5015  PyTuple_SET_ITEM(__pyx_t_26, 0+__pyx_t_8, __pyx_t_21);
5016  __Pyx_GIVEREF(__pyx_t_25);
5017  PyTuple_SET_ITEM(__pyx_t_26, 1+__pyx_t_8, __pyx_t_25);
5018  __Pyx_GIVEREF(__pyx_t_24);
5019  PyTuple_SET_ITEM(__pyx_t_26, 2+__pyx_t_8, __pyx_t_24);
5020  __pyx_t_21 = 0;
5021  __pyx_t_25 = 0;
5022  __pyx_t_24 = 0;
5023  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_22, __pyx_t_26, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 101, __pyx_L1_error)
5024  __Pyx_GOTREF(__pyx_t_7);
5025  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
5026  }
5027  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
5028 
5029  /* "dtocean.pyx":100
5030  * for ith in range(shps[5]):
5031  * for iph in range(shps[6]):
5032  * self.tslut[iwl,ism,:,iwn,isz,ith,iph] = \ # <<<<<<<<<<<<<<
5033  * np.interp(self.rfl_pts,self.toas[iwl,ism,:,iwn,isz,ith,iph],self.tau_pts)
5034  *
5035  */
5036  __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tslut); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 100, __pyx_L1_error)
5037  __Pyx_GOTREF(__pyx_t_22);
5038  __pyx_t_26 = PyTuple_New(7); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 100, __pyx_L1_error)
5039  __Pyx_GOTREF(__pyx_t_26);
5040  __Pyx_INCREF(__pyx_v_iwl);
5041  __Pyx_GIVEREF(__pyx_v_iwl);
5042  PyTuple_SET_ITEM(__pyx_t_26, 0, __pyx_v_iwl);
5043  __Pyx_INCREF(__pyx_v_ism);
5044  __Pyx_GIVEREF(__pyx_v_ism);
5045  PyTuple_SET_ITEM(__pyx_t_26, 1, __pyx_v_ism);
5046  __Pyx_INCREF(__pyx_slice__4);
5047  __Pyx_GIVEREF(__pyx_slice__4);
5048  PyTuple_SET_ITEM(__pyx_t_26, 2, __pyx_slice__4);
5049  __Pyx_INCREF(__pyx_v_iwn);
5050  __Pyx_GIVEREF(__pyx_v_iwn);
5051  PyTuple_SET_ITEM(__pyx_t_26, 3, __pyx_v_iwn);
5052  __Pyx_INCREF(__pyx_v_isz);
5053  __Pyx_GIVEREF(__pyx_v_isz);
5054  PyTuple_SET_ITEM(__pyx_t_26, 4, __pyx_v_isz);
5055  __Pyx_INCREF(__pyx_v_ith);
5056  __Pyx_GIVEREF(__pyx_v_ith);
5057  PyTuple_SET_ITEM(__pyx_t_26, 5, __pyx_v_ith);
5058  __Pyx_INCREF(__pyx_v_iph);
5059  __Pyx_GIVEREF(__pyx_v_iph);
5060  PyTuple_SET_ITEM(__pyx_t_26, 6, __pyx_v_iph);
5061  if (unlikely(PyObject_SetItem(__pyx_t_22, __pyx_t_26, __pyx_t_7) < 0)) __PYX_ERR(0, 100, __pyx_L1_error)
5062  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
5063  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
5064  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5065 
5066  /* "dtocean.pyx":99
5067  * for isz in range(shps[4]):
5068  * for ith in range(shps[5]):
5069  * for iph in range(shps[6]): # <<<<<<<<<<<<<<
5070  * self.tslut[iwl,ism,:,iwn,isz,ith,iph] = \
5071  * np.interp(self.rfl_pts,self.toas[iwl,ism,:,iwn,isz,ith,iph],self.tau_pts)
5072  */
5073  }
5074  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5075 
5076  /* "dtocean.pyx":98
5077  * for iwn in range(shps[3]):
5078  * for isz in range(shps[4]):
5079  * for ith in range(shps[5]): # <<<<<<<<<<<<<<
5080  * for iph in range(shps[6]):
5081  * self.tslut[iwl,ism,:,iwn,isz,ith,iph] = \
5082  */
5083  }
5084  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5085 
5086  /* "dtocean.pyx":97
5087  * for ism in range(shps[1]):
5088  * for iwn in range(shps[3]):
5089  * for isz in range(shps[4]): # <<<<<<<<<<<<<<
5090  * for ith in range(shps[5]):
5091  * for iph in range(shps[6]):
5092  */
5093  }
5094  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5095 
5096  /* "dtocean.pyx":96
5097  * for iwl in range(shps[0]):
5098  * for ism in range(shps[1]):
5099  * for iwn in range(shps[3]): # <<<<<<<<<<<<<<
5100  * for isz in range(shps[4]):
5101  * for ith in range(shps[5]):
5102  */
5103  }
5104  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5105 
5106  /* "dtocean.pyx":95
5107  * self.tblut = np.zeros_like(self.toab)
5108  * for iwl in range(shps[0]):
5109  * for ism in range(shps[1]): # <<<<<<<<<<<<<<
5110  * for iwn in range(shps[3]):
5111  * for isz in range(shps[4]):
5112  */
5113  }
5114  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5115 
5116  /* "dtocean.pyx":94
5117  * self.tslut = np.zeros_like(self.toas)
5118  * self.tblut = np.zeros_like(self.toab)
5119  * for iwl in range(shps[0]): # <<<<<<<<<<<<<<
5120  * for ism in range(shps[1]):
5121  * for iwn in range(shps[3]):
5122  */
5123  }
5124  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5125 
5126  /* "dtocean.pyx":103
5127  * np.interp(self.rfl_pts,self.toas[iwl,ism,:,iwn,isz,ith,iph],self.tau_pts)
5128  *
5129  * for iwl in range(shpb[0]): # <<<<<<<<<<<<<<
5130  * for ism in range(shpb[1]):
5131  * for iwn in range(shpb[3]):
5132  */
5133  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_shpb, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error)
5134  __Pyx_GOTREF(__pyx_t_2);
5135  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error)
5136  __Pyx_GOTREF(__pyx_t_1);
5137  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5138  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
5139  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
5140  __pyx_t_10 = NULL;
5141  } else {
5142  __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error)
5143  __Pyx_GOTREF(__pyx_t_2);
5144  __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 103, __pyx_L1_error)
5145  }
5146  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5147  for (;;) {
5148  if (likely(!__pyx_t_10)) {
5149  if (likely(PyList_CheckExact(__pyx_t_2))) {
5150  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
5151  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5152  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 103, __pyx_L1_error)
5153  #else
5154  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error)
5155  __Pyx_GOTREF(__pyx_t_1);
5156  #endif
5157  } else {
5158  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
5159  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5160  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 103, __pyx_L1_error)
5161  #else
5162  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error)
5163  __Pyx_GOTREF(__pyx_t_1);
5164  #endif
5165  }
5166  } else {
5167  __pyx_t_1 = __pyx_t_10(__pyx_t_2);
5168  if (unlikely(!__pyx_t_1)) {
5169  PyObject* exc_type = PyErr_Occurred();
5170  if (exc_type) {
5171  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5172  else __PYX_ERR(0, 103, __pyx_L1_error)
5173  }
5174  break;
5175  }
5176  __Pyx_GOTREF(__pyx_t_1);
5177  }
5178  __Pyx_XDECREF_SET(__pyx_v_iwl, __pyx_t_1);
5179  __pyx_t_1 = 0;
5180 
5181  /* "dtocean.pyx":104
5182  *
5183  * for iwl in range(shpb[0]):
5184  * for ism in range(shpb[1]): # <<<<<<<<<<<<<<
5185  * for iwn in range(shpb[3]):
5186  * for isz in range(shpb[4]):
5187  */
5188  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_shpb, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error)
5189  __Pyx_GOTREF(__pyx_t_1);
5190  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error)
5191  __Pyx_GOTREF(__pyx_t_3);
5192  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5193  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
5194  __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_11 = 0;
5195  __pyx_t_12 = NULL;
5196  } else {
5197  __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error)
5198  __Pyx_GOTREF(__pyx_t_1);
5199  __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 104, __pyx_L1_error)
5200  }
5201  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5202  for (;;) {
5203  if (likely(!__pyx_t_12)) {
5204  if (likely(PyList_CheckExact(__pyx_t_1))) {
5205  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_1)) break;
5206  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5207  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 104, __pyx_L1_error)
5208  #else
5209  __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error)
5210  __Pyx_GOTREF(__pyx_t_3);
5211  #endif
5212  } else {
5213  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
5214  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5215  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 104, __pyx_L1_error)
5216  #else
5217  __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error)
5218  __Pyx_GOTREF(__pyx_t_3);
5219  #endif
5220  }
5221  } else {
5222  __pyx_t_3 = __pyx_t_12(__pyx_t_1);
5223  if (unlikely(!__pyx_t_3)) {
5224  PyObject* exc_type = PyErr_Occurred();
5225  if (exc_type) {
5226  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5227  else __PYX_ERR(0, 104, __pyx_L1_error)
5228  }
5229  break;
5230  }
5231  __Pyx_GOTREF(__pyx_t_3);
5232  }
5233  __Pyx_XDECREF_SET(__pyx_v_ism, __pyx_t_3);
5234  __pyx_t_3 = 0;
5235 
5236  /* "dtocean.pyx":105
5237  * for iwl in range(shpb[0]):
5238  * for ism in range(shpb[1]):
5239  * for iwn in range(shpb[3]): # <<<<<<<<<<<<<<
5240  * for isz in range(shpb[4]):
5241  * for ith in range(shpb[5]):
5242  */
5243  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_shpb, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 105, __pyx_L1_error)
5244  __Pyx_GOTREF(__pyx_t_3);
5245  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error)
5246  __Pyx_GOTREF(__pyx_t_4);
5247  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5248  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
5249  __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_13 = 0;
5250  __pyx_t_14 = NULL;
5251  } else {
5252  __pyx_t_13 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 105, __pyx_L1_error)
5253  __Pyx_GOTREF(__pyx_t_3);
5254  __pyx_t_14 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 105, __pyx_L1_error)
5255  }
5256  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5257  for (;;) {
5258  if (likely(!__pyx_t_14)) {
5259  if (likely(PyList_CheckExact(__pyx_t_3))) {
5260  if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_3)) break;
5261  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5262  __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_13); __Pyx_INCREF(__pyx_t_4); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 105, __pyx_L1_error)
5263  #else
5264  __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error)
5265  __Pyx_GOTREF(__pyx_t_4);
5266  #endif
5267  } else {
5268  if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
5269  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5270  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_13); __Pyx_INCREF(__pyx_t_4); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 105, __pyx_L1_error)
5271  #else
5272  __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error)
5273  __Pyx_GOTREF(__pyx_t_4);
5274  #endif
5275  }
5276  } else {
5277  __pyx_t_4 = __pyx_t_14(__pyx_t_3);
5278  if (unlikely(!__pyx_t_4)) {
5279  PyObject* exc_type = PyErr_Occurred();
5280  if (exc_type) {
5281  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5282  else __PYX_ERR(0, 105, __pyx_L1_error)
5283  }
5284  break;
5285  }
5286  __Pyx_GOTREF(__pyx_t_4);
5287  }
5288  __Pyx_XDECREF_SET(__pyx_v_iwn, __pyx_t_4);
5289  __pyx_t_4 = 0;
5290 
5291  /* "dtocean.pyx":106
5292  * for ism in range(shpb[1]):
5293  * for iwn in range(shpb[3]):
5294  * for isz in range(shpb[4]): # <<<<<<<<<<<<<<
5295  * for ith in range(shpb[5]):
5296  * for iph in range(shpb[6]):
5297  */
5298  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_shpb, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 106, __pyx_L1_error)
5299  __Pyx_GOTREF(__pyx_t_4);
5300  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 106, __pyx_L1_error)
5301  __Pyx_GOTREF(__pyx_t_6);
5302  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5303  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
5304  __pyx_t_4 = __pyx_t_6; __Pyx_INCREF(__pyx_t_4); __pyx_t_15 = 0;
5305  __pyx_t_16 = NULL;
5306  } else {
5307  __pyx_t_15 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 106, __pyx_L1_error)
5308  __Pyx_GOTREF(__pyx_t_4);
5309  __pyx_t_16 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 106, __pyx_L1_error)
5310  }
5311  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5312  for (;;) {
5313  if (likely(!__pyx_t_16)) {
5314  if (likely(PyList_CheckExact(__pyx_t_4))) {
5315  if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_4)) break;
5316  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5317  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_15); __Pyx_INCREF(__pyx_t_6); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 106, __pyx_L1_error)
5318  #else
5319  __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 106, __pyx_L1_error)
5320  __Pyx_GOTREF(__pyx_t_6);
5321  #endif
5322  } else {
5323  if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
5324  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5325  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_15); __Pyx_INCREF(__pyx_t_6); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 106, __pyx_L1_error)
5326  #else
5327  __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 106, __pyx_L1_error)
5328  __Pyx_GOTREF(__pyx_t_6);
5329  #endif
5330  }
5331  } else {
5332  __pyx_t_6 = __pyx_t_16(__pyx_t_4);
5333  if (unlikely(!__pyx_t_6)) {
5334  PyObject* exc_type = PyErr_Occurred();
5335  if (exc_type) {
5336  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5337  else __PYX_ERR(0, 106, __pyx_L1_error)
5338  }
5339  break;
5340  }
5341  __Pyx_GOTREF(__pyx_t_6);
5342  }
5343  __Pyx_XDECREF_SET(__pyx_v_isz, __pyx_t_6);
5344  __pyx_t_6 = 0;
5345 
5346  /* "dtocean.pyx":107
5347  * for iwn in range(shpb[3]):
5348  * for isz in range(shpb[4]):
5349  * for ith in range(shpb[5]): # <<<<<<<<<<<<<<
5350  * for iph in range(shpb[6]):
5351  * self.tblut[iwl,ism,:,iwn,isz,ith,iph] = \
5352  */
5353  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_shpb, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 107, __pyx_L1_error)
5354  __Pyx_GOTREF(__pyx_t_6);
5355  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 107, __pyx_L1_error)
5356  __Pyx_GOTREF(__pyx_t_5);
5357  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5358  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
5359  __pyx_t_6 = __pyx_t_5; __Pyx_INCREF(__pyx_t_6); __pyx_t_17 = 0;
5360  __pyx_t_18 = NULL;
5361  } else {
5362  __pyx_t_17 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 107, __pyx_L1_error)
5363  __Pyx_GOTREF(__pyx_t_6);
5364  __pyx_t_18 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 107, __pyx_L1_error)
5365  }
5366  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5367  for (;;) {
5368  if (likely(!__pyx_t_18)) {
5369  if (likely(PyList_CheckExact(__pyx_t_6))) {
5370  if (__pyx_t_17 >= PyList_GET_SIZE(__pyx_t_6)) break;
5371  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5372  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_17); __Pyx_INCREF(__pyx_t_5); __pyx_t_17++; if (unlikely(0 < 0)) __PYX_ERR(0, 107, __pyx_L1_error)
5373  #else
5374  __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 107, __pyx_L1_error)
5375  __Pyx_GOTREF(__pyx_t_5);
5376  #endif
5377  } else {
5378  if (__pyx_t_17 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
5379  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5380  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_17); __Pyx_INCREF(__pyx_t_5); __pyx_t_17++; if (unlikely(0 < 0)) __PYX_ERR(0, 107, __pyx_L1_error)
5381  #else
5382  __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 107, __pyx_L1_error)
5383  __Pyx_GOTREF(__pyx_t_5);
5384  #endif
5385  }
5386  } else {
5387  __pyx_t_5 = __pyx_t_18(__pyx_t_6);
5388  if (unlikely(!__pyx_t_5)) {
5389  PyObject* exc_type = PyErr_Occurred();
5390  if (exc_type) {
5391  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5392  else __PYX_ERR(0, 107, __pyx_L1_error)
5393  }
5394  break;
5395  }
5396  __Pyx_GOTREF(__pyx_t_5);
5397  }
5398  __Pyx_XDECREF_SET(__pyx_v_ith, __pyx_t_5);
5399  __pyx_t_5 = 0;
5400 
5401  /* "dtocean.pyx":108
5402  * for isz in range(shpb[4]):
5403  * for ith in range(shpb[5]):
5404  * for iph in range(shpb[6]): # <<<<<<<<<<<<<<
5405  * self.tblut[iwl,ism,:,iwn,isz,ith,iph] = \
5406  * np.interp(self.rfl_pts,self.toab[iwl,ism,:,iwn,isz,ith,iph],self.tau_pts)
5407  */
5408  __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_shpb, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 108, __pyx_L1_error)
5409  __Pyx_GOTREF(__pyx_t_5);
5410  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 108, __pyx_L1_error)
5411  __Pyx_GOTREF(__pyx_t_7);
5412  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5413  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
5414  __pyx_t_5 = __pyx_t_7; __Pyx_INCREF(__pyx_t_5); __pyx_t_19 = 0;
5415  __pyx_t_20 = NULL;
5416  } else {
5417  __pyx_t_19 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 108, __pyx_L1_error)
5418  __Pyx_GOTREF(__pyx_t_5);
5419  __pyx_t_20 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 108, __pyx_L1_error)
5420  }
5421  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5422  for (;;) {
5423  if (likely(!__pyx_t_20)) {
5424  if (likely(PyList_CheckExact(__pyx_t_5))) {
5425  if (__pyx_t_19 >= PyList_GET_SIZE(__pyx_t_5)) break;
5426  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5427  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_19); __Pyx_INCREF(__pyx_t_7); __pyx_t_19++; if (unlikely(0 < 0)) __PYX_ERR(0, 108, __pyx_L1_error)
5428  #else
5429  __pyx_t_7 = PySequence_ITEM(__pyx_t_5, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 108, __pyx_L1_error)
5430  __Pyx_GOTREF(__pyx_t_7);
5431  #endif
5432  } else {
5433  if (__pyx_t_19 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
5434  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5435  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_19); __Pyx_INCREF(__pyx_t_7); __pyx_t_19++; if (unlikely(0 < 0)) __PYX_ERR(0, 108, __pyx_L1_error)
5436  #else
5437  __pyx_t_7 = PySequence_ITEM(__pyx_t_5, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 108, __pyx_L1_error)
5438  __Pyx_GOTREF(__pyx_t_7);
5439  #endif
5440  }
5441  } else {
5442  __pyx_t_7 = __pyx_t_20(__pyx_t_5);
5443  if (unlikely(!__pyx_t_7)) {
5444  PyObject* exc_type = PyErr_Occurred();
5445  if (exc_type) {
5446  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5447  else __PYX_ERR(0, 108, __pyx_L1_error)
5448  }
5449  break;
5450  }
5451  __Pyx_GOTREF(__pyx_t_7);
5452  }
5453  __Pyx_XDECREF_SET(__pyx_v_iph, __pyx_t_7);
5454  __pyx_t_7 = 0;
5455 
5456  /* "dtocean.pyx":110
5457  * for iph in range(shpb[6]):
5458  * self.tblut[iwl,ism,:,iwn,isz,ith,iph] = \
5459  * np.interp(self.rfl_pts,self.toab[iwl,ism,:,iwn,isz,ith,iph],self.tau_pts) # <<<<<<<<<<<<<<
5460  *
5461  * print("interpolate to reflectance for each wavelength and model")
5462  */
5463  __Pyx_GetModuleGlobalName(__pyx_t_26, __pyx_n_s_np); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 110, __pyx_L1_error)
5464  __Pyx_GOTREF(__pyx_t_26);
5465  __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_interp); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 110, __pyx_L1_error)
5466  __Pyx_GOTREF(__pyx_t_22);
5467  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
5468  __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rfl_pts); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 110, __pyx_L1_error)
5469  __Pyx_GOTREF(__pyx_t_26);
5470  __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_toab); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 110, __pyx_L1_error)
5471  __Pyx_GOTREF(__pyx_t_24);
5472  __pyx_t_25 = PyTuple_New(7); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 110, __pyx_L1_error)
5473  __Pyx_GOTREF(__pyx_t_25);
5474  __Pyx_INCREF(__pyx_v_iwl);
5475  __Pyx_GIVEREF(__pyx_v_iwl);
5476  PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_v_iwl);
5477  __Pyx_INCREF(__pyx_v_ism);
5478  __Pyx_GIVEREF(__pyx_v_ism);
5479  PyTuple_SET_ITEM(__pyx_t_25, 1, __pyx_v_ism);
5480  __Pyx_INCREF(__pyx_slice__4);
5481  __Pyx_GIVEREF(__pyx_slice__4);
5482  PyTuple_SET_ITEM(__pyx_t_25, 2, __pyx_slice__4);
5483  __Pyx_INCREF(__pyx_v_iwn);
5484  __Pyx_GIVEREF(__pyx_v_iwn);
5485  PyTuple_SET_ITEM(__pyx_t_25, 3, __pyx_v_iwn);
5486  __Pyx_INCREF(__pyx_v_isz);
5487  __Pyx_GIVEREF(__pyx_v_isz);
5488  PyTuple_SET_ITEM(__pyx_t_25, 4, __pyx_v_isz);
5489  __Pyx_INCREF(__pyx_v_ith);
5490  __Pyx_GIVEREF(__pyx_v_ith);
5491  PyTuple_SET_ITEM(__pyx_t_25, 5, __pyx_v_ith);
5492  __Pyx_INCREF(__pyx_v_iph);
5493  __Pyx_GIVEREF(__pyx_v_iph);
5494  PyTuple_SET_ITEM(__pyx_t_25, 6, __pyx_v_iph);
5495  __pyx_t_21 = __Pyx_PyObject_GetItem(__pyx_t_24, __pyx_t_25); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 110, __pyx_L1_error)
5496  __Pyx_GOTREF(__pyx_t_21);
5497  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
5498  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
5499  __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tau_pts); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 110, __pyx_L1_error)
5500  __Pyx_GOTREF(__pyx_t_25);
5501  __pyx_t_24 = NULL;
5502  __pyx_t_8 = 0;
5503  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_22))) {
5504  __pyx_t_24 = PyMethod_GET_SELF(__pyx_t_22);
5505  if (likely(__pyx_t_24)) {
5506  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_22);
5507  __Pyx_INCREF(__pyx_t_24);
5508  __Pyx_INCREF(function);
5509  __Pyx_DECREF_SET(__pyx_t_22, function);
5510  __pyx_t_8 = 1;
5511  }
5512  }
5513  #if CYTHON_FAST_PYCALL
5514  if (PyFunction_Check(__pyx_t_22)) {
5515  PyObject *__pyx_temp[4] = {__pyx_t_24, __pyx_t_26, __pyx_t_21, __pyx_t_25};
5516  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_22, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 110, __pyx_L1_error)
5517  __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
5518  __Pyx_GOTREF(__pyx_t_7);
5519  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
5520  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
5521  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
5522  } else
5523  #endif
5524  #if CYTHON_FAST_PYCCALL
5525  if (__Pyx_PyFastCFunction_Check(__pyx_t_22)) {
5526  PyObject *__pyx_temp[4] = {__pyx_t_24, __pyx_t_26, __pyx_t_21, __pyx_t_25};
5527  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_22, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 110, __pyx_L1_error)
5528  __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
5529  __Pyx_GOTREF(__pyx_t_7);
5530  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
5531  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
5532  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
5533  } else
5534  #endif
5535  {
5536  __pyx_t_23 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 110, __pyx_L1_error)
5537  __Pyx_GOTREF(__pyx_t_23);
5538  if (__pyx_t_24) {
5539  __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_t_24); __pyx_t_24 = NULL;
5540  }
5541  __Pyx_GIVEREF(__pyx_t_26);
5542  PyTuple_SET_ITEM(__pyx_t_23, 0+__pyx_t_8, __pyx_t_26);
5543  __Pyx_GIVEREF(__pyx_t_21);
5544  PyTuple_SET_ITEM(__pyx_t_23, 1+__pyx_t_8, __pyx_t_21);
5545  __Pyx_GIVEREF(__pyx_t_25);
5546  PyTuple_SET_ITEM(__pyx_t_23, 2+__pyx_t_8, __pyx_t_25);
5547  __pyx_t_26 = 0;
5548  __pyx_t_21 = 0;
5549  __pyx_t_25 = 0;
5550  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_22, __pyx_t_23, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 110, __pyx_L1_error)
5551  __Pyx_GOTREF(__pyx_t_7);
5552  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
5553  }
5554  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
5555 
5556  /* "dtocean.pyx":109
5557  * for ith in range(shpb[5]):
5558  * for iph in range(shpb[6]):
5559  * self.tblut[iwl,ism,:,iwn,isz,ith,iph] = \ # <<<<<<<<<<<<<<
5560  * np.interp(self.rfl_pts,self.toab[iwl,ism,:,iwn,isz,ith,iph],self.tau_pts)
5561  *
5562  */
5563  __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tblut); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 109, __pyx_L1_error)
5564  __Pyx_GOTREF(__pyx_t_22);
5565  __pyx_t_23 = PyTuple_New(7); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 109, __pyx_L1_error)
5566  __Pyx_GOTREF(__pyx_t_23);
5567  __Pyx_INCREF(__pyx_v_iwl);
5568  __Pyx_GIVEREF(__pyx_v_iwl);
5569  PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_v_iwl);
5570  __Pyx_INCREF(__pyx_v_ism);
5571  __Pyx_GIVEREF(__pyx_v_ism);
5572  PyTuple_SET_ITEM(__pyx_t_23, 1, __pyx_v_ism);
5573  __Pyx_INCREF(__pyx_slice__4);
5574  __Pyx_GIVEREF(__pyx_slice__4);
5575  PyTuple_SET_ITEM(__pyx_t_23, 2, __pyx_slice__4);
5576  __Pyx_INCREF(__pyx_v_iwn);
5577  __Pyx_GIVEREF(__pyx_v_iwn);
5578  PyTuple_SET_ITEM(__pyx_t_23, 3, __pyx_v_iwn);
5579  __Pyx_INCREF(__pyx_v_isz);
5580  __Pyx_GIVEREF(__pyx_v_isz);
5581  PyTuple_SET_ITEM(__pyx_t_23, 4, __pyx_v_isz);
5582  __Pyx_INCREF(__pyx_v_ith);
5583  __Pyx_GIVEREF(__pyx_v_ith);
5584  PyTuple_SET_ITEM(__pyx_t_23, 5, __pyx_v_ith);
5585  __Pyx_INCREF(__pyx_v_iph);
5586  __Pyx_GIVEREF(__pyx_v_iph);
5587  PyTuple_SET_ITEM(__pyx_t_23, 6, __pyx_v_iph);
5588  if (unlikely(PyObject_SetItem(__pyx_t_22, __pyx_t_23, __pyx_t_7) < 0)) __PYX_ERR(0, 109, __pyx_L1_error)
5589  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
5590  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
5591  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5592 
5593  /* "dtocean.pyx":108
5594  * for isz in range(shpb[4]):
5595  * for ith in range(shpb[5]):
5596  * for iph in range(shpb[6]): # <<<<<<<<<<<<<<
5597  * self.tblut[iwl,ism,:,iwn,isz,ith,iph] = \
5598  * np.interp(self.rfl_pts,self.toab[iwl,ism,:,iwn,isz,ith,iph],self.tau_pts)
5599  */
5600  }
5601  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5602 
5603  /* "dtocean.pyx":107
5604  * for iwn in range(shpb[3]):
5605  * for isz in range(shpb[4]):
5606  * for ith in range(shpb[5]): # <<<<<<<<<<<<<<
5607  * for iph in range(shpb[6]):
5608  * self.tblut[iwl,ism,:,iwn,isz,ith,iph] = \
5609  */
5610  }
5611  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5612 
5613  /* "dtocean.pyx":106
5614  * for ism in range(shpb[1]):
5615  * for iwn in range(shpb[3]):
5616  * for isz in range(shpb[4]): # <<<<<<<<<<<<<<
5617  * for ith in range(shpb[5]):
5618  * for iph in range(shpb[6]):
5619  */
5620  }
5621  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5622 
5623  /* "dtocean.pyx":105
5624  * for iwl in range(shpb[0]):
5625  * for ism in range(shpb[1]):
5626  * for iwn in range(shpb[3]): # <<<<<<<<<<<<<<
5627  * for isz in range(shpb[4]):
5628  * for ith in range(shpb[5]):
5629  */
5630  }
5631  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5632 
5633  /* "dtocean.pyx":104
5634  *
5635  * for iwl in range(shpb[0]):
5636  * for ism in range(shpb[1]): # <<<<<<<<<<<<<<
5637  * for iwn in range(shpb[3]):
5638  * for isz in range(shpb[4]):
5639  */
5640  }
5641  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5642 
5643  /* "dtocean.pyx":103
5644  * np.interp(self.rfl_pts,self.toas[iwl,ism,:,iwn,isz,ith,iph],self.tau_pts)
5645  *
5646  * for iwl in range(shpb[0]): # <<<<<<<<<<<<<<
5647  * for ism in range(shpb[1]):
5648  * for iwn in range(shpb[3]):
5649  */
5650  }
5651  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5652 
5653  /* "dtocean.pyx":112
5654  * np.interp(self.rfl_pts,self.toab[iwl,ism,:,iwn,isz,ith,iph],self.tau_pts)
5655  *
5656  * print("interpolate to reflectance for each wavelength and model") # <<<<<<<<<<<<<<
5657  * for iwl in range(NWL):
5658  * for itau in range(NAOT):
5659  */
5660  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)
5661  __Pyx_GOTREF(__pyx_t_2);
5662  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5663 
5664  /* "dtocean.pyx":113
5665  *
5666  * print("interpolate to reflectance for each wavelength and model")
5667  * for iwl in range(NWL): # <<<<<<<<<<<<<<
5668  * for itau in range(NAOT):
5669  * for ism in range(NSMALL):
5670  */
5671  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_NWL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
5672  __Pyx_GOTREF(__pyx_t_2);
5673  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
5674  __Pyx_GOTREF(__pyx_t_1);
5675  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5676  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
5677  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
5678  __pyx_t_10 = NULL;
5679  } else {
5680  __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
5681  __Pyx_GOTREF(__pyx_t_2);
5682  __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 113, __pyx_L1_error)
5683  }
5684  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5685  for (;;) {
5686  if (likely(!__pyx_t_10)) {
5687  if (likely(PyList_CheckExact(__pyx_t_2))) {
5688  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
5689  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5690  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 113, __pyx_L1_error)
5691  #else
5692  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
5693  __Pyx_GOTREF(__pyx_t_1);
5694  #endif
5695  } else {
5696  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
5697  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5698  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 113, __pyx_L1_error)
5699  #else
5700  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
5701  __Pyx_GOTREF(__pyx_t_1);
5702  #endif
5703  }
5704  } else {
5705  __pyx_t_1 = __pyx_t_10(__pyx_t_2);
5706  if (unlikely(!__pyx_t_1)) {
5707  PyObject* exc_type = PyErr_Occurred();
5708  if (exc_type) {
5709  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5710  else __PYX_ERR(0, 113, __pyx_L1_error)
5711  }
5712  break;
5713  }
5714  __Pyx_GOTREF(__pyx_t_1);
5715  }
5716  __Pyx_XDECREF_SET(__pyx_v_iwl, __pyx_t_1);
5717  __pyx_t_1 = 0;
5718 
5719  /* "dtocean.pyx":114
5720  * print("interpolate to reflectance for each wavelength and model")
5721  * for iwl in range(NWL):
5722  * for itau in range(NAOT): # <<<<<<<<<<<<<<
5723  * for ism in range(NSMALL):
5724  * mrfls[ism,iwl,itau,:] = units * \
5725  */
5726  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NAOT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error)
5727  __Pyx_GOTREF(__pyx_t_1);
5728  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 114, __pyx_L1_error)
5729  __Pyx_GOTREF(__pyx_t_3);
5730  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5731  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
5732  __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_11 = 0;
5733  __pyx_t_12 = NULL;
5734  } else {
5735  __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error)
5736  __Pyx_GOTREF(__pyx_t_1);
5737  __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 114, __pyx_L1_error)
5738  }
5739  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5740  for (;;) {
5741  if (likely(!__pyx_t_12)) {
5742  if (likely(PyList_CheckExact(__pyx_t_1))) {
5743  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_1)) break;
5744  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5745  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 114, __pyx_L1_error)
5746  #else
5747  __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 114, __pyx_L1_error)
5748  __Pyx_GOTREF(__pyx_t_3);
5749  #endif
5750  } else {
5751  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
5752  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5753  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 114, __pyx_L1_error)
5754  #else
5755  __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 114, __pyx_L1_error)
5756  __Pyx_GOTREF(__pyx_t_3);
5757  #endif
5758  }
5759  } else {
5760  __pyx_t_3 = __pyx_t_12(__pyx_t_1);
5761  if (unlikely(!__pyx_t_3)) {
5762  PyObject* exc_type = PyErr_Occurred();
5763  if (exc_type) {
5764  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5765  else __PYX_ERR(0, 114, __pyx_L1_error)
5766  }
5767  break;
5768  }
5769  __Pyx_GOTREF(__pyx_t_3);
5770  }
5771  __Pyx_XDECREF_SET(__pyx_v_itau, __pyx_t_3);
5772  __pyx_t_3 = 0;
5773 
5774  /* "dtocean.pyx":115
5775  * for iwl in range(NWL):
5776  * for itau in range(NAOT):
5777  * for ism in range(NSMALL): # <<<<<<<<<<<<<<
5778  * mrfls[ism,iwl,itau,:] = units * \
5779  * interp.interpn(self.pts, self.toas[iwl,ism,itau,:,:,:,:], xit)
5780  */
5781  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NSMALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error)
5782  __Pyx_GOTREF(__pyx_t_3);
5783  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 115, __pyx_L1_error)
5784  __Pyx_GOTREF(__pyx_t_4);
5785  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5786  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
5787  __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_13 = 0;
5788  __pyx_t_14 = NULL;
5789  } else {
5790  __pyx_t_13 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error)
5791  __Pyx_GOTREF(__pyx_t_3);
5792  __pyx_t_14 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 115, __pyx_L1_error)
5793  }
5794  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5795  for (;;) {
5796  if (likely(!__pyx_t_14)) {
5797  if (likely(PyList_CheckExact(__pyx_t_3))) {
5798  if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_3)) break;
5799  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5800  __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_13); __Pyx_INCREF(__pyx_t_4); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 115, __pyx_L1_error)
5801  #else
5802  __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 115, __pyx_L1_error)
5803  __Pyx_GOTREF(__pyx_t_4);
5804  #endif
5805  } else {
5806  if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
5807  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5808  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_13); __Pyx_INCREF(__pyx_t_4); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 115, __pyx_L1_error)
5809  #else
5810  __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 115, __pyx_L1_error)
5811  __Pyx_GOTREF(__pyx_t_4);
5812  #endif
5813  }
5814  } else {
5815  __pyx_t_4 = __pyx_t_14(__pyx_t_3);
5816  if (unlikely(!__pyx_t_4)) {
5817  PyObject* exc_type = PyErr_Occurred();
5818  if (exc_type) {
5819  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5820  else __PYX_ERR(0, 115, __pyx_L1_error)
5821  }
5822  break;
5823  }
5824  __Pyx_GOTREF(__pyx_t_4);
5825  }
5826  __Pyx_XDECREF_SET(__pyx_v_ism, __pyx_t_4);
5827  __pyx_t_4 = 0;
5828 
5829  /* "dtocean.pyx":117
5830  * for ism in range(NSMALL):
5831  * mrfls[ism,iwl,itau,:] = units * \
5832  * interp.interpn(self.pts, self.toas[iwl,ism,itau,:,:,:,:], xit) # <<<<<<<<<<<<<<
5833  * for ibm in range(NBIG):
5834  * mrflb[ibm,iwl,itau,:] = units * \
5835  */
5836  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_interp); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 117, __pyx_L1_error)
5837  __Pyx_GOTREF(__pyx_t_6);
5838  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_interpn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 117, __pyx_L1_error)
5839  __Pyx_GOTREF(__pyx_t_5);
5840  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5841  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 117, __pyx_L1_error)
5842  __Pyx_GOTREF(__pyx_t_6);
5843  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_toas); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 117, __pyx_L1_error)
5844  __Pyx_GOTREF(__pyx_t_7);
5845  __pyx_t_23 = PyTuple_New(7); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 117, __pyx_L1_error)
5846  __Pyx_GOTREF(__pyx_t_23);
5847  __Pyx_INCREF(__pyx_v_iwl);
5848  __Pyx_GIVEREF(__pyx_v_iwl);
5849  PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_v_iwl);
5850  __Pyx_INCREF(__pyx_v_ism);
5851  __Pyx_GIVEREF(__pyx_v_ism);
5852  PyTuple_SET_ITEM(__pyx_t_23, 1, __pyx_v_ism);
5853  __Pyx_INCREF(__pyx_v_itau);
5854  __Pyx_GIVEREF(__pyx_v_itau);
5855  PyTuple_SET_ITEM(__pyx_t_23, 2, __pyx_v_itau);
5856  __Pyx_INCREF(__pyx_slice__4);
5857  __Pyx_GIVEREF(__pyx_slice__4);
5858  PyTuple_SET_ITEM(__pyx_t_23, 3, __pyx_slice__4);
5859  __Pyx_INCREF(__pyx_slice__4);
5860  __Pyx_GIVEREF(__pyx_slice__4);
5861  PyTuple_SET_ITEM(__pyx_t_23, 4, __pyx_slice__4);
5862  __Pyx_INCREF(__pyx_slice__4);
5863  __Pyx_GIVEREF(__pyx_slice__4);
5864  PyTuple_SET_ITEM(__pyx_t_23, 5, __pyx_slice__4);
5865  __Pyx_INCREF(__pyx_slice__4);
5866  __Pyx_GIVEREF(__pyx_slice__4);
5867  PyTuple_SET_ITEM(__pyx_t_23, 6, __pyx_slice__4);
5868  __pyx_t_22 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_t_23); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 117, __pyx_L1_error)
5869  __Pyx_GOTREF(__pyx_t_22);
5870  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5871  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
5872  __pyx_t_23 = NULL;
5873  __pyx_t_8 = 0;
5874  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
5875  __pyx_t_23 = PyMethod_GET_SELF(__pyx_t_5);
5876  if (likely(__pyx_t_23)) {
5877  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
5878  __Pyx_INCREF(__pyx_t_23);
5879  __Pyx_INCREF(function);
5880  __Pyx_DECREF_SET(__pyx_t_5, function);
5881  __pyx_t_8 = 1;
5882  }
5883  }
5884  #if CYTHON_FAST_PYCALL
5885  if (PyFunction_Check(__pyx_t_5)) {
5886  PyObject *__pyx_temp[4] = {__pyx_t_23, __pyx_t_6, __pyx_t_22, __pyx_v_xit};
5887  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
5888  __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
5889  __Pyx_GOTREF(__pyx_t_4);
5890  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5891  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
5892  } else
5893  #endif
5894  #if CYTHON_FAST_PYCCALL
5895  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
5896  PyObject *__pyx_temp[4] = {__pyx_t_23, __pyx_t_6, __pyx_t_22, __pyx_v_xit};
5897  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
5898  __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
5899  __Pyx_GOTREF(__pyx_t_4);
5900  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5901  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
5902  } else
5903  #endif
5904  {
5905  __pyx_t_7 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 117, __pyx_L1_error)
5906  __Pyx_GOTREF(__pyx_t_7);
5907  if (__pyx_t_23) {
5908  __Pyx_GIVEREF(__pyx_t_23); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_23); __pyx_t_23 = NULL;
5909  }
5910  __Pyx_GIVEREF(__pyx_t_6);
5911  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_t_6);
5912  __Pyx_GIVEREF(__pyx_t_22);
5913  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_t_22);
5914  __Pyx_INCREF(__pyx_v_xit);
5915  __Pyx_GIVEREF(__pyx_v_xit);
5916  PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_8, __pyx_v_xit);
5917  __pyx_t_6 = 0;
5918  __pyx_t_22 = 0;
5919  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
5920  __Pyx_GOTREF(__pyx_t_4);
5921  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5922  }
5923  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5924 
5925  /* "dtocean.pyx":116
5926  * for itau in range(NAOT):
5927  * for ism in range(NSMALL):
5928  * mrfls[ism,iwl,itau,:] = units * \ # <<<<<<<<<<<<<<
5929  * interp.interpn(self.pts, self.toas[iwl,ism,itau,:,:,:,:], xit)
5930  * for ibm in range(NBIG):
5931  */
5932  __pyx_t_5 = PyNumber_Multiply(__pyx_v_units, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 116, __pyx_L1_error)
5933  __Pyx_GOTREF(__pyx_t_5);
5934  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5935  __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 116, __pyx_L1_error)
5936  __Pyx_GOTREF(__pyx_t_4);
5937  __Pyx_INCREF(__pyx_v_ism);
5938  __Pyx_GIVEREF(__pyx_v_ism);
5939  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_ism);
5940  __Pyx_INCREF(__pyx_v_iwl);
5941  __Pyx_GIVEREF(__pyx_v_iwl);
5942  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_iwl);
5943  __Pyx_INCREF(__pyx_v_itau);
5944  __Pyx_GIVEREF(__pyx_v_itau);
5945  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_itau);
5946  __Pyx_INCREF(__pyx_slice__4);
5947  __Pyx_GIVEREF(__pyx_slice__4);
5948  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_slice__4);
5949  if (unlikely(PyObject_SetItem(__pyx_v_mrfls, __pyx_t_4, __pyx_t_5) < 0)) __PYX_ERR(0, 116, __pyx_L1_error)
5950  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5951  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5952 
5953  /* "dtocean.pyx":115
5954  * for iwl in range(NWL):
5955  * for itau in range(NAOT):
5956  * for ism in range(NSMALL): # <<<<<<<<<<<<<<
5957  * mrfls[ism,iwl,itau,:] = units * \
5958  * interp.interpn(self.pts, self.toas[iwl,ism,itau,:,:,:,:], xit)
5959  */
5960  }
5961  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5962 
5963  /* "dtocean.pyx":118
5964  * mrfls[ism,iwl,itau,:] = units * \
5965  * interp.interpn(self.pts, self.toas[iwl,ism,itau,:,:,:,:], xit)
5966  * for ibm in range(NBIG): # <<<<<<<<<<<<<<
5967  * mrflb[ibm,iwl,itau,:] = units * \
5968  * interp.interpn(self.pts, toab[iwl,ibm,itau,:,:,:,:], xit)
5969  */
5970  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NBIG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 118, __pyx_L1_error)
5971  __Pyx_GOTREF(__pyx_t_3);
5972  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 118, __pyx_L1_error)
5973  __Pyx_GOTREF(__pyx_t_5);
5974  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5975  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
5976  __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_13 = 0;
5977  __pyx_t_14 = NULL;
5978  } else {
5979  __pyx_t_13 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 118, __pyx_L1_error)
5980  __Pyx_GOTREF(__pyx_t_3);
5981  __pyx_t_14 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 118, __pyx_L1_error)
5982  }
5983  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5984  for (;;) {
5985  if (likely(!__pyx_t_14)) {
5986  if (likely(PyList_CheckExact(__pyx_t_3))) {
5987  if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_3)) break;
5988  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5989  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_13); __Pyx_INCREF(__pyx_t_5); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 118, __pyx_L1_error)
5990  #else
5991  __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 118, __pyx_L1_error)
5992  __Pyx_GOTREF(__pyx_t_5);
5993  #endif
5994  } else {
5995  if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
5996  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5997  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_13); __Pyx_INCREF(__pyx_t_5); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 118, __pyx_L1_error)
5998  #else
5999  __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 118, __pyx_L1_error)
6000  __Pyx_GOTREF(__pyx_t_5);
6001  #endif
6002  }
6003  } else {
6004  __pyx_t_5 = __pyx_t_14(__pyx_t_3);
6005  if (unlikely(!__pyx_t_5)) {
6006  PyObject* exc_type = PyErr_Occurred();
6007  if (exc_type) {
6008  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
6009  else __PYX_ERR(0, 118, __pyx_L1_error)
6010  }
6011  break;
6012  }
6013  __Pyx_GOTREF(__pyx_t_5);
6014  }
6015  __Pyx_XDECREF_SET(__pyx_v_ibm, __pyx_t_5);
6016  __pyx_t_5 = 0;
6017 
6018  /* "dtocean.pyx":120
6019  * for ibm in range(NBIG):
6020  * mrflb[ibm,iwl,itau,:] = units * \
6021  * interp.interpn(self.pts, toab[iwl,ibm,itau,:,:,:,:], xit) # <<<<<<<<<<<<<<
6022  * mrflr[iwl] = units * interp.interpn(self.r_pts, toab[iwl,ibm,:,:,:,:,:], xit)
6023  * return
6024  */
6025  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_interp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 120, __pyx_L1_error)
6026  __Pyx_GOTREF(__pyx_t_4);
6027  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_interpn); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 120, __pyx_L1_error)
6028  __Pyx_GOTREF(__pyx_t_7);
6029  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6030  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pts); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 120, __pyx_L1_error)
6031  __Pyx_GOTREF(__pyx_t_4);
6032  __Pyx_GetModuleGlobalName(__pyx_t_22, __pyx_n_s_toab); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 120, __pyx_L1_error)
6033  __Pyx_GOTREF(__pyx_t_22);
6034  __pyx_t_6 = PyTuple_New(7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 120, __pyx_L1_error)
6035  __Pyx_GOTREF(__pyx_t_6);
6036  __Pyx_INCREF(__pyx_v_iwl);
6037  __Pyx_GIVEREF(__pyx_v_iwl);
6038  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_iwl);
6039  __Pyx_INCREF(__pyx_v_ibm);
6040  __Pyx_GIVEREF(__pyx_v_ibm);
6041  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ibm);
6042  __Pyx_INCREF(__pyx_v_itau);
6043  __Pyx_GIVEREF(__pyx_v_itau);
6044  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_itau);
6045  __Pyx_INCREF(__pyx_slice__4);
6046  __Pyx_GIVEREF(__pyx_slice__4);
6047  PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_slice__4);
6048  __Pyx_INCREF(__pyx_slice__4);
6049  __Pyx_GIVEREF(__pyx_slice__4);
6050  PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_slice__4);
6051  __Pyx_INCREF(__pyx_slice__4);
6052  __Pyx_GIVEREF(__pyx_slice__4);
6053  PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_slice__4);
6054  __Pyx_INCREF(__pyx_slice__4);
6055  __Pyx_GIVEREF(__pyx_slice__4);
6056  PyTuple_SET_ITEM(__pyx_t_6, 6, __pyx_slice__4);
6057  __pyx_t_23 = __Pyx_PyObject_GetItem(__pyx_t_22, __pyx_t_6); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 120, __pyx_L1_error)
6058  __Pyx_GOTREF(__pyx_t_23);
6059  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
6060  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6061  __pyx_t_6 = NULL;
6062  __pyx_t_8 = 0;
6063  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
6064  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
6065  if (likely(__pyx_t_6)) {
6066  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
6067  __Pyx_INCREF(__pyx_t_6);
6068  __Pyx_INCREF(function);
6069  __Pyx_DECREF_SET(__pyx_t_7, function);
6070  __pyx_t_8 = 1;
6071  }
6072  }
6073  #if CYTHON_FAST_PYCALL
6074  if (PyFunction_Check(__pyx_t_7)) {
6075  PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_t_23, __pyx_v_xit};
6076  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 120, __pyx_L1_error)
6077  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6078  __Pyx_GOTREF(__pyx_t_5);
6079  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6080  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
6081  } else
6082  #endif
6083  #if CYTHON_FAST_PYCCALL
6084  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
6085  PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_t_23, __pyx_v_xit};
6086  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 120, __pyx_L1_error)
6087  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6088  __Pyx_GOTREF(__pyx_t_5);
6089  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6090  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
6091  } else
6092  #endif
6093  {
6094  __pyx_t_22 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 120, __pyx_L1_error)
6095  __Pyx_GOTREF(__pyx_t_22);
6096  if (__pyx_t_6) {
6097  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_6); __pyx_t_6 = NULL;
6098  }
6099  __Pyx_GIVEREF(__pyx_t_4);
6100  PyTuple_SET_ITEM(__pyx_t_22, 0+__pyx_t_8, __pyx_t_4);
6101  __Pyx_GIVEREF(__pyx_t_23);
6102  PyTuple_SET_ITEM(__pyx_t_22, 1+__pyx_t_8, __pyx_t_23);
6103  __Pyx_INCREF(__pyx_v_xit);
6104  __Pyx_GIVEREF(__pyx_v_xit);
6105  PyTuple_SET_ITEM(__pyx_t_22, 2+__pyx_t_8, __pyx_v_xit);
6106  __pyx_t_4 = 0;
6107  __pyx_t_23 = 0;
6108  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_22, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 120, __pyx_L1_error)
6109  __Pyx_GOTREF(__pyx_t_5);
6110  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
6111  }
6112  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6113 
6114  /* "dtocean.pyx":119
6115  * interp.interpn(self.pts, self.toas[iwl,ism,itau,:,:,:,:], xit)
6116  * for ibm in range(NBIG):
6117  * mrflb[ibm,iwl,itau,:] = units * \ # <<<<<<<<<<<<<<
6118  * interp.interpn(self.pts, toab[iwl,ibm,itau,:,:,:,:], xit)
6119  * mrflr[iwl] = units * interp.interpn(self.r_pts, toab[iwl,ibm,:,:,:,:,:], xit)
6120  */
6121  __pyx_t_7 = PyNumber_Multiply(__pyx_v_units, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 119, __pyx_L1_error)
6122  __Pyx_GOTREF(__pyx_t_7);
6123  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6124  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 119, __pyx_L1_error)
6125  __Pyx_GOTREF(__pyx_t_5);
6126  __Pyx_INCREF(__pyx_v_ibm);
6127  __Pyx_GIVEREF(__pyx_v_ibm);
6128  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ibm);
6129  __Pyx_INCREF(__pyx_v_iwl);
6130  __Pyx_GIVEREF(__pyx_v_iwl);
6131  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_iwl);
6132  __Pyx_INCREF(__pyx_v_itau);
6133  __Pyx_GIVEREF(__pyx_v_itau);
6134  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_itau);
6135  __Pyx_INCREF(__pyx_slice__4);
6136  __Pyx_GIVEREF(__pyx_slice__4);
6137  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_slice__4);
6138  if (unlikely(PyObject_SetItem(__pyx_v_mrflb, __pyx_t_5, __pyx_t_7) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
6139  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6140  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6141 
6142  /* "dtocean.pyx":118
6143  * mrfls[ism,iwl,itau,:] = units * \
6144  * interp.interpn(self.pts, self.toas[iwl,ism,itau,:,:,:,:], xit)
6145  * for ibm in range(NBIG): # <<<<<<<<<<<<<<
6146  * mrflb[ibm,iwl,itau,:] = units * \
6147  * interp.interpn(self.pts, toab[iwl,ibm,itau,:,:,:,:], xit)
6148  */
6149  }
6150  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6151 
6152  /* "dtocean.pyx":114
6153  * print("interpolate to reflectance for each wavelength and model")
6154  * for iwl in range(NWL):
6155  * for itau in range(NAOT): # <<<<<<<<<<<<<<
6156  * for ism in range(NSMALL):
6157  * mrfls[ism,iwl,itau,:] = units * \
6158  */
6159  }
6160  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6161 
6162  /* "dtocean.pyx":121
6163  * mrflb[ibm,iwl,itau,:] = units * \
6164  * interp.interpn(self.pts, toab[iwl,ibm,itau,:,:,:,:], xit)
6165  * mrflr[iwl] = units * interp.interpn(self.r_pts, toab[iwl,ibm,:,:,:,:,:], xit) # <<<<<<<<<<<<<<
6166  * return
6167  *
6168  */
6169  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_interp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 121, __pyx_L1_error)
6170  __Pyx_GOTREF(__pyx_t_3);
6171  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_interpn); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 121, __pyx_L1_error)
6172  __Pyx_GOTREF(__pyx_t_7);
6173  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6174  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_r_pts); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 121, __pyx_L1_error)
6175  __Pyx_GOTREF(__pyx_t_3);
6176  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_toab); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 121, __pyx_L1_error)
6177  __Pyx_GOTREF(__pyx_t_5);
6178  if (unlikely(!__pyx_v_ibm)) { __Pyx_RaiseUnboundLocalError("ibm"); __PYX_ERR(0, 121, __pyx_L1_error) }
6179  __pyx_t_22 = PyTuple_New(7); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 121, __pyx_L1_error)
6180  __Pyx_GOTREF(__pyx_t_22);
6181  __Pyx_INCREF(__pyx_v_iwl);
6182  __Pyx_GIVEREF(__pyx_v_iwl);
6183  PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_v_iwl);
6184  __Pyx_INCREF(__pyx_v_ibm);
6185  __Pyx_GIVEREF(__pyx_v_ibm);
6186  PyTuple_SET_ITEM(__pyx_t_22, 1, __pyx_v_ibm);
6187  __Pyx_INCREF(__pyx_slice__4);
6188  __Pyx_GIVEREF(__pyx_slice__4);
6189  PyTuple_SET_ITEM(__pyx_t_22, 2, __pyx_slice__4);
6190  __Pyx_INCREF(__pyx_slice__4);
6191  __Pyx_GIVEREF(__pyx_slice__4);
6192  PyTuple_SET_ITEM(__pyx_t_22, 3, __pyx_slice__4);
6193  __Pyx_INCREF(__pyx_slice__4);
6194  __Pyx_GIVEREF(__pyx_slice__4);
6195  PyTuple_SET_ITEM(__pyx_t_22, 4, __pyx_slice__4);
6196  __Pyx_INCREF(__pyx_slice__4);
6197  __Pyx_GIVEREF(__pyx_slice__4);
6198  PyTuple_SET_ITEM(__pyx_t_22, 5, __pyx_slice__4);
6199  __Pyx_INCREF(__pyx_slice__4);
6200  __Pyx_GIVEREF(__pyx_slice__4);
6201  PyTuple_SET_ITEM(__pyx_t_22, 6, __pyx_slice__4);
6202  __pyx_t_23 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_22); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 121, __pyx_L1_error)
6203  __Pyx_GOTREF(__pyx_t_23);
6204  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6205  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
6206  __pyx_t_22 = NULL;
6207  __pyx_t_8 = 0;
6208  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
6209  __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_7);
6210  if (likely(__pyx_t_22)) {
6211  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
6212  __Pyx_INCREF(__pyx_t_22);
6213  __Pyx_INCREF(function);
6214  __Pyx_DECREF_SET(__pyx_t_7, function);
6215  __pyx_t_8 = 1;
6216  }
6217  }
6218  #if CYTHON_FAST_PYCALL
6219  if (PyFunction_Check(__pyx_t_7)) {
6220  PyObject *__pyx_temp[4] = {__pyx_t_22, __pyx_t_3, __pyx_t_23, __pyx_v_xit};
6221  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error)
6222  __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
6223  __Pyx_GOTREF(__pyx_t_1);
6224  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6225  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
6226  } else
6227  #endif
6228  #if CYTHON_FAST_PYCCALL
6229  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
6230  PyObject *__pyx_temp[4] = {__pyx_t_22, __pyx_t_3, __pyx_t_23, __pyx_v_xit};
6231  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error)
6232  __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
6233  __Pyx_GOTREF(__pyx_t_1);
6234  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6235  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
6236  } else
6237  #endif
6238  {
6239  __pyx_t_5 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 121, __pyx_L1_error)
6240  __Pyx_GOTREF(__pyx_t_5);
6241  if (__pyx_t_22) {
6242  __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_22); __pyx_t_22 = NULL;
6243  }
6244  __Pyx_GIVEREF(__pyx_t_3);
6245  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_8, __pyx_t_3);
6246  __Pyx_GIVEREF(__pyx_t_23);
6247  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_8, __pyx_t_23);
6248  __Pyx_INCREF(__pyx_v_xit);
6249  __Pyx_GIVEREF(__pyx_v_xit);
6250  PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_8, __pyx_v_xit);
6251  __pyx_t_3 = 0;
6252  __pyx_t_23 = 0;
6253  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error)
6254  __Pyx_GOTREF(__pyx_t_1);
6255  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6256  }
6257  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6258  __pyx_t_7 = PyNumber_Multiply(__pyx_v_units, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 121, __pyx_L1_error)
6259  __Pyx_GOTREF(__pyx_t_7);
6260  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6261  if (unlikely(PyObject_SetItem(__pyx_v_mrflr, __pyx_v_iwl, __pyx_t_7) < 0)) __PYX_ERR(0, 121, __pyx_L1_error)
6262  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6263 
6264  /* "dtocean.pyx":113
6265  *
6266  * print("interpolate to reflectance for each wavelength and model")
6267  * for iwl in range(NWL): # <<<<<<<<<<<<<<
6268  * for itau in range(NAOT):
6269  * for ism in range(NSMALL):
6270  */
6271  }
6272  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6273 
6274  /* "dtocean.pyx":122
6275  * interp.interpn(self.pts, toab[iwl,ibm,itau,:,:,:,:], xit)
6276  * mrflr[iwl] = units * interp.interpn(self.r_pts, toab[iwl,ibm,:,:,:,:,:], xit)
6277  * return # <<<<<<<<<<<<<<
6278  *
6279  * def process(self,rfl,sza,vza,raa,wnd):
6280  */
6281  __Pyx_XDECREF(__pyx_r);
6282  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6283  goto __pyx_L0;
6284 
6285  /* "dtocean.pyx":79
6286  * return yout;
6287  *
6288  * def proc_gran(self,rfl,sza,vza,raa,wnd): # <<<<<<<<<<<<<<
6289  * xit = np.stack((wnd, sza, vza, raa), axis=2)
6290  * mrfls = np.zeros((NSMALL, NWL))
6291  */
6292 
6293  /* function exit code */
6294  __pyx_L1_error:;
6295  __Pyx_XDECREF(__pyx_t_1);
6296  __Pyx_XDECREF(__pyx_t_2);
6297  __Pyx_XDECREF(__pyx_t_3);
6298  __Pyx_XDECREF(__pyx_t_4);
6299  __Pyx_XDECREF(__pyx_t_5);
6300  __Pyx_XDECREF(__pyx_t_6);
6301  __Pyx_XDECREF(__pyx_t_7);
6302  __Pyx_XDECREF(__pyx_t_21);
6303  __Pyx_XDECREF(__pyx_t_22);
6304  __Pyx_XDECREF(__pyx_t_23);
6305  __Pyx_XDECREF(__pyx_t_24);
6306  __Pyx_XDECREF(__pyx_t_25);
6307  __Pyx_XDECREF(__pyx_t_26);
6308  __Pyx_AddTraceback("dtocean.dtocean.proc_gran", __pyx_clineno, __pyx_lineno, __pyx_filename);
6309  __pyx_r = NULL;
6310  __pyx_L0:;
6311  __Pyx_XDECREF(__pyx_v_xit);
6312  __Pyx_XDECREF(__pyx_v_mrfls);
6313  __Pyx_XDECREF(__pyx_v_mrflb);
6314  __Pyx_XDECREF(__pyx_v_mrflr);
6315  __Pyx_XDECREF(__pyx_v_units);
6316  __Pyx_XDECREF(__pyx_v_max_rfl);
6317  __Pyx_XDECREF(__pyx_v_min_rfl);
6318  __Pyx_XDECREF(__pyx_v_shps);
6319  __Pyx_XDECREF(__pyx_v_shpb);
6320  __Pyx_XDECREF(__pyx_v_iwl);
6321  __Pyx_XDECREF(__pyx_v_ism);
6322  __Pyx_XDECREF(__pyx_v_iwn);
6323  __Pyx_XDECREF(__pyx_v_isz);
6324  __Pyx_XDECREF(__pyx_v_ith);
6325  __Pyx_XDECREF(__pyx_v_iph);
6326  __Pyx_XDECREF(__pyx_v_itau);
6327  __Pyx_XDECREF(__pyx_v_ibm);
6328  __Pyx_XGIVEREF(__pyx_r);
6329  __Pyx_RefNannyFinishContext();
6330  return __pyx_r;
6331 }
6332 
6333 /* "dtocean.pyx":124
6334  * return
6335  *
6336  * def process(self,rfl,sza,vza,raa,wnd): # <<<<<<<<<<<<<<
6337  * xit = np.stack((wnd, sza, vza, raa))
6338  * units = np.pi/np.cos(sza*D2R)
6339  */
6340 
6341 /* Python wrapper */
6342 static PyObject *__pyx_pw_7dtocean_7dtocean_7process(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6343 static PyMethodDef __pyx_mdef_7dtocean_7dtocean_7process = {"process", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7dtocean_7dtocean_7process, METH_VARARGS|METH_KEYWORDS, 0};
6344 static PyObject *__pyx_pw_7dtocean_7dtocean_7process(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6345  PyObject *__pyx_v_self = 0;
6346  PyObject *__pyx_v_rfl = 0;
6347  PyObject *__pyx_v_sza = 0;
6348  PyObject *__pyx_v_vza = 0;
6349  PyObject *__pyx_v_raa = 0;
6350  PyObject *__pyx_v_wnd = 0;
6351  int __pyx_lineno = 0;
6352  const char *__pyx_filename = NULL;
6353  int __pyx_clineno = 0;
6354  PyObject *__pyx_r = 0;
6355  __Pyx_RefNannyDeclarations
6356  __Pyx_RefNannySetupContext("process (wrapper)", 0);
6357  {
6358  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_rfl,&__pyx_n_s_sza,&__pyx_n_s_vza,&__pyx_n_s_raa,&__pyx_n_s_wnd,0};
6359  PyObject* values[6] = {0,0,0,0,0,0};
6360  if (unlikely(__pyx_kwds)) {
6361  Py_ssize_t kw_args;
6362  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6363  switch (pos_args) {
6364  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6365  CYTHON_FALLTHROUGH;
6366  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6367  CYTHON_FALLTHROUGH;
6368  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6369  CYTHON_FALLTHROUGH;
6370  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6371  CYTHON_FALLTHROUGH;
6372  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6373  CYTHON_FALLTHROUGH;
6374  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6375  CYTHON_FALLTHROUGH;
6376  case 0: break;
6377  default: goto __pyx_L5_argtuple_error;
6378  }
6379  kw_args = PyDict_Size(__pyx_kwds);
6380  switch (pos_args) {
6381  case 0:
6382  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
6383  else goto __pyx_L5_argtuple_error;
6384  CYTHON_FALLTHROUGH;
6385  case 1:
6386  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rfl)) != 0)) kw_args--;
6387  else {
6388  __Pyx_RaiseArgtupleInvalid("process", 1, 6, 6, 1); __PYX_ERR(0, 124, __pyx_L3_error)
6389  }
6390  CYTHON_FALLTHROUGH;
6391  case 2:
6392  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sza)) != 0)) kw_args--;
6393  else {
6394  __Pyx_RaiseArgtupleInvalid("process", 1, 6, 6, 2); __PYX_ERR(0, 124, __pyx_L3_error)
6395  }
6396  CYTHON_FALLTHROUGH;
6397  case 3:
6398  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vza)) != 0)) kw_args--;
6399  else {
6400  __Pyx_RaiseArgtupleInvalid("process", 1, 6, 6, 3); __PYX_ERR(0, 124, __pyx_L3_error)
6401  }
6402  CYTHON_FALLTHROUGH;
6403  case 4:
6404  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_raa)) != 0)) kw_args--;
6405  else {
6406  __Pyx_RaiseArgtupleInvalid("process", 1, 6, 6, 4); __PYX_ERR(0, 124, __pyx_L3_error)
6407  }
6408  CYTHON_FALLTHROUGH;
6409  case 5:
6410  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_wnd)) != 0)) kw_args--;
6411  else {
6412  __Pyx_RaiseArgtupleInvalid("process", 1, 6, 6, 5); __PYX_ERR(0, 124, __pyx_L3_error)
6413  }
6414  }
6415  if (unlikely(kw_args > 0)) {
6416  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "process") < 0)) __PYX_ERR(0, 124, __pyx_L3_error)
6417  }
6418  } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
6419  goto __pyx_L5_argtuple_error;
6420  } else {
6421  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6422  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6423  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6424  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6425  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6426  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6427  }
6428  __pyx_v_self = values[0];
6429  __pyx_v_rfl = values[1];
6430  __pyx_v_sza = values[2];
6431  __pyx_v_vza = values[3];
6432  __pyx_v_raa = values[4];
6433  __pyx_v_wnd = values[5];
6434  }
6435  goto __pyx_L4_argument_unpacking_done;
6436  __pyx_L5_argtuple_error:;
6437  __Pyx_RaiseArgtupleInvalid("process", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 124, __pyx_L3_error)
6438  __pyx_L3_error:;
6439  __Pyx_AddTraceback("dtocean.dtocean.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
6440  __Pyx_RefNannyFinishContext();
6441  return NULL;
6442  __pyx_L4_argument_unpacking_done:;
6443  __pyx_r = __pyx_pf_7dtocean_7dtocean_6process(__pyx_self, __pyx_v_self, __pyx_v_rfl, __pyx_v_sza, __pyx_v_vza, __pyx_v_raa, __pyx_v_wnd);
6444 
6445  /* function exit code */
6446  __Pyx_RefNannyFinishContext();
6447  return __pyx_r;
6448 }
6449 
6450 static PyObject *__pyx_pf_7dtocean_7dtocean_6process(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_rfl, PyObject *__pyx_v_sza, PyObject *__pyx_v_vza, PyObject *__pyx_v_raa, PyObject *__pyx_v_wnd) {
6451  PyObject *__pyx_v_xit = NULL;
6452  PyObject *__pyx_v_units = NULL;
6453  PyObject *__pyx_v_mrfls = NULL;
6454  PyObject *__pyx_v_mrflb = NULL;
6455  PyObject *__pyx_v_mrflr = NULL;
6456  PyObject *__pyx_v_tauxs = NULL;
6457  PyObject *__pyx_v_tauxb = NULL;
6458  PyObject *__pyx_v_ism = NULL;
6459  PyObject *__pyx_v_ibm = NULL;
6460  PyObject *__pyx_v_trfls = NULL;
6461  PyObject *__pyx_v_trflb = NULL;
6462  PyObject *__pyx_v_iwl = NULL;
6463  PyObject *__pyx_v_aot = NULL;
6464  PyObject *__pyx_v_fmf = NULL;
6465  PyObject *__pyx_v_sse = NULL;
6466  PyObject *__pyx_v_denom = NULL;
6467  PyObject *__pyx_v_rbdif = NULL;
6468  PyObject *__pyx_v_sbdif = NULL;
6469  PyObject *__pyx_v_sb2 = NULL;
6470  PyObject *__pyx_v_rbsb = NULL;
6471  PyObject *__pyx_v_xm = NULL;
6472  PyObject *__pyx_v_mrfl = NULL;
6473  PyObject *__pyx_v_err = NULL;
6474  PyObject *__pyx_v_im = NULL;
6475  PyObject *__pyx_r = NULL;
6476  __Pyx_RefNannyDeclarations
6477  PyObject *__pyx_t_1 = NULL;
6478  PyObject *__pyx_t_2 = NULL;
6479  PyObject *__pyx_t_3 = NULL;
6480  PyObject *__pyx_t_4 = NULL;
6481  PyObject *__pyx_t_5 = NULL;
6482  int __pyx_t_6;
6483  PyObject *__pyx_t_7 = NULL;
6484  Py_ssize_t __pyx_t_8;
6485  PyObject *(*__pyx_t_9)(PyObject *);
6486  PyObject *__pyx_t_10 = NULL;
6487  PyObject *__pyx_t_11 = NULL;
6488  Py_ssize_t __pyx_t_12;
6489  PyObject *(*__pyx_t_13)(PyObject *);
6490  PyObject *__pyx_t_14 = NULL;
6491  int __pyx_lineno = 0;
6492  const char *__pyx_filename = NULL;
6493  int __pyx_clineno = 0;
6494  __Pyx_RefNannySetupContext("process", 0);
6495 
6496  /* "dtocean.pyx":125
6497  *
6498  * def process(self,rfl,sza,vza,raa,wnd):
6499  * xit = np.stack((wnd, sza, vza, raa)) # <<<<<<<<<<<<<<
6500  * units = np.pi/np.cos(sza*D2R)
6501  *
6502  */
6503  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error)
6504  __Pyx_GOTREF(__pyx_t_2);
6505  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stack); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 125, __pyx_L1_error)
6506  __Pyx_GOTREF(__pyx_t_3);
6507  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6508  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error)
6509  __Pyx_GOTREF(__pyx_t_2);
6510  __Pyx_INCREF(__pyx_v_wnd);
6511  __Pyx_GIVEREF(__pyx_v_wnd);
6512  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_wnd);
6513  __Pyx_INCREF(__pyx_v_sza);
6514  __Pyx_GIVEREF(__pyx_v_sza);
6515  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_sza);
6516  __Pyx_INCREF(__pyx_v_vza);
6517  __Pyx_GIVEREF(__pyx_v_vza);
6518  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_vza);
6519  __Pyx_INCREF(__pyx_v_raa);
6520  __Pyx_GIVEREF(__pyx_v_raa);
6521  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_raa);
6522  __pyx_t_4 = NULL;
6523  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
6524  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
6525  if (likely(__pyx_t_4)) {
6526  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6527  __Pyx_INCREF(__pyx_t_4);
6528  __Pyx_INCREF(function);
6529  __Pyx_DECREF_SET(__pyx_t_3, function);
6530  }
6531  }
6532  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
6533  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6534  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6535  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error)
6536  __Pyx_GOTREF(__pyx_t_1);
6537  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6538  __pyx_v_xit = __pyx_t_1;
6539  __pyx_t_1 = 0;
6540 
6541  /* "dtocean.pyx":126
6542  * def process(self,rfl,sza,vza,raa,wnd):
6543  * xit = np.stack((wnd, sza, vza, raa))
6544  * units = np.pi/np.cos(sza*D2R) # <<<<<<<<<<<<<<
6545  *
6546  * mrfls = interp.interpn(self.pts, self.toas, xit)[0]*units
6547  */
6548  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
6549  __Pyx_GOTREF(__pyx_t_1);
6550  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_pi); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 126, __pyx_L1_error)
6551  __Pyx_GOTREF(__pyx_t_3);
6552  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6553  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
6554  __Pyx_GOTREF(__pyx_t_2);
6555  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_cos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error)
6556  __Pyx_GOTREF(__pyx_t_4);
6557  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6558  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_D2R); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
6559  __Pyx_GOTREF(__pyx_t_2);
6560  __pyx_t_5 = PyNumber_Multiply(__pyx_v_sza, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 126, __pyx_L1_error)
6561  __Pyx_GOTREF(__pyx_t_5);
6562  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6563  __pyx_t_2 = NULL;
6564  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
6565  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
6566  if (likely(__pyx_t_2)) {
6567  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
6568  __Pyx_INCREF(__pyx_t_2);
6569  __Pyx_INCREF(function);
6570  __Pyx_DECREF_SET(__pyx_t_4, function);
6571  }
6572  }
6573  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
6574  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
6575  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6576  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
6577  __Pyx_GOTREF(__pyx_t_1);
6578  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6579  __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error)
6580  __Pyx_GOTREF(__pyx_t_4);
6581  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6582  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6583  __pyx_v_units = __pyx_t_4;
6584  __pyx_t_4 = 0;
6585 
6586  /* "dtocean.pyx":128
6587  * units = np.pi/np.cos(sza*D2R)
6588  *
6589  * mrfls = interp.interpn(self.pts, self.toas, xit)[0]*units # <<<<<<<<<<<<<<
6590  * mrflb = interp.interpn(self.pts, self.toab, xit)[0]*units
6591  * mrflr = interp.interpn(self.pts, self.toar, xit)[0]*units
6592  */
6593  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_interp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error)
6594  __Pyx_GOTREF(__pyx_t_1);
6595  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_interpn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L1_error)
6596  __Pyx_GOTREF(__pyx_t_3);
6597  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6598  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error)
6599  __Pyx_GOTREF(__pyx_t_1);
6600  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_toas); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 128, __pyx_L1_error)
6601  __Pyx_GOTREF(__pyx_t_5);
6602  __pyx_t_2 = NULL;
6603  __pyx_t_6 = 0;
6604  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
6605  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
6606  if (likely(__pyx_t_2)) {
6607  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6608  __Pyx_INCREF(__pyx_t_2);
6609  __Pyx_INCREF(function);
6610  __Pyx_DECREF_SET(__pyx_t_3, function);
6611  __pyx_t_6 = 1;
6612  }
6613  }
6614  #if CYTHON_FAST_PYCALL
6615  if (PyFunction_Check(__pyx_t_3)) {
6616  PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_1, __pyx_t_5, __pyx_v_xit};
6617  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 128, __pyx_L1_error)
6618  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
6619  __Pyx_GOTREF(__pyx_t_4);
6620  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6621  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6622  } else
6623  #endif
6624  #if CYTHON_FAST_PYCCALL
6625  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
6626  PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_1, __pyx_t_5, __pyx_v_xit};
6627  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 128, __pyx_L1_error)
6628  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
6629  __Pyx_GOTREF(__pyx_t_4);
6630  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6631  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6632  } else
6633  #endif
6634  {
6635  __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 128, __pyx_L1_error)
6636  __Pyx_GOTREF(__pyx_t_7);
6637  if (__pyx_t_2) {
6638  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;
6639  }
6640  __Pyx_GIVEREF(__pyx_t_1);
6641  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_1);
6642  __Pyx_GIVEREF(__pyx_t_5);
6643  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_5);
6644  __Pyx_INCREF(__pyx_v_xit);
6645  __Pyx_GIVEREF(__pyx_v_xit);
6646  PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_xit);
6647  __pyx_t_1 = 0;
6648  __pyx_t_5 = 0;
6649  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 128, __pyx_L1_error)
6650  __Pyx_GOTREF(__pyx_t_4);
6651  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6652  }
6653  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6654  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L1_error)
6655  __Pyx_GOTREF(__pyx_t_3);
6656  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6657  __pyx_t_4 = PyNumber_Multiply(__pyx_t_3, __pyx_v_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 128, __pyx_L1_error)
6658  __Pyx_GOTREF(__pyx_t_4);
6659  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6660  __pyx_v_mrfls = __pyx_t_4;
6661  __pyx_t_4 = 0;
6662 
6663  /* "dtocean.pyx":129
6664  *
6665  * mrfls = interp.interpn(self.pts, self.toas, xit)[0]*units
6666  * mrflb = interp.interpn(self.pts, self.toab, xit)[0]*units # <<<<<<<<<<<<<<
6667  * mrflr = interp.interpn(self.pts, self.toar, xit)[0]*units
6668  *
6669  */
6670  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_interp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 129, __pyx_L1_error)
6671  __Pyx_GOTREF(__pyx_t_3);
6672  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_interpn); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 129, __pyx_L1_error)
6673  __Pyx_GOTREF(__pyx_t_7);
6674  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6675  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pts); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 129, __pyx_L1_error)
6676  __Pyx_GOTREF(__pyx_t_3);
6677  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_toab); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 129, __pyx_L1_error)
6678  __Pyx_GOTREF(__pyx_t_5);
6679  __pyx_t_1 = NULL;
6680  __pyx_t_6 = 0;
6681  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
6682  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
6683  if (likely(__pyx_t_1)) {
6684  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
6685  __Pyx_INCREF(__pyx_t_1);
6686  __Pyx_INCREF(function);
6687  __Pyx_DECREF_SET(__pyx_t_7, function);
6688  __pyx_t_6 = 1;
6689  }
6690  }
6691  #if CYTHON_FAST_PYCALL
6692  if (PyFunction_Check(__pyx_t_7)) {
6693  PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_3, __pyx_t_5, __pyx_v_xit};
6694  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 129, __pyx_L1_error)
6695  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
6696  __Pyx_GOTREF(__pyx_t_4);
6697  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6698  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6699  } else
6700  #endif
6701  #if CYTHON_FAST_PYCCALL
6702  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
6703  PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_3, __pyx_t_5, __pyx_v_xit};
6704  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 129, __pyx_L1_error)
6705  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
6706  __Pyx_GOTREF(__pyx_t_4);
6707  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6708  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6709  } else
6710  #endif
6711  {
6712  __pyx_t_2 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 129, __pyx_L1_error)
6713  __Pyx_GOTREF(__pyx_t_2);
6714  if (__pyx_t_1) {
6715  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = NULL;
6716  }
6717  __Pyx_GIVEREF(__pyx_t_3);
6718  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_t_3);
6719  __Pyx_GIVEREF(__pyx_t_5);
6720  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_t_5);
6721  __Pyx_INCREF(__pyx_v_xit);
6722  __Pyx_GIVEREF(__pyx_v_xit);
6723  PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_6, __pyx_v_xit);
6724  __pyx_t_3 = 0;
6725  __pyx_t_5 = 0;
6726  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 129, __pyx_L1_error)
6727  __Pyx_GOTREF(__pyx_t_4);
6728  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6729  }
6730  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6731  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 129, __pyx_L1_error)
6732  __Pyx_GOTREF(__pyx_t_7);
6733  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6734  __pyx_t_4 = PyNumber_Multiply(__pyx_t_7, __pyx_v_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 129, __pyx_L1_error)
6735  __Pyx_GOTREF(__pyx_t_4);
6736  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6737  __pyx_v_mrflb = __pyx_t_4;
6738  __pyx_t_4 = 0;
6739 
6740  /* "dtocean.pyx":130
6741  * mrfls = interp.interpn(self.pts, self.toas, xit)[0]*units
6742  * mrflb = interp.interpn(self.pts, self.toab, xit)[0]*units
6743  * mrflr = interp.interpn(self.pts, self.toar, xit)[0]*units # <<<<<<<<<<<<<<
6744  *
6745  * tauxs = np.zeros(NSMALL)
6746  */
6747  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_interp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 130, __pyx_L1_error)
6748  __Pyx_GOTREF(__pyx_t_7);
6749  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_interpn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)
6750  __Pyx_GOTREF(__pyx_t_2);
6751  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6752  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pts); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 130, __pyx_L1_error)
6753  __Pyx_GOTREF(__pyx_t_7);
6754  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_toar); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 130, __pyx_L1_error)
6755  __Pyx_GOTREF(__pyx_t_5);
6756  __pyx_t_3 = NULL;
6757  __pyx_t_6 = 0;
6758  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
6759  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
6760  if (likely(__pyx_t_3)) {
6761  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
6762  __Pyx_INCREF(__pyx_t_3);
6763  __Pyx_INCREF(function);
6764  __Pyx_DECREF_SET(__pyx_t_2, function);
6765  __pyx_t_6 = 1;
6766  }
6767  }
6768  #if CYTHON_FAST_PYCALL
6769  if (PyFunction_Check(__pyx_t_2)) {
6770  PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_7, __pyx_t_5, __pyx_v_xit};
6771  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 130, __pyx_L1_error)
6772  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6773  __Pyx_GOTREF(__pyx_t_4);
6774  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6775  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6776  } else
6777  #endif
6778  #if CYTHON_FAST_PYCCALL
6779  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
6780  PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_7, __pyx_t_5, __pyx_v_xit};
6781  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 130, __pyx_L1_error)
6782  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6783  __Pyx_GOTREF(__pyx_t_4);
6784  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6785  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6786  } else
6787  #endif
6788  {
6789  __pyx_t_1 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
6790  __Pyx_GOTREF(__pyx_t_1);
6791  if (__pyx_t_3) {
6792  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __pyx_t_3 = NULL;
6793  }
6794  __Pyx_GIVEREF(__pyx_t_7);
6795  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_6, __pyx_t_7);
6796  __Pyx_GIVEREF(__pyx_t_5);
6797  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_6, __pyx_t_5);
6798  __Pyx_INCREF(__pyx_v_xit);
6799  __Pyx_GIVEREF(__pyx_v_xit);
6800  PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_6, __pyx_v_xit);
6801  __pyx_t_7 = 0;
6802  __pyx_t_5 = 0;
6803  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 130, __pyx_L1_error)
6804  __Pyx_GOTREF(__pyx_t_4);
6805  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6806  }
6807  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6808  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)
6809  __Pyx_GOTREF(__pyx_t_2);
6810  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6811  __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_v_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 130, __pyx_L1_error)
6812  __Pyx_GOTREF(__pyx_t_4);
6813  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6814  __pyx_v_mrflr = __pyx_t_4;
6815  __pyx_t_4 = 0;
6816 
6817  /* "dtocean.pyx":132
6818  * mrflr = interp.interpn(self.pts, self.toar, xit)[0]*units
6819  *
6820  * tauxs = np.zeros(NSMALL) # <<<<<<<<<<<<<<
6821  * tauxb = np.zeros(NBIG)
6822  * for ism in range(NSMALL):
6823  */
6824  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __pyx_L1_error)
6825  __Pyx_GOTREF(__pyx_t_2);
6826  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
6827  __Pyx_GOTREF(__pyx_t_1);
6828  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6829  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_NSMALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __pyx_L1_error)
6830  __Pyx_GOTREF(__pyx_t_2);
6831  __pyx_t_5 = NULL;
6832  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
6833  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
6834  if (likely(__pyx_t_5)) {
6835  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
6836  __Pyx_INCREF(__pyx_t_5);
6837  __Pyx_INCREF(function);
6838  __Pyx_DECREF_SET(__pyx_t_1, function);
6839  }
6840  }
6841  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2);
6842  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6843  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6844  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 132, __pyx_L1_error)
6845  __Pyx_GOTREF(__pyx_t_4);
6846  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6847  __pyx_v_tauxs = __pyx_t_4;
6848  __pyx_t_4 = 0;
6849 
6850  /* "dtocean.pyx":133
6851  *
6852  * tauxs = np.zeros(NSMALL)
6853  * tauxb = np.zeros(NBIG) # <<<<<<<<<<<<<<
6854  * for ism in range(NSMALL):
6855  * mrfls[:,ism,0] = mrflr
6856  */
6857  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
6858  __Pyx_GOTREF(__pyx_t_1);
6859  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
6860  __Pyx_GOTREF(__pyx_t_2);
6861  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6862  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NBIG); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
6863  __Pyx_GOTREF(__pyx_t_1);
6864  __pyx_t_5 = NULL;
6865  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
6866  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
6867  if (likely(__pyx_t_5)) {
6868  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
6869  __Pyx_INCREF(__pyx_t_5);
6870  __Pyx_INCREF(function);
6871  __Pyx_DECREF_SET(__pyx_t_2, function);
6872  }
6873  }
6874  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1);
6875  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6876  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6877  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 133, __pyx_L1_error)
6878  __Pyx_GOTREF(__pyx_t_4);
6879  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6880  __pyx_v_tauxb = __pyx_t_4;
6881  __pyx_t_4 = 0;
6882 
6883  /* "dtocean.pyx":134
6884  * tauxs = np.zeros(NSMALL)
6885  * tauxb = np.zeros(NBIG)
6886  * for ism in range(NSMALL): # <<<<<<<<<<<<<<
6887  * mrfls[:,ism,0] = mrflr
6888  * tauxs[ism] = np.interp(rfl[W860], mrfls[W860,ism], self.taus[W550,ism])
6889  */
6890  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_NSMALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 134, __pyx_L1_error)
6891  __Pyx_GOTREF(__pyx_t_4);
6892  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error)
6893  __Pyx_GOTREF(__pyx_t_2);
6894  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6895  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
6896  __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_8 = 0;
6897  __pyx_t_9 = NULL;
6898  } else {
6899  __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 134, __pyx_L1_error)
6900  __Pyx_GOTREF(__pyx_t_4);
6901  __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 134, __pyx_L1_error)
6902  }
6903  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6904  for (;;) {
6905  if (likely(!__pyx_t_9)) {
6906  if (likely(PyList_CheckExact(__pyx_t_4))) {
6907  if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)) break;
6908  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6909  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 134, __pyx_L1_error)
6910  #else
6911  __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error)
6912  __Pyx_GOTREF(__pyx_t_2);
6913  #endif
6914  } else {
6915  if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
6916  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6917  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 134, __pyx_L1_error)
6918  #else
6919  __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error)
6920  __Pyx_GOTREF(__pyx_t_2);
6921  #endif
6922  }
6923  } else {
6924  __pyx_t_2 = __pyx_t_9(__pyx_t_4);
6925  if (unlikely(!__pyx_t_2)) {
6926  PyObject* exc_type = PyErr_Occurred();
6927  if (exc_type) {
6928  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
6929  else __PYX_ERR(0, 134, __pyx_L1_error)
6930  }
6931  break;
6932  }
6933  __Pyx_GOTREF(__pyx_t_2);
6934  }
6935  __Pyx_XDECREF_SET(__pyx_v_ism, __pyx_t_2);
6936  __pyx_t_2 = 0;
6937 
6938  /* "dtocean.pyx":135
6939  * tauxb = np.zeros(NBIG)
6940  * for ism in range(NSMALL):
6941  * mrfls[:,ism,0] = mrflr # <<<<<<<<<<<<<<
6942  * tauxs[ism] = np.interp(rfl[W860], mrfls[W860,ism], self.taus[W550,ism])
6943  * for ibm in range(NBIG):
6944  */
6945  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
6946  __Pyx_GOTREF(__pyx_t_2);
6947  __Pyx_INCREF(__pyx_slice__4);
6948  __Pyx_GIVEREF(__pyx_slice__4);
6949  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_slice__4);
6950  __Pyx_INCREF(__pyx_v_ism);
6951  __Pyx_GIVEREF(__pyx_v_ism);
6952  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ism);
6953  __Pyx_INCREF(__pyx_int_0);
6954  __Pyx_GIVEREF(__pyx_int_0);
6955  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_0);
6956  if (unlikely(PyObject_SetItem(__pyx_v_mrfls, __pyx_t_2, __pyx_v_mrflr) < 0)) __PYX_ERR(0, 135, __pyx_L1_error)
6957  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6958 
6959  /* "dtocean.pyx":136
6960  * for ism in range(NSMALL):
6961  * mrfls[:,ism,0] = mrflr
6962  * tauxs[ism] = np.interp(rfl[W860], mrfls[W860,ism], self.taus[W550,ism]) # <<<<<<<<<<<<<<
6963  * for ibm in range(NBIG):
6964  * mrflb[:,ibm,0] = mrflr
6965  */
6966  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error)
6967  __Pyx_GOTREF(__pyx_t_1);
6968  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_interp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 136, __pyx_L1_error)
6969  __Pyx_GOTREF(__pyx_t_5);
6970  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6971  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_W860); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error)
6972  __Pyx_GOTREF(__pyx_t_1);
6973  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_rfl, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 136, __pyx_L1_error)
6974  __Pyx_GOTREF(__pyx_t_7);
6975  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6976  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_W860); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error)
6977  __Pyx_GOTREF(__pyx_t_1);
6978  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error)
6979  __Pyx_GOTREF(__pyx_t_3);
6980  __Pyx_GIVEREF(__pyx_t_1);
6981  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
6982  __Pyx_INCREF(__pyx_v_ism);
6983  __Pyx_GIVEREF(__pyx_v_ism);
6984  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_ism);
6985  __pyx_t_1 = 0;
6986  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_mrfls, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error)
6987  __Pyx_GOTREF(__pyx_t_1);
6988  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6989  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_taus); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error)
6990  __Pyx_GOTREF(__pyx_t_3);
6991  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_W550); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 136, __pyx_L1_error)
6992  __Pyx_GOTREF(__pyx_t_10);
6993  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 136, __pyx_L1_error)
6994  __Pyx_GOTREF(__pyx_t_11);
6995  __Pyx_GIVEREF(__pyx_t_10);
6996  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10);
6997  __Pyx_INCREF(__pyx_v_ism);
6998  __Pyx_GIVEREF(__pyx_v_ism);
6999  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_ism);
7000  __pyx_t_10 = 0;
7001  __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 136, __pyx_L1_error)
7002  __Pyx_GOTREF(__pyx_t_10);
7003  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7004  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7005  __pyx_t_11 = NULL;
7006  __pyx_t_6 = 0;
7007  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
7008  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);
7009  if (likely(__pyx_t_11)) {
7010  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
7011  __Pyx_INCREF(__pyx_t_11);
7012  __Pyx_INCREF(function);
7013  __Pyx_DECREF_SET(__pyx_t_5, function);
7014  __pyx_t_6 = 1;
7015  }
7016  }
7017  #if CYTHON_FAST_PYCALL
7018  if (PyFunction_Check(__pyx_t_5)) {
7019  PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_t_7, __pyx_t_1, __pyx_t_10};
7020  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error)
7021  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
7022  __Pyx_GOTREF(__pyx_t_2);
7023  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7024  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7025  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7026  } else
7027  #endif
7028  #if CYTHON_FAST_PYCCALL
7029  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
7030  PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_t_7, __pyx_t_1, __pyx_t_10};
7031  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error)
7032  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
7033  __Pyx_GOTREF(__pyx_t_2);
7034  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7035  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7036  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7037  } else
7038  #endif
7039  {
7040  __pyx_t_3 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error)
7041  __Pyx_GOTREF(__pyx_t_3);
7042  if (__pyx_t_11) {
7043  __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11); __pyx_t_11 = NULL;
7044  }
7045  __Pyx_GIVEREF(__pyx_t_7);
7046  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_t_7);
7047  __Pyx_GIVEREF(__pyx_t_1);
7048  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_t_1);
7049  __Pyx_GIVEREF(__pyx_t_10);
7050  PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_6, __pyx_t_10);
7051  __pyx_t_7 = 0;
7052  __pyx_t_1 = 0;
7053  __pyx_t_10 = 0;
7054  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error)
7055  __Pyx_GOTREF(__pyx_t_2);
7056  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7057  }
7058  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7059  if (unlikely(PyObject_SetItem(__pyx_v_tauxs, __pyx_v_ism, __pyx_t_2) < 0)) __PYX_ERR(0, 136, __pyx_L1_error)
7060  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7061 
7062  /* "dtocean.pyx":134
7063  * tauxs = np.zeros(NSMALL)
7064  * tauxb = np.zeros(NBIG)
7065  * for ism in range(NSMALL): # <<<<<<<<<<<<<<
7066  * mrfls[:,ism,0] = mrflr
7067  * tauxs[ism] = np.interp(rfl[W860], mrfls[W860,ism], self.taus[W550,ism])
7068  */
7069  }
7070  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7071 
7072  /* "dtocean.pyx":137
7073  * mrfls[:,ism,0] = mrflr
7074  * tauxs[ism] = np.interp(rfl[W860], mrfls[W860,ism], self.taus[W550,ism])
7075  * for ibm in range(NBIG): # <<<<<<<<<<<<<<
7076  * mrflb[:,ibm,0] = mrflr
7077  * tauxb[ibm] = np.interp(rfl[W860], mrflb[W860,ibm], self.taub[W550,ibm])
7078  */
7079  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_NBIG); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 137, __pyx_L1_error)
7080  __Pyx_GOTREF(__pyx_t_4);
7081  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error)
7082  __Pyx_GOTREF(__pyx_t_2);
7083  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7084  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
7085  __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_8 = 0;
7086  __pyx_t_9 = NULL;
7087  } else {
7088  __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 137, __pyx_L1_error)
7089  __Pyx_GOTREF(__pyx_t_4);
7090  __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 137, __pyx_L1_error)
7091  }
7092  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7093  for (;;) {
7094  if (likely(!__pyx_t_9)) {
7095  if (likely(PyList_CheckExact(__pyx_t_4))) {
7096  if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)) break;
7097  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7098  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 137, __pyx_L1_error)
7099  #else
7100  __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error)
7101  __Pyx_GOTREF(__pyx_t_2);
7102  #endif
7103  } else {
7104  if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
7105  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7106  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 137, __pyx_L1_error)
7107  #else
7108  __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error)
7109  __Pyx_GOTREF(__pyx_t_2);
7110  #endif
7111  }
7112  } else {
7113  __pyx_t_2 = __pyx_t_9(__pyx_t_4);
7114  if (unlikely(!__pyx_t_2)) {
7115  PyObject* exc_type = PyErr_Occurred();
7116  if (exc_type) {
7117  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
7118  else __PYX_ERR(0, 137, __pyx_L1_error)
7119  }
7120  break;
7121  }
7122  __Pyx_GOTREF(__pyx_t_2);
7123  }
7124  __Pyx_XDECREF_SET(__pyx_v_ibm, __pyx_t_2);
7125  __pyx_t_2 = 0;
7126 
7127  /* "dtocean.pyx":138
7128  * tauxs[ism] = np.interp(rfl[W860], mrfls[W860,ism], self.taus[W550,ism])
7129  * for ibm in range(NBIG):
7130  * mrflb[:,ibm,0] = mrflr # <<<<<<<<<<<<<<
7131  * tauxb[ibm] = np.interp(rfl[W860], mrflb[W860,ibm], self.taub[W550,ibm])
7132  *
7133  */
7134  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error)
7135  __Pyx_GOTREF(__pyx_t_2);
7136  __Pyx_INCREF(__pyx_slice__4);
7137  __Pyx_GIVEREF(__pyx_slice__4);
7138  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_slice__4);
7139  __Pyx_INCREF(__pyx_v_ibm);
7140  __Pyx_GIVEREF(__pyx_v_ibm);
7141  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ibm);
7142  __Pyx_INCREF(__pyx_int_0);
7143  __Pyx_GIVEREF(__pyx_int_0);
7144  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_0);
7145  if (unlikely(PyObject_SetItem(__pyx_v_mrflb, __pyx_t_2, __pyx_v_mrflr) < 0)) __PYX_ERR(0, 138, __pyx_L1_error)
7146  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7147 
7148  /* "dtocean.pyx":139
7149  * for ibm in range(NBIG):
7150  * mrflb[:,ibm,0] = mrflr
7151  * tauxb[ibm] = np.interp(rfl[W860], mrflb[W860,ibm], self.taub[W550,ibm]) # <<<<<<<<<<<<<<
7152  *
7153  * trfls = np.zeros((NWL,NSMALL))
7154  */
7155  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 139, __pyx_L1_error)
7156  __Pyx_GOTREF(__pyx_t_5);
7157  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_interp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error)
7158  __Pyx_GOTREF(__pyx_t_3);
7159  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7160  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_W860); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 139, __pyx_L1_error)
7161  __Pyx_GOTREF(__pyx_t_5);
7162  __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_rfl, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 139, __pyx_L1_error)
7163  __Pyx_GOTREF(__pyx_t_10);
7164  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7165  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_W860); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 139, __pyx_L1_error)
7166  __Pyx_GOTREF(__pyx_t_5);
7167  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error)
7168  __Pyx_GOTREF(__pyx_t_1);
7169  __Pyx_GIVEREF(__pyx_t_5);
7170  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
7171  __Pyx_INCREF(__pyx_v_ibm);
7172  __Pyx_GIVEREF(__pyx_v_ibm);
7173  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ibm);
7174  __pyx_t_5 = 0;
7175  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_mrflb, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 139, __pyx_L1_error)
7176  __Pyx_GOTREF(__pyx_t_5);
7177  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7178  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_taub); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error)
7179  __Pyx_GOTREF(__pyx_t_1);
7180  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_W550); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 139, __pyx_L1_error)
7181  __Pyx_GOTREF(__pyx_t_7);
7182  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 139, __pyx_L1_error)
7183  __Pyx_GOTREF(__pyx_t_11);
7184  __Pyx_GIVEREF(__pyx_t_7);
7185  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7);
7186  __Pyx_INCREF(__pyx_v_ibm);
7187  __Pyx_GIVEREF(__pyx_v_ibm);
7188  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_ibm);
7189  __pyx_t_7 = 0;
7190  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 139, __pyx_L1_error)
7191  __Pyx_GOTREF(__pyx_t_7);
7192  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7193  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7194  __pyx_t_11 = NULL;
7195  __pyx_t_6 = 0;
7196  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
7197  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
7198  if (likely(__pyx_t_11)) {
7199  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
7200  __Pyx_INCREF(__pyx_t_11);
7201  __Pyx_INCREF(function);
7202  __Pyx_DECREF_SET(__pyx_t_3, function);
7203  __pyx_t_6 = 1;
7204  }
7205  }
7206  #if CYTHON_FAST_PYCALL
7207  if (PyFunction_Check(__pyx_t_3)) {
7208  PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_t_10, __pyx_t_5, __pyx_t_7};
7209  __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, 139, __pyx_L1_error)
7210  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
7211  __Pyx_GOTREF(__pyx_t_2);
7212  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7213  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7214  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7215  } else
7216  #endif
7217  #if CYTHON_FAST_PYCCALL
7218  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
7219  PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_t_10, __pyx_t_5, __pyx_t_7};
7220  __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, 139, __pyx_L1_error)
7221  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
7222  __Pyx_GOTREF(__pyx_t_2);
7223  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7224  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7225  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7226  } else
7227  #endif
7228  {
7229  __pyx_t_1 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error)
7230  __Pyx_GOTREF(__pyx_t_1);
7231  if (__pyx_t_11) {
7232  __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_11); __pyx_t_11 = NULL;
7233  }
7234  __Pyx_GIVEREF(__pyx_t_10);
7235  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_6, __pyx_t_10);
7236  __Pyx_GIVEREF(__pyx_t_5);
7237  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_6, __pyx_t_5);
7238  __Pyx_GIVEREF(__pyx_t_7);
7239  PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_6, __pyx_t_7);
7240  __pyx_t_10 = 0;
7241  __pyx_t_5 = 0;
7242  __pyx_t_7 = 0;
7243  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error)
7244  __Pyx_GOTREF(__pyx_t_2);
7245  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7246  }
7247  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7248  if (unlikely(PyObject_SetItem(__pyx_v_tauxb, __pyx_v_ibm, __pyx_t_2) < 0)) __PYX_ERR(0, 139, __pyx_L1_error)
7249  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7250 
7251  /* "dtocean.pyx":137
7252  * mrfls[:,ism,0] = mrflr
7253  * tauxs[ism] = np.interp(rfl[W860], mrfls[W860,ism], self.taus[W550,ism])
7254  * for ibm in range(NBIG): # <<<<<<<<<<<<<<
7255  * mrflb[:,ibm,0] = mrflr
7256  * tauxb[ibm] = np.interp(rfl[W860], mrflb[W860,ibm], self.taub[W550,ibm])
7257  */
7258  }
7259  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7260 
7261  /* "dtocean.pyx":141
7262  * tauxb[ibm] = np.interp(rfl[W860], mrflb[W860,ibm], self.taub[W550,ibm])
7263  *
7264  * trfls = np.zeros((NWL,NSMALL)) # <<<<<<<<<<<<<<
7265  * trflb = np.zeros((NWL,NBIG))
7266  * for iwl in range(NWL):
7267  */
7268  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error)
7269  __Pyx_GOTREF(__pyx_t_2);
7270  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 141, __pyx_L1_error)
7271  __Pyx_GOTREF(__pyx_t_3);
7272  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7273  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_NWL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error)
7274  __Pyx_GOTREF(__pyx_t_2);
7275  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NSMALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
7276  __Pyx_GOTREF(__pyx_t_1);
7277  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 141, __pyx_L1_error)
7278  __Pyx_GOTREF(__pyx_t_7);
7279  __Pyx_GIVEREF(__pyx_t_2);
7280  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
7281  __Pyx_GIVEREF(__pyx_t_1);
7282  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1);
7283  __pyx_t_2 = 0;
7284  __pyx_t_1 = 0;
7285  __pyx_t_1 = NULL;
7286  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
7287  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
7288  if (likely(__pyx_t_1)) {
7289  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
7290  __Pyx_INCREF(__pyx_t_1);
7291  __Pyx_INCREF(function);
7292  __Pyx_DECREF_SET(__pyx_t_3, function);
7293  }
7294  }
7295  __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
7296  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
7297  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7298  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error)
7299  __Pyx_GOTREF(__pyx_t_4);
7300  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7301  __pyx_v_trfls = __pyx_t_4;
7302  __pyx_t_4 = 0;
7303 
7304  /* "dtocean.pyx":142
7305  *
7306  * trfls = np.zeros((NWL,NSMALL))
7307  * trflb = np.zeros((NWL,NBIG)) # <<<<<<<<<<<<<<
7308  * for iwl in range(NWL):
7309  * for ism in range(NSMALL):
7310  */
7311  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __pyx_L1_error)
7312  __Pyx_GOTREF(__pyx_t_3);
7313  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 142, __pyx_L1_error)
7314  __Pyx_GOTREF(__pyx_t_7);
7315  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7316  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NWL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __pyx_L1_error)
7317  __Pyx_GOTREF(__pyx_t_3);
7318  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NBIG); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
7319  __Pyx_GOTREF(__pyx_t_1);
7320  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error)
7321  __Pyx_GOTREF(__pyx_t_2);
7322  __Pyx_GIVEREF(__pyx_t_3);
7323  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
7324  __Pyx_GIVEREF(__pyx_t_1);
7325  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
7326  __pyx_t_3 = 0;
7327  __pyx_t_1 = 0;
7328  __pyx_t_1 = NULL;
7329  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
7330  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
7331  if (likely(__pyx_t_1)) {
7332  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
7333  __Pyx_INCREF(__pyx_t_1);
7334  __Pyx_INCREF(function);
7335  __Pyx_DECREF_SET(__pyx_t_7, function);
7336  }
7337  }
7338  __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2);
7339  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
7340  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7341  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error)
7342  __Pyx_GOTREF(__pyx_t_4);
7343  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7344  __pyx_v_trflb = __pyx_t_4;
7345  __pyx_t_4 = 0;
7346 
7347  /* "dtocean.pyx":143
7348  * trfls = np.zeros((NWL,NSMALL))
7349  * trflb = np.zeros((NWL,NBIG))
7350  * for iwl in range(NWL): # <<<<<<<<<<<<<<
7351  * for ism in range(NSMALL):
7352  * trfls[iwl,ism] = np.interp(tauxs[ism],self.taus[W550,ism],mrfls[iwl,ism])
7353  */
7354  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_NWL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error)
7355  __Pyx_GOTREF(__pyx_t_4);
7356  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 143, __pyx_L1_error)
7357  __Pyx_GOTREF(__pyx_t_7);
7358  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7359  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
7360  __pyx_t_4 = __pyx_t_7; __Pyx_INCREF(__pyx_t_4); __pyx_t_8 = 0;
7361  __pyx_t_9 = NULL;
7362  } else {
7363  __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error)
7364  __Pyx_GOTREF(__pyx_t_4);
7365  __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 143, __pyx_L1_error)
7366  }
7367  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7368  for (;;) {
7369  if (likely(!__pyx_t_9)) {
7370  if (likely(PyList_CheckExact(__pyx_t_4))) {
7371  if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)) break;
7372  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7373  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 143, __pyx_L1_error)
7374  #else
7375  __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 143, __pyx_L1_error)
7376  __Pyx_GOTREF(__pyx_t_7);
7377  #endif
7378  } else {
7379  if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
7380  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7381  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 143, __pyx_L1_error)
7382  #else
7383  __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 143, __pyx_L1_error)
7384  __Pyx_GOTREF(__pyx_t_7);
7385  #endif
7386  }
7387  } else {
7388  __pyx_t_7 = __pyx_t_9(__pyx_t_4);
7389  if (unlikely(!__pyx_t_7)) {
7390  PyObject* exc_type = PyErr_Occurred();
7391  if (exc_type) {
7392  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
7393  else __PYX_ERR(0, 143, __pyx_L1_error)
7394  }
7395  break;
7396  }
7397  __Pyx_GOTREF(__pyx_t_7);
7398  }
7399  __Pyx_XDECREF_SET(__pyx_v_iwl, __pyx_t_7);
7400  __pyx_t_7 = 0;
7401 
7402  /* "dtocean.pyx":144
7403  * trflb = np.zeros((NWL,NBIG))
7404  * for iwl in range(NWL):
7405  * for ism in range(NSMALL): # <<<<<<<<<<<<<<
7406  * trfls[iwl,ism] = np.interp(tauxs[ism],self.taus[W550,ism],mrfls[iwl,ism])
7407  * for ibm in range(NBIG):
7408  */
7409  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NSMALL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 144, __pyx_L1_error)
7410  __Pyx_GOTREF(__pyx_t_7);
7411  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
7412  __Pyx_GOTREF(__pyx_t_2);
7413  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7414  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
7415  __pyx_t_7 = __pyx_t_2; __Pyx_INCREF(__pyx_t_7); __pyx_t_12 = 0;
7416  __pyx_t_13 = NULL;
7417  } else {
7418  __pyx_t_12 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 144, __pyx_L1_error)
7419  __Pyx_GOTREF(__pyx_t_7);
7420  __pyx_t_13 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 144, __pyx_L1_error)
7421  }
7422  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7423  for (;;) {
7424  if (likely(!__pyx_t_13)) {
7425  if (likely(PyList_CheckExact(__pyx_t_7))) {
7426  if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_7)) break;
7427  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7428  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_12); __Pyx_INCREF(__pyx_t_2); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 144, __pyx_L1_error)
7429  #else
7430  __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
7431  __Pyx_GOTREF(__pyx_t_2);
7432  #endif
7433  } else {
7434  if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
7435  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7436  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_12); __Pyx_INCREF(__pyx_t_2); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 144, __pyx_L1_error)
7437  #else
7438  __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
7439  __Pyx_GOTREF(__pyx_t_2);
7440  #endif
7441  }
7442  } else {
7443  __pyx_t_2 = __pyx_t_13(__pyx_t_7);
7444  if (unlikely(!__pyx_t_2)) {
7445  PyObject* exc_type = PyErr_Occurred();
7446  if (exc_type) {
7447  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
7448  else __PYX_ERR(0, 144, __pyx_L1_error)
7449  }
7450  break;
7451  }
7452  __Pyx_GOTREF(__pyx_t_2);
7453  }
7454  __Pyx_XDECREF_SET(__pyx_v_ism, __pyx_t_2);
7455  __pyx_t_2 = 0;
7456 
7457  /* "dtocean.pyx":145
7458  * for iwl in range(NWL):
7459  * for ism in range(NSMALL):
7460  * trfls[iwl,ism] = np.interp(tauxs[ism],self.taus[W550,ism],mrfls[iwl,ism]) # <<<<<<<<<<<<<<
7461  * for ibm in range(NBIG):
7462  * trflb[iwl,ibm] = np.interp(tauxb[ibm],self.taub[W550,ibm],mrflb[iwl,ibm])
7463  */
7464  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error)
7465  __Pyx_GOTREF(__pyx_t_1);
7466  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_interp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error)
7467  __Pyx_GOTREF(__pyx_t_3);
7468  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7469  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_tauxs, __pyx_v_ism); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error)
7470  __Pyx_GOTREF(__pyx_t_1);
7471  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_taus); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 145, __pyx_L1_error)
7472  __Pyx_GOTREF(__pyx_t_5);
7473  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_W550); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 145, __pyx_L1_error)
7474  __Pyx_GOTREF(__pyx_t_10);
7475  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 145, __pyx_L1_error)
7476  __Pyx_GOTREF(__pyx_t_11);
7477  __Pyx_GIVEREF(__pyx_t_10);
7478  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10);
7479  __Pyx_INCREF(__pyx_v_ism);
7480  __Pyx_GIVEREF(__pyx_v_ism);
7481  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_ism);
7482  __pyx_t_10 = 0;
7483  __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 145, __pyx_L1_error)
7484  __Pyx_GOTREF(__pyx_t_10);
7485  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7486  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7487  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 145, __pyx_L1_error)
7488  __Pyx_GOTREF(__pyx_t_11);
7489  __Pyx_INCREF(__pyx_v_iwl);
7490  __Pyx_GIVEREF(__pyx_v_iwl);
7491  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_iwl);
7492  __Pyx_INCREF(__pyx_v_ism);
7493  __Pyx_GIVEREF(__pyx_v_ism);
7494  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_ism);
7495  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_mrfls, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 145, __pyx_L1_error)
7496  __Pyx_GOTREF(__pyx_t_5);
7497  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7498  __pyx_t_11 = NULL;
7499  __pyx_t_6 = 0;
7500  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
7501  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
7502  if (likely(__pyx_t_11)) {
7503  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
7504  __Pyx_INCREF(__pyx_t_11);
7505  __Pyx_INCREF(function);
7506  __Pyx_DECREF_SET(__pyx_t_3, function);
7507  __pyx_t_6 = 1;
7508  }
7509  }
7510  #if CYTHON_FAST_PYCALL
7511  if (PyFunction_Check(__pyx_t_3)) {
7512  PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_t_1, __pyx_t_10, __pyx_t_5};
7513  __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, 145, __pyx_L1_error)
7514  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
7515  __Pyx_GOTREF(__pyx_t_2);
7516  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7517  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7518  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7519  } else
7520  #endif
7521  #if CYTHON_FAST_PYCCALL
7522  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
7523  PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_t_1, __pyx_t_10, __pyx_t_5};
7524  __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, 145, __pyx_L1_error)
7525  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
7526  __Pyx_GOTREF(__pyx_t_2);
7527  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7528  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7529  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7530  } else
7531  #endif
7532  {
7533  __pyx_t_14 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 145, __pyx_L1_error)
7534  __Pyx_GOTREF(__pyx_t_14);
7535  if (__pyx_t_11) {
7536  __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_11); __pyx_t_11 = NULL;
7537  }
7538  __Pyx_GIVEREF(__pyx_t_1);
7539  PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_6, __pyx_t_1);
7540  __Pyx_GIVEREF(__pyx_t_10);
7541  PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_6, __pyx_t_10);
7542  __Pyx_GIVEREF(__pyx_t_5);
7543  PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_6, __pyx_t_5);
7544  __pyx_t_1 = 0;
7545  __pyx_t_10 = 0;
7546  __pyx_t_5 = 0;
7547  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error)
7548  __Pyx_GOTREF(__pyx_t_2);
7549  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
7550  }
7551  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7552  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error)
7553  __Pyx_GOTREF(__pyx_t_3);
7554  __Pyx_INCREF(__pyx_v_iwl);
7555  __Pyx_GIVEREF(__pyx_v_iwl);
7556  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_iwl);
7557  __Pyx_INCREF(__pyx_v_ism);
7558  __Pyx_GIVEREF(__pyx_v_ism);
7559  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_ism);
7560  if (unlikely(PyObject_SetItem(__pyx_v_trfls, __pyx_t_3, __pyx_t_2) < 0)) __PYX_ERR(0, 145, __pyx_L1_error)
7561  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7562  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7563 
7564  /* "dtocean.pyx":144
7565  * trflb = np.zeros((NWL,NBIG))
7566  * for iwl in range(NWL):
7567  * for ism in range(NSMALL): # <<<<<<<<<<<<<<
7568  * trfls[iwl,ism] = np.interp(tauxs[ism],self.taus[W550,ism],mrfls[iwl,ism])
7569  * for ibm in range(NBIG):
7570  */
7571  }
7572  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7573 
7574  /* "dtocean.pyx":146
7575  * for ism in range(NSMALL):
7576  * trfls[iwl,ism] = np.interp(tauxs[ism],self.taus[W550,ism],mrfls[iwl,ism])
7577  * for ibm in range(NBIG): # <<<<<<<<<<<<<<
7578  * trflb[iwl,ibm] = np.interp(tauxb[ibm],self.taub[W550,ibm],mrflb[iwl,ibm])
7579  *
7580  */
7581  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NBIG); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 146, __pyx_L1_error)
7582  __Pyx_GOTREF(__pyx_t_7);
7583  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error)
7584  __Pyx_GOTREF(__pyx_t_2);
7585  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7586  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
7587  __pyx_t_7 = __pyx_t_2; __Pyx_INCREF(__pyx_t_7); __pyx_t_12 = 0;
7588  __pyx_t_13 = NULL;
7589  } else {
7590  __pyx_t_12 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 146, __pyx_L1_error)
7591  __Pyx_GOTREF(__pyx_t_7);
7592  __pyx_t_13 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 146, __pyx_L1_error)
7593  }
7594  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7595  for (;;) {
7596  if (likely(!__pyx_t_13)) {
7597  if (likely(PyList_CheckExact(__pyx_t_7))) {
7598  if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_7)) break;
7599  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7600  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_12); __Pyx_INCREF(__pyx_t_2); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 146, __pyx_L1_error)
7601  #else
7602  __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error)
7603  __Pyx_GOTREF(__pyx_t_2);
7604  #endif
7605  } else {
7606  if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
7607  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7608  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_12); __Pyx_INCREF(__pyx_t_2); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 146, __pyx_L1_error)
7609  #else
7610  __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error)
7611  __Pyx_GOTREF(__pyx_t_2);
7612  #endif
7613  }
7614  } else {
7615  __pyx_t_2 = __pyx_t_13(__pyx_t_7);
7616  if (unlikely(!__pyx_t_2)) {
7617  PyObject* exc_type = PyErr_Occurred();
7618  if (exc_type) {
7619  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
7620  else __PYX_ERR(0, 146, __pyx_L1_error)
7621  }
7622  break;
7623  }
7624  __Pyx_GOTREF(__pyx_t_2);
7625  }
7626  __Pyx_XDECREF_SET(__pyx_v_ibm, __pyx_t_2);
7627  __pyx_t_2 = 0;
7628 
7629  /* "dtocean.pyx":147
7630  * trfls[iwl,ism] = np.interp(tauxs[ism],self.taus[W550,ism],mrfls[iwl,ism])
7631  * for ibm in range(NBIG):
7632  * trflb[iwl,ibm] = np.interp(tauxb[ibm],self.taub[W550,ibm],mrflb[iwl,ibm]) # <<<<<<<<<<<<<<
7633  *
7634  * aot = np.zeros((NSMALL,NBIG))
7635  */
7636  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error)
7637  __Pyx_GOTREF(__pyx_t_3);
7638  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_interp); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 147, __pyx_L1_error)
7639  __Pyx_GOTREF(__pyx_t_14);
7640  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7641  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_tauxb, __pyx_v_ibm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error)
7642  __Pyx_GOTREF(__pyx_t_3);
7643  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_taub); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 147, __pyx_L1_error)
7644  __Pyx_GOTREF(__pyx_t_5);
7645  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_W550); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 147, __pyx_L1_error)
7646  __Pyx_GOTREF(__pyx_t_10);
7647  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
7648  __Pyx_GOTREF(__pyx_t_1);
7649  __Pyx_GIVEREF(__pyx_t_10);
7650  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10);
7651  __Pyx_INCREF(__pyx_v_ibm);
7652  __Pyx_GIVEREF(__pyx_v_ibm);
7653  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ibm);
7654  __pyx_t_10 = 0;
7655  __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 147, __pyx_L1_error)
7656  __Pyx_GOTREF(__pyx_t_10);
7657  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7658  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7659  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
7660  __Pyx_GOTREF(__pyx_t_1);
7661  __Pyx_INCREF(__pyx_v_iwl);
7662  __Pyx_GIVEREF(__pyx_v_iwl);
7663  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_iwl);
7664  __Pyx_INCREF(__pyx_v_ibm);
7665  __Pyx_GIVEREF(__pyx_v_ibm);
7666  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ibm);
7667  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_mrflb, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 147, __pyx_L1_error)
7668  __Pyx_GOTREF(__pyx_t_5);
7669  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7670  __pyx_t_1 = NULL;
7671  __pyx_t_6 = 0;
7672  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
7673  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_14);
7674  if (likely(__pyx_t_1)) {
7675  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
7676  __Pyx_INCREF(__pyx_t_1);
7677  __Pyx_INCREF(function);
7678  __Pyx_DECREF_SET(__pyx_t_14, function);
7679  __pyx_t_6 = 1;
7680  }
7681  }
7682  #if CYTHON_FAST_PYCALL
7683  if (PyFunction_Check(__pyx_t_14)) {
7684  PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_3, __pyx_t_10, __pyx_t_5};
7685  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
7686  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
7687  __Pyx_GOTREF(__pyx_t_2);
7688  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7689  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7690  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7691  } else
7692  #endif
7693  #if CYTHON_FAST_PYCCALL
7694  if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
7695  PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_3, __pyx_t_10, __pyx_t_5};
7696  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
7697  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
7698  __Pyx_GOTREF(__pyx_t_2);
7699  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7700  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7701  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7702  } else
7703  #endif
7704  {
7705  __pyx_t_11 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 147, __pyx_L1_error)
7706  __Pyx_GOTREF(__pyx_t_11);
7707  if (__pyx_t_1) {
7708  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __pyx_t_1 = NULL;
7709  }
7710  __Pyx_GIVEREF(__pyx_t_3);
7711  PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_6, __pyx_t_3);
7712  __Pyx_GIVEREF(__pyx_t_10);
7713  PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_6, __pyx_t_10);
7714  __Pyx_GIVEREF(__pyx_t_5);
7715  PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_6, __pyx_t_5);
7716  __pyx_t_3 = 0;
7717  __pyx_t_10 = 0;
7718  __pyx_t_5 = 0;
7719  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
7720  __Pyx_GOTREF(__pyx_t_2);
7721  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7722  }
7723  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
7724  __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 147, __pyx_L1_error)
7725  __Pyx_GOTREF(__pyx_t_14);
7726  __Pyx_INCREF(__pyx_v_iwl);
7727  __Pyx_GIVEREF(__pyx_v_iwl);
7728  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_iwl);
7729  __Pyx_INCREF(__pyx_v_ibm);
7730  __Pyx_GIVEREF(__pyx_v_ibm);
7731  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_v_ibm);
7732  if (unlikely(PyObject_SetItem(__pyx_v_trflb, __pyx_t_14, __pyx_t_2) < 0)) __PYX_ERR(0, 147, __pyx_L1_error)
7733  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
7734  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7735 
7736  /* "dtocean.pyx":146
7737  * for ism in range(NSMALL):
7738  * trfls[iwl,ism] = np.interp(tauxs[ism],self.taus[W550,ism],mrfls[iwl,ism])
7739  * for ibm in range(NBIG): # <<<<<<<<<<<<<<
7740  * trflb[iwl,ibm] = np.interp(tauxb[ibm],self.taub[W550,ibm],mrflb[iwl,ibm])
7741  *
7742  */
7743  }
7744  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7745 
7746  /* "dtocean.pyx":143
7747  * trfls = np.zeros((NWL,NSMALL))
7748  * trflb = np.zeros((NWL,NBIG))
7749  * for iwl in range(NWL): # <<<<<<<<<<<<<<
7750  * for ism in range(NSMALL):
7751  * trfls[iwl,ism] = np.interp(tauxs[ism],self.taus[W550,ism],mrfls[iwl,ism])
7752  */
7753  }
7754  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7755 
7756  /* "dtocean.pyx":149
7757  * trflb[iwl,ibm] = np.interp(tauxb[ibm],self.taub[W550,ibm],mrflb[iwl,ibm])
7758  *
7759  * aot = np.zeros((NSMALL,NBIG)) # <<<<<<<<<<<<<<
7760  * fmf = np.zeros((NSMALL,NBIG))
7761  * sse = np.zeros((NSMALL,NBIG))
7762  */
7763  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 149, __pyx_L1_error)
7764  __Pyx_GOTREF(__pyx_t_7);
7765  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error)
7766  __Pyx_GOTREF(__pyx_t_2);
7767  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7768  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NSMALL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 149, __pyx_L1_error)
7769  __Pyx_GOTREF(__pyx_t_7);
7770  __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_NBIG); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 149, __pyx_L1_error)
7771  __Pyx_GOTREF(__pyx_t_14);
7772  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 149, __pyx_L1_error)
7773  __Pyx_GOTREF(__pyx_t_11);
7774  __Pyx_GIVEREF(__pyx_t_7);
7775  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7);
7776  __Pyx_GIVEREF(__pyx_t_14);
7777  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_14);
7778  __pyx_t_7 = 0;
7779  __pyx_t_14 = 0;
7780  __pyx_t_14 = NULL;
7781  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
7782  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_2);
7783  if (likely(__pyx_t_14)) {
7784  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
7785  __Pyx_INCREF(__pyx_t_14);
7786  __Pyx_INCREF(function);
7787  __Pyx_DECREF_SET(__pyx_t_2, function);
7788  }
7789  }
7790  __pyx_t_4 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_14, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_11);
7791  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
7792  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7793  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 149, __pyx_L1_error)
7794  __Pyx_GOTREF(__pyx_t_4);
7795  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7796  __pyx_v_aot = __pyx_t_4;
7797  __pyx_t_4 = 0;
7798 
7799  /* "dtocean.pyx":150
7800  *
7801  * aot = np.zeros((NSMALL,NBIG))
7802  * fmf = np.zeros((NSMALL,NBIG)) # <<<<<<<<<<<<<<
7803  * sse = np.zeros((NSMALL,NBIG))
7804  * for ism in range(NSMALL):
7805  */
7806  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error)
7807  __Pyx_GOTREF(__pyx_t_2);
7808  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 150, __pyx_L1_error)
7809  __Pyx_GOTREF(__pyx_t_11);
7810  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7811  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_NSMALL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error)
7812  __Pyx_GOTREF(__pyx_t_2);
7813  __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_NBIG); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 150, __pyx_L1_error)
7814  __Pyx_GOTREF(__pyx_t_14);
7815  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 150, __pyx_L1_error)
7816  __Pyx_GOTREF(__pyx_t_7);
7817  __Pyx_GIVEREF(__pyx_t_2);
7818  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
7819  __Pyx_GIVEREF(__pyx_t_14);
7820  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_14);
7821  __pyx_t_2 = 0;
7822  __pyx_t_14 = 0;
7823  __pyx_t_14 = NULL;
7824  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
7825  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_11);
7826  if (likely(__pyx_t_14)) {
7827  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
7828  __Pyx_INCREF(__pyx_t_14);
7829  __Pyx_INCREF(function);
7830  __Pyx_DECREF_SET(__pyx_t_11, function);
7831  }
7832  }
7833  __pyx_t_4 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_14, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_7);
7834  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
7835  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7836  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error)
7837  __Pyx_GOTREF(__pyx_t_4);
7838  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7839  __pyx_v_fmf = __pyx_t_4;
7840  __pyx_t_4 = 0;
7841 
7842  /* "dtocean.pyx":151
7843  * aot = np.zeros((NSMALL,NBIG))
7844  * fmf = np.zeros((NSMALL,NBIG))
7845  * sse = np.zeros((NSMALL,NBIG)) # <<<<<<<<<<<<<<
7846  * for ism in range(NSMALL):
7847  * for ibm in range(NBIG):
7848  */
7849  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 151, __pyx_L1_error)
7850  __Pyx_GOTREF(__pyx_t_11);
7851  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 151, __pyx_L1_error)
7852  __Pyx_GOTREF(__pyx_t_7);
7853  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7854  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_NSMALL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 151, __pyx_L1_error)
7855  __Pyx_GOTREF(__pyx_t_11);
7856  __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_NBIG); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 151, __pyx_L1_error)
7857  __Pyx_GOTREF(__pyx_t_14);
7858  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error)
7859  __Pyx_GOTREF(__pyx_t_2);
7860  __Pyx_GIVEREF(__pyx_t_11);
7861  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11);
7862  __Pyx_GIVEREF(__pyx_t_14);
7863  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_14);
7864  __pyx_t_11 = 0;
7865  __pyx_t_14 = 0;
7866  __pyx_t_14 = NULL;
7867  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
7868  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_7);
7869  if (likely(__pyx_t_14)) {
7870  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
7871  __Pyx_INCREF(__pyx_t_14);
7872  __Pyx_INCREF(function);
7873  __Pyx_DECREF_SET(__pyx_t_7, function);
7874  }
7875  }
7876  __pyx_t_4 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_14, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2);
7877  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
7878  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7879  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error)
7880  __Pyx_GOTREF(__pyx_t_4);
7881  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7882  __pyx_v_sse = __pyx_t_4;
7883  __pyx_t_4 = 0;
7884 
7885  /* "dtocean.pyx":152
7886  * fmf = np.zeros((NSMALL,NBIG))
7887  * sse = np.zeros((NSMALL,NBIG))
7888  * for ism in range(NSMALL): # <<<<<<<<<<<<<<
7889  * for ibm in range(NBIG):
7890  * denom = np.clip(rfl-mrflr,0,1.2) + 0.01
7891  */
7892  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_NSMALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 152, __pyx_L1_error)
7893  __Pyx_GOTREF(__pyx_t_4);
7894  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 152, __pyx_L1_error)
7895  __Pyx_GOTREF(__pyx_t_7);
7896  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7897  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
7898  __pyx_t_4 = __pyx_t_7; __Pyx_INCREF(__pyx_t_4); __pyx_t_8 = 0;
7899  __pyx_t_9 = NULL;
7900  } else {
7901  __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 152, __pyx_L1_error)
7902  __Pyx_GOTREF(__pyx_t_4);
7903  __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 152, __pyx_L1_error)
7904  }
7905  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7906  for (;;) {
7907  if (likely(!__pyx_t_9)) {
7908  if (likely(PyList_CheckExact(__pyx_t_4))) {
7909  if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)) break;
7910  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7911  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 152, __pyx_L1_error)
7912  #else
7913  __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 152, __pyx_L1_error)
7914  __Pyx_GOTREF(__pyx_t_7);
7915  #endif
7916  } else {
7917  if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
7918  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7919  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 152, __pyx_L1_error)
7920  #else
7921  __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 152, __pyx_L1_error)
7922  __Pyx_GOTREF(__pyx_t_7);
7923  #endif
7924  }
7925  } else {
7926  __pyx_t_7 = __pyx_t_9(__pyx_t_4);
7927  if (unlikely(!__pyx_t_7)) {
7928  PyObject* exc_type = PyErr_Occurred();
7929  if (exc_type) {
7930  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
7931  else __PYX_ERR(0, 152, __pyx_L1_error)
7932  }
7933  break;
7934  }
7935  __Pyx_GOTREF(__pyx_t_7);
7936  }
7937  __Pyx_XDECREF_SET(__pyx_v_ism, __pyx_t_7);
7938  __pyx_t_7 = 0;
7939 
7940  /* "dtocean.pyx":153
7941  * sse = np.zeros((NSMALL,NBIG))
7942  * for ism in range(NSMALL):
7943  * for ibm in range(NBIG): # <<<<<<<<<<<<<<
7944  * denom = np.clip(rfl-mrflr,0,1.2) + 0.01
7945  * rbdif = rfl - trflb[:,ibm]
7946  */
7947  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NBIG); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 153, __pyx_L1_error)
7948  __Pyx_GOTREF(__pyx_t_7);
7949  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error)
7950  __Pyx_GOTREF(__pyx_t_2);
7951  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7952  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
7953  __pyx_t_7 = __pyx_t_2; __Pyx_INCREF(__pyx_t_7); __pyx_t_12 = 0;
7954  __pyx_t_13 = NULL;
7955  } else {
7956  __pyx_t_12 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 153, __pyx_L1_error)
7957  __Pyx_GOTREF(__pyx_t_7);
7958  __pyx_t_13 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 153, __pyx_L1_error)
7959  }
7960  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7961  for (;;) {
7962  if (likely(!__pyx_t_13)) {
7963  if (likely(PyList_CheckExact(__pyx_t_7))) {
7964  if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_7)) break;
7965  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7966  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_12); __Pyx_INCREF(__pyx_t_2); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 153, __pyx_L1_error)
7967  #else
7968  __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error)
7969  __Pyx_GOTREF(__pyx_t_2);
7970  #endif
7971  } else {
7972  if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
7973  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7974  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_12); __Pyx_INCREF(__pyx_t_2); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 153, __pyx_L1_error)
7975  #else
7976  __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error)
7977  __Pyx_GOTREF(__pyx_t_2);
7978  #endif
7979  }
7980  } else {
7981  __pyx_t_2 = __pyx_t_13(__pyx_t_7);
7982  if (unlikely(!__pyx_t_2)) {
7983  PyObject* exc_type = PyErr_Occurred();
7984  if (exc_type) {
7985  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
7986  else __PYX_ERR(0, 153, __pyx_L1_error)
7987  }
7988  break;
7989  }
7990  __Pyx_GOTREF(__pyx_t_2);
7991  }
7992  __Pyx_XDECREF_SET(__pyx_v_ibm, __pyx_t_2);
7993  __pyx_t_2 = 0;
7994 
7995  /* "dtocean.pyx":154
7996  * for ism in range(NSMALL):
7997  * for ibm in range(NBIG):
7998  * denom = np.clip(rfl-mrflr,0,1.2) + 0.01 # <<<<<<<<<<<<<<
7999  * rbdif = rfl - trflb[:,ibm]
8000  * sbdif = trfls[:,ism] - trflb[:,ibm]
8001  */
8002  __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 154, __pyx_L1_error)
8003  __Pyx_GOTREF(__pyx_t_14);
8004  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_clip); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 154, __pyx_L1_error)
8005  __Pyx_GOTREF(__pyx_t_11);
8006  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8007  __pyx_t_14 = PyNumber_Subtract(__pyx_v_rfl, __pyx_v_mrflr); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 154, __pyx_L1_error)
8008  __Pyx_GOTREF(__pyx_t_14);
8009  __pyx_t_5 = NULL;
8010  __pyx_t_6 = 0;
8011  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
8012  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_11);
8013  if (likely(__pyx_t_5)) {
8014  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
8015  __Pyx_INCREF(__pyx_t_5);
8016  __Pyx_INCREF(function);
8017  __Pyx_DECREF_SET(__pyx_t_11, function);
8018  __pyx_t_6 = 1;
8019  }
8020  }
8021  #if CYTHON_FAST_PYCALL
8022  if (PyFunction_Check(__pyx_t_11)) {
8023  PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_14, __pyx_int_0, __pyx_float_1_2};
8024  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error)
8025  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
8026  __Pyx_GOTREF(__pyx_t_2);
8027  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8028  } else
8029  #endif
8030  #if CYTHON_FAST_PYCCALL
8031  if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
8032  PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_14, __pyx_int_0, __pyx_float_1_2};
8033  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error)
8034  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
8035  __Pyx_GOTREF(__pyx_t_2);
8036  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8037  } else
8038  #endif
8039  {
8040  __pyx_t_10 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 154, __pyx_L1_error)
8041  __Pyx_GOTREF(__pyx_t_10);
8042  if (__pyx_t_5) {
8043  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __pyx_t_5 = NULL;
8044  }
8045  __Pyx_GIVEREF(__pyx_t_14);
8046  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_6, __pyx_t_14);
8047  __Pyx_INCREF(__pyx_int_0);
8048  __Pyx_GIVEREF(__pyx_int_0);
8049  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_6, __pyx_int_0);
8050  __Pyx_INCREF(__pyx_float_1_2);
8051  __Pyx_GIVEREF(__pyx_float_1_2);
8052  PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_6, __pyx_float_1_2);
8053  __pyx_t_14 = 0;
8054  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error)
8055  __Pyx_GOTREF(__pyx_t_2);
8056  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8057  }
8058  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
8059  __pyx_t_11 = __Pyx_PyFloat_AddObjC(__pyx_t_2, __pyx_float_0_01, 0.01, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 154, __pyx_L1_error)
8060  __Pyx_GOTREF(__pyx_t_11);
8061  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8062  __Pyx_XDECREF_SET(__pyx_v_denom, __pyx_t_11);
8063  __pyx_t_11 = 0;
8064 
8065  /* "dtocean.pyx":155
8066  * for ibm in range(NBIG):
8067  * denom = np.clip(rfl-mrflr,0,1.2) + 0.01
8068  * rbdif = rfl - trflb[:,ibm] # <<<<<<<<<<<<<<
8069  * sbdif = trfls[:,ism] - trflb[:,ibm]
8070  * sb2 = np.dot(sbdif[1:]/denom[1:],sbdif[1:]/denom[1:])
8071  */
8072  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 155, __pyx_L1_error)
8073  __Pyx_GOTREF(__pyx_t_11);
8074  __Pyx_INCREF(__pyx_slice__4);
8075  __Pyx_GIVEREF(__pyx_slice__4);
8076  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_slice__4);
8077  __Pyx_INCREF(__pyx_v_ibm);
8078  __Pyx_GIVEREF(__pyx_v_ibm);
8079  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_ibm);
8080  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_trflb, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error)
8081  __Pyx_GOTREF(__pyx_t_2);
8082  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
8083  __pyx_t_11 = PyNumber_Subtract(__pyx_v_rfl, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 155, __pyx_L1_error)
8084  __Pyx_GOTREF(__pyx_t_11);
8085  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8086  __Pyx_XDECREF_SET(__pyx_v_rbdif, __pyx_t_11);
8087  __pyx_t_11 = 0;
8088 
8089  /* "dtocean.pyx":156
8090  * denom = np.clip(rfl-mrflr,0,1.2) + 0.01
8091  * rbdif = rfl - trflb[:,ibm]
8092  * sbdif = trfls[:,ism] - trflb[:,ibm] # <<<<<<<<<<<<<<
8093  * sb2 = np.dot(sbdif[1:]/denom[1:],sbdif[1:]/denom[1:])
8094  * rbsb = np.dot(rbdif[1:]/denom[1:],sbdif[1:]/denom[1:])
8095  */
8096  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 156, __pyx_L1_error)
8097  __Pyx_GOTREF(__pyx_t_11);
8098  __Pyx_INCREF(__pyx_slice__4);
8099  __Pyx_GIVEREF(__pyx_slice__4);
8100  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_slice__4);
8101  __Pyx_INCREF(__pyx_v_ism);
8102  __Pyx_GIVEREF(__pyx_v_ism);
8103  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_ism);
8104  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_trfls, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error)
8105  __Pyx_GOTREF(__pyx_t_2);
8106  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
8107  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 156, __pyx_L1_error)
8108  __Pyx_GOTREF(__pyx_t_11);
8109  __Pyx_INCREF(__pyx_slice__4);
8110  __Pyx_GIVEREF(__pyx_slice__4);
8111  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_slice__4);
8112  __Pyx_INCREF(__pyx_v_ibm);
8113  __Pyx_GIVEREF(__pyx_v_ibm);
8114  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_ibm);
8115  __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_trflb, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 156, __pyx_L1_error)
8116  __Pyx_GOTREF(__pyx_t_10);
8117  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
8118  __pyx_t_11 = PyNumber_Subtract(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 156, __pyx_L1_error)
8119  __Pyx_GOTREF(__pyx_t_11);
8120  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8121  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8122  __Pyx_XDECREF_SET(__pyx_v_sbdif, __pyx_t_11);
8123  __pyx_t_11 = 0;
8124 
8125  /* "dtocean.pyx":157
8126  * rbdif = rfl - trflb[:,ibm]
8127  * sbdif = trfls[:,ism] - trflb[:,ibm]
8128  * sb2 = np.dot(sbdif[1:]/denom[1:],sbdif[1:]/denom[1:]) # <<<<<<<<<<<<<<
8129  * rbsb = np.dot(rbdif[1:]/denom[1:],sbdif[1:]/denom[1:])
8130  * xm = rbsb/sb2
8131  */
8132  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 157, __pyx_L1_error)
8133  __Pyx_GOTREF(__pyx_t_10);
8134  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_dot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error)
8135  __Pyx_GOTREF(__pyx_t_2);
8136  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8137  __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_sbdif, 1, 0, NULL, NULL, &__pyx_slice__7, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 157, __pyx_L1_error)
8138  __Pyx_GOTREF(__pyx_t_10);
8139  __pyx_t_14 = __Pyx_PyObject_GetSlice(__pyx_v_denom, 1, 0, NULL, NULL, &__pyx_slice__7, 1, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 157, __pyx_L1_error)
8140  __Pyx_GOTREF(__pyx_t_14);
8141  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_10, __pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 157, __pyx_L1_error)
8142  __Pyx_GOTREF(__pyx_t_5);
8143  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8144  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8145  __pyx_t_14 = __Pyx_PyObject_GetSlice(__pyx_v_sbdif, 1, 0, NULL, NULL, &__pyx_slice__7, 1, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 157, __pyx_L1_error)
8146  __Pyx_GOTREF(__pyx_t_14);
8147  __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_denom, 1, 0, NULL, NULL, &__pyx_slice__7, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 157, __pyx_L1_error)
8148  __Pyx_GOTREF(__pyx_t_10);
8149  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_14, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error)
8150  __Pyx_GOTREF(__pyx_t_3);
8151  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8152  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8153  __pyx_t_10 = NULL;
8154  __pyx_t_6 = 0;
8155  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
8156  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
8157  if (likely(__pyx_t_10)) {
8158  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
8159  __Pyx_INCREF(__pyx_t_10);
8160  __Pyx_INCREF(function);
8161  __Pyx_DECREF_SET(__pyx_t_2, function);
8162  __pyx_t_6 = 1;
8163  }
8164  }
8165  #if CYTHON_FAST_PYCALL
8166  if (PyFunction_Check(__pyx_t_2)) {
8167  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_5, __pyx_t_3};
8168  __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 157, __pyx_L1_error)
8169  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
8170  __Pyx_GOTREF(__pyx_t_11);
8171  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8172  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8173  } else
8174  #endif
8175  #if CYTHON_FAST_PYCCALL
8176  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
8177  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_5, __pyx_t_3};
8178  __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 157, __pyx_L1_error)
8179  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
8180  __Pyx_GOTREF(__pyx_t_11);
8181  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8182  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8183  } else
8184  #endif
8185  {
8186  __pyx_t_14 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 157, __pyx_L1_error)
8187  __Pyx_GOTREF(__pyx_t_14);
8188  if (__pyx_t_10) {
8189  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_10); __pyx_t_10 = NULL;
8190  }
8191  __Pyx_GIVEREF(__pyx_t_5);
8192  PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_6, __pyx_t_5);
8193  __Pyx_GIVEREF(__pyx_t_3);
8194  PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_6, __pyx_t_3);
8195  __pyx_t_5 = 0;
8196  __pyx_t_3 = 0;
8197  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_14, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 157, __pyx_L1_error)
8198  __Pyx_GOTREF(__pyx_t_11);
8199  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8200  }
8201  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8202  __Pyx_XDECREF_SET(__pyx_v_sb2, __pyx_t_11);
8203  __pyx_t_11 = 0;
8204 
8205  /* "dtocean.pyx":158
8206  * sbdif = trfls[:,ism] - trflb[:,ibm]
8207  * sb2 = np.dot(sbdif[1:]/denom[1:],sbdif[1:]/denom[1:])
8208  * rbsb = np.dot(rbdif[1:]/denom[1:],sbdif[1:]/denom[1:]) # <<<<<<<<<<<<<<
8209  * xm = rbsb/sb2
8210  * xm = np.max((np.min((xm,1.0)),0.0))
8211  */
8212  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)
8213  __Pyx_GOTREF(__pyx_t_2);
8214  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dot); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 158, __pyx_L1_error)
8215  __Pyx_GOTREF(__pyx_t_14);
8216  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8217  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_rbdif, 1, 0, NULL, NULL, &__pyx_slice__7, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)
8218  __Pyx_GOTREF(__pyx_t_2);
8219  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_denom, 1, 0, NULL, NULL, &__pyx_slice__7, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 158, __pyx_L1_error)
8220  __Pyx_GOTREF(__pyx_t_3);
8221  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 158, __pyx_L1_error)
8222  __Pyx_GOTREF(__pyx_t_5);
8223  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8224  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8225  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_sbdif, 1, 0, NULL, NULL, &__pyx_slice__7, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 158, __pyx_L1_error)
8226  __Pyx_GOTREF(__pyx_t_3);
8227  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_denom, 1, 0, NULL, NULL, &__pyx_slice__7, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)
8228  __Pyx_GOTREF(__pyx_t_2);
8229  __pyx_t_10 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 158, __pyx_L1_error)
8230  __Pyx_GOTREF(__pyx_t_10);
8231  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8232  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8233  __pyx_t_2 = NULL;
8234  __pyx_t_6 = 0;
8235  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
8236  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_14);
8237  if (likely(__pyx_t_2)) {
8238  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
8239  __Pyx_INCREF(__pyx_t_2);
8240  __Pyx_INCREF(function);
8241  __Pyx_DECREF_SET(__pyx_t_14, function);
8242  __pyx_t_6 = 1;
8243  }
8244  }
8245  #if CYTHON_FAST_PYCALL
8246  if (PyFunction_Check(__pyx_t_14)) {
8247  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_5, __pyx_t_10};
8248  __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 158, __pyx_L1_error)
8249  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
8250  __Pyx_GOTREF(__pyx_t_11);
8251  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8252  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8253  } else
8254  #endif
8255  #if CYTHON_FAST_PYCCALL
8256  if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
8257  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_5, __pyx_t_10};
8258  __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 158, __pyx_L1_error)
8259  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
8260  __Pyx_GOTREF(__pyx_t_11);
8261  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8262  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8263  } else
8264  #endif
8265  {
8266  __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 158, __pyx_L1_error)
8267  __Pyx_GOTREF(__pyx_t_3);
8268  if (__pyx_t_2) {
8269  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL;
8270  }
8271  __Pyx_GIVEREF(__pyx_t_5);
8272  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_t_5);
8273  __Pyx_GIVEREF(__pyx_t_10);
8274  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_t_10);
8275  __pyx_t_5 = 0;
8276  __pyx_t_10 = 0;
8277  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_3, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 158, __pyx_L1_error)
8278  __Pyx_GOTREF(__pyx_t_11);
8279  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8280  }
8281  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8282  __Pyx_XDECREF_SET(__pyx_v_rbsb, __pyx_t_11);
8283  __pyx_t_11 = 0;
8284 
8285  /* "dtocean.pyx":159
8286  * sb2 = np.dot(sbdif[1:]/denom[1:],sbdif[1:]/denom[1:])
8287  * rbsb = np.dot(rbdif[1:]/denom[1:],sbdif[1:]/denom[1:])
8288  * xm = rbsb/sb2 # <<<<<<<<<<<<<<
8289  * xm = np.max((np.min((xm,1.0)),0.0))
8290  * mrfl = xm*trfls[:,ism] + (1.0-xm)*trflb[:,ibm]
8291  */
8292  __pyx_t_11 = __Pyx_PyNumber_Divide(__pyx_v_rbsb, __pyx_v_sb2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 159, __pyx_L1_error)
8293  __Pyx_GOTREF(__pyx_t_11);
8294  __Pyx_XDECREF_SET(__pyx_v_xm, __pyx_t_11);
8295  __pyx_t_11 = 0;
8296 
8297  /* "dtocean.pyx":160
8298  * rbsb = np.dot(rbdif[1:]/denom[1:],sbdif[1:]/denom[1:])
8299  * xm = rbsb/sb2
8300  * xm = np.max((np.min((xm,1.0)),0.0)) # <<<<<<<<<<<<<<
8301  * mrfl = xm*trfls[:,ism] + (1.0-xm)*trflb[:,ibm]
8302  * # err = np.divide((rfl - mrfl),denom)
8303  */
8304  __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 160, __pyx_L1_error)
8305  __Pyx_GOTREF(__pyx_t_14);
8306  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_max); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error)
8307  __Pyx_GOTREF(__pyx_t_3);
8308  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8309  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 160, __pyx_L1_error)
8310  __Pyx_GOTREF(__pyx_t_10);
8311  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_min); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L1_error)
8312  __Pyx_GOTREF(__pyx_t_5);
8313  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8314  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 160, __pyx_L1_error)
8315  __Pyx_GOTREF(__pyx_t_10);
8316  __Pyx_INCREF(__pyx_v_xm);
8317  __Pyx_GIVEREF(__pyx_v_xm);
8318  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_xm);
8319  __Pyx_INCREF(__pyx_float_1_0);
8320  __Pyx_GIVEREF(__pyx_float_1_0);
8321  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_float_1_0);
8322  __pyx_t_2 = NULL;
8323  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
8324  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
8325  if (likely(__pyx_t_2)) {
8326  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
8327  __Pyx_INCREF(__pyx_t_2);
8328  __Pyx_INCREF(function);
8329  __Pyx_DECREF_SET(__pyx_t_5, function);
8330  }
8331  }
8332  __pyx_t_14 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_2, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10);
8333  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
8334  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8335  if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 160, __pyx_L1_error)
8336  __Pyx_GOTREF(__pyx_t_14);
8337  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8338  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L1_error)
8339  __Pyx_GOTREF(__pyx_t_5);
8340  __Pyx_GIVEREF(__pyx_t_14);
8341  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_14);
8342  __Pyx_INCREF(__pyx_float_0_0);
8343  __Pyx_GIVEREF(__pyx_float_0_0);
8344  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_float_0_0);
8345  __pyx_t_14 = 0;
8346  __pyx_t_14 = NULL;
8347  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
8348  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_3);
8349  if (likely(__pyx_t_14)) {
8350  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
8351  __Pyx_INCREF(__pyx_t_14);
8352  __Pyx_INCREF(function);
8353  __Pyx_DECREF_SET(__pyx_t_3, function);
8354  }
8355  }
8356  __pyx_t_11 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_14, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
8357  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
8358  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8359  if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 160, __pyx_L1_error)
8360  __Pyx_GOTREF(__pyx_t_11);
8361  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8362  __Pyx_DECREF_SET(__pyx_v_xm, __pyx_t_11);
8363  __pyx_t_11 = 0;
8364 
8365  /* "dtocean.pyx":161
8366  * xm = rbsb/sb2
8367  * xm = np.max((np.min((xm,1.0)),0.0))
8368  * mrfl = xm*trfls[:,ism] + (1.0-xm)*trflb[:,ibm] # <<<<<<<<<<<<<<
8369  * # err = np.divide((rfl - mrfl),denom)
8370  * err = rfl - mrfl
8371  */
8372  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 161, __pyx_L1_error)
8373  __Pyx_GOTREF(__pyx_t_11);
8374  __Pyx_INCREF(__pyx_slice__4);
8375  __Pyx_GIVEREF(__pyx_slice__4);
8376  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_slice__4);
8377  __Pyx_INCREF(__pyx_v_ism);
8378  __Pyx_GIVEREF(__pyx_v_ism);
8379  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_ism);
8380  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_trfls, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error)
8381  __Pyx_GOTREF(__pyx_t_3);
8382  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
8383  __pyx_t_11 = PyNumber_Multiply(__pyx_v_xm, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 161, __pyx_L1_error)
8384  __Pyx_GOTREF(__pyx_t_11);
8385  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8386  __pyx_t_3 = __Pyx_PyFloat_SubtractCObj(__pyx_float_1_0, __pyx_v_xm, 1.0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error)
8387  __Pyx_GOTREF(__pyx_t_3);
8388  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 161, __pyx_L1_error)
8389  __Pyx_GOTREF(__pyx_t_5);
8390  __Pyx_INCREF(__pyx_slice__4);
8391  __Pyx_GIVEREF(__pyx_slice__4);
8392  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_slice__4);
8393  __Pyx_INCREF(__pyx_v_ibm);
8394  __Pyx_GIVEREF(__pyx_v_ibm);
8395  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_ibm);
8396  __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_v_trflb, __pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 161, __pyx_L1_error)
8397  __Pyx_GOTREF(__pyx_t_14);
8398  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8399  __pyx_t_5 = PyNumber_Multiply(__pyx_t_3, __pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 161, __pyx_L1_error)
8400  __Pyx_GOTREF(__pyx_t_5);
8401  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8402  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8403  __pyx_t_14 = PyNumber_Add(__pyx_t_11, __pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 161, __pyx_L1_error)
8404  __Pyx_GOTREF(__pyx_t_14);
8405  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
8406  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8407  __Pyx_XDECREF_SET(__pyx_v_mrfl, __pyx_t_14);
8408  __pyx_t_14 = 0;
8409 
8410  /* "dtocean.pyx":163
8411  * mrfl = xm*trfls[:,ism] + (1.0-xm)*trflb[:,ibm]
8412  * # err = np.divide((rfl - mrfl),denom)
8413  * err = rfl - mrfl # <<<<<<<<<<<<<<
8414  * sse[ism,ibm] = np.dot(err[1:],err[1:])/(NWL-2)
8415  * aot[ism,ibm] = xm*tauxs[ism] + (1.0-xm)*tauxb[ibm]
8416  */
8417  __pyx_t_14 = PyNumber_Subtract(__pyx_v_rfl, __pyx_v_mrfl); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 163, __pyx_L1_error)
8418  __Pyx_GOTREF(__pyx_t_14);
8419  __Pyx_XDECREF_SET(__pyx_v_err, __pyx_t_14);
8420  __pyx_t_14 = 0;
8421 
8422  /* "dtocean.pyx":164
8423  * # err = np.divide((rfl - mrfl),denom)
8424  * err = rfl - mrfl
8425  * sse[ism,ibm] = np.dot(err[1:],err[1:])/(NWL-2) # <<<<<<<<<<<<<<
8426  * aot[ism,ibm] = xm*tauxs[ism] + (1.0-xm)*tauxb[ibm]
8427  * fmf[ism,ibm] = xm
8428  */
8429  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 164, __pyx_L1_error)
8430  __Pyx_GOTREF(__pyx_t_5);
8431  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_dot); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 164, __pyx_L1_error)
8432  __Pyx_GOTREF(__pyx_t_11);
8433  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8434  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_err, 1, 0, NULL, NULL, &__pyx_slice__7, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 164, __pyx_L1_error)
8435  __Pyx_GOTREF(__pyx_t_5);
8436  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_err, 1, 0, NULL, NULL, &__pyx_slice__7, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 164, __pyx_L1_error)
8437  __Pyx_GOTREF(__pyx_t_3);
8438  __pyx_t_10 = NULL;
8439  __pyx_t_6 = 0;
8440  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
8441  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
8442  if (likely(__pyx_t_10)) {
8443  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
8444  __Pyx_INCREF(__pyx_t_10);
8445  __Pyx_INCREF(function);
8446  __Pyx_DECREF_SET(__pyx_t_11, function);
8447  __pyx_t_6 = 1;
8448  }
8449  }
8450  #if CYTHON_FAST_PYCALL
8451  if (PyFunction_Check(__pyx_t_11)) {
8452  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_5, __pyx_t_3};
8453  __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 164, __pyx_L1_error)
8454  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
8455  __Pyx_GOTREF(__pyx_t_14);
8456  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8457  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8458  } else
8459  #endif
8460  #if CYTHON_FAST_PYCCALL
8461  if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
8462  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_5, __pyx_t_3};
8463  __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 164, __pyx_L1_error)
8464  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
8465  __Pyx_GOTREF(__pyx_t_14);
8466  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8467  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8468  } else
8469  #endif
8470  {
8471  __pyx_t_2 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error)
8472  __Pyx_GOTREF(__pyx_t_2);
8473  if (__pyx_t_10) {
8474  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_10); __pyx_t_10 = NULL;
8475  }
8476  __Pyx_GIVEREF(__pyx_t_5);
8477  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_t_5);
8478  __Pyx_GIVEREF(__pyx_t_3);
8479  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_t_3);
8480  __pyx_t_5 = 0;
8481  __pyx_t_3 = 0;
8482  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 164, __pyx_L1_error)
8483  __Pyx_GOTREF(__pyx_t_14);
8484  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8485  }
8486  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
8487  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_NWL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 164, __pyx_L1_error)
8488  __Pyx_GOTREF(__pyx_t_11);
8489  __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_t_11, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error)
8490  __Pyx_GOTREF(__pyx_t_2);
8491  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
8492  __pyx_t_11 = __Pyx_PyNumber_Divide(__pyx_t_14, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 164, __pyx_L1_error)
8493  __Pyx_GOTREF(__pyx_t_11);
8494  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8495  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8496  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error)
8497  __Pyx_GOTREF(__pyx_t_2);
8498  __Pyx_INCREF(__pyx_v_ism);
8499  __Pyx_GIVEREF(__pyx_v_ism);
8500  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ism);
8501  __Pyx_INCREF(__pyx_v_ibm);
8502  __Pyx_GIVEREF(__pyx_v_ibm);
8503  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ibm);
8504  if (unlikely(PyObject_SetItem(__pyx_v_sse, __pyx_t_2, __pyx_t_11) < 0)) __PYX_ERR(0, 164, __pyx_L1_error)
8505  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8506  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
8507 
8508  /* "dtocean.pyx":165
8509  * err = rfl - mrfl
8510  * sse[ism,ibm] = np.dot(err[1:],err[1:])/(NWL-2)
8511  * aot[ism,ibm] = xm*tauxs[ism] + (1.0-xm)*tauxb[ibm] # <<<<<<<<<<<<<<
8512  * fmf[ism,ibm] = xm
8513  * im = divmod(sse.argmin(),NBIG)
8514  */
8515  __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_tauxs, __pyx_v_ism); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 165, __pyx_L1_error)
8516  __Pyx_GOTREF(__pyx_t_11);
8517  __pyx_t_2 = PyNumber_Multiply(__pyx_v_xm, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error)
8518  __Pyx_GOTREF(__pyx_t_2);
8519  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
8520  __pyx_t_11 = __Pyx_PyFloat_SubtractCObj(__pyx_float_1_0, __pyx_v_xm, 1.0, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 165, __pyx_L1_error)
8521  __Pyx_GOTREF(__pyx_t_11);
8522  __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_v_tauxb, __pyx_v_ibm); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 165, __pyx_L1_error)
8523  __Pyx_GOTREF(__pyx_t_14);
8524  __pyx_t_3 = PyNumber_Multiply(__pyx_t_11, __pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error)
8525  __Pyx_GOTREF(__pyx_t_3);
8526  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
8527  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8528  __pyx_t_14 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 165, __pyx_L1_error)
8529  __Pyx_GOTREF(__pyx_t_14);
8530  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8531  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8532  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error)
8533  __Pyx_GOTREF(__pyx_t_3);
8534  __Pyx_INCREF(__pyx_v_ism);
8535  __Pyx_GIVEREF(__pyx_v_ism);
8536  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_ism);
8537  __Pyx_INCREF(__pyx_v_ibm);
8538  __Pyx_GIVEREF(__pyx_v_ibm);
8539  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_ibm);
8540  if (unlikely(PyObject_SetItem(__pyx_v_aot, __pyx_t_3, __pyx_t_14) < 0)) __PYX_ERR(0, 165, __pyx_L1_error)
8541  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8542  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8543 
8544  /* "dtocean.pyx":166
8545  * sse[ism,ibm] = np.dot(err[1:],err[1:])/(NWL-2)
8546  * aot[ism,ibm] = xm*tauxs[ism] + (1.0-xm)*tauxb[ibm]
8547  * fmf[ism,ibm] = xm # <<<<<<<<<<<<<<
8548  * im = divmod(sse.argmin(),NBIG)
8549  * self.type = (NBIG-1)*im[1] + im[0]
8550  */
8551  __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 166, __pyx_L1_error)
8552  __Pyx_GOTREF(__pyx_t_14);
8553  __Pyx_INCREF(__pyx_v_ism);
8554  __Pyx_GIVEREF(__pyx_v_ism);
8555  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_ism);
8556  __Pyx_INCREF(__pyx_v_ibm);
8557  __Pyx_GIVEREF(__pyx_v_ibm);
8558  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_v_ibm);
8559  if (unlikely(PyObject_SetItem(__pyx_v_fmf, __pyx_t_14, __pyx_v_xm) < 0)) __PYX_ERR(0, 166, __pyx_L1_error)
8560  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8561 
8562  /* "dtocean.pyx":153
8563  * sse = np.zeros((NSMALL,NBIG))
8564  * for ism in range(NSMALL):
8565  * for ibm in range(NBIG): # <<<<<<<<<<<<<<
8566  * denom = np.clip(rfl-mrflr,0,1.2) + 0.01
8567  * rbdif = rfl - trflb[:,ibm]
8568  */
8569  }
8570  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8571 
8572  /* "dtocean.pyx":152
8573  * fmf = np.zeros((NSMALL,NBIG))
8574  * sse = np.zeros((NSMALL,NBIG))
8575  * for ism in range(NSMALL): # <<<<<<<<<<<<<<
8576  * for ibm in range(NBIG):
8577  * denom = np.clip(rfl-mrflr,0,1.2) + 0.01
8578  */
8579  }
8580  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8581 
8582  /* "dtocean.pyx":167
8583  * aot[ism,ibm] = xm*tauxs[ism] + (1.0-xm)*tauxb[ibm]
8584  * fmf[ism,ibm] = xm
8585  * im = divmod(sse.argmin(),NBIG) # <<<<<<<<<<<<<<
8586  * self.type = (NBIG-1)*im[1] + im[0]
8587  * self.sse = sse[im[0],im[1]]
8588  */
8589  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sse, __pyx_n_s_argmin); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 167, __pyx_L1_error)
8590  __Pyx_GOTREF(__pyx_t_7);
8591  __pyx_t_14 = NULL;
8592  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
8593  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_7);
8594  if (likely(__pyx_t_14)) {
8595  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
8596  __Pyx_INCREF(__pyx_t_14);
8597  __Pyx_INCREF(function);
8598  __Pyx_DECREF_SET(__pyx_t_7, function);
8599  }
8600  }
8601  __pyx_t_4 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
8602  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
8603  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error)
8604  __Pyx_GOTREF(__pyx_t_4);
8605  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8606  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NBIG); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 167, __pyx_L1_error)
8607  __Pyx_GOTREF(__pyx_t_7);
8608  __pyx_t_14 = PyNumber_Divmod(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 167, __pyx_L1_error)
8609  __Pyx_GOTREF(__pyx_t_14);
8610  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8611  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8612  __pyx_v_im = __pyx_t_14;
8613  __pyx_t_14 = 0;
8614 
8615  /* "dtocean.pyx":168
8616  * fmf[ism,ibm] = xm
8617  * im = divmod(sse.argmin(),NBIG)
8618  * self.type = (NBIG-1)*im[1] + im[0] # <<<<<<<<<<<<<<
8619  * self.sse = sse[im[0],im[1]]
8620  * self.aot = aot[im[0],im[1]]
8621  */
8622  __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_NBIG); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 168, __pyx_L1_error)
8623  __Pyx_GOTREF(__pyx_t_14);
8624  __pyx_t_7 = __Pyx_PyInt_SubtractObjC(__pyx_t_14, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 168, __pyx_L1_error)
8625  __Pyx_GOTREF(__pyx_t_7);
8626  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8627  __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_im, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 168, __pyx_L1_error)
8628  __Pyx_GOTREF(__pyx_t_14);
8629  __pyx_t_4 = PyNumber_Multiply(__pyx_t_7, __pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 168, __pyx_L1_error)
8630  __Pyx_GOTREF(__pyx_t_4);
8631  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8632  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8633  __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_im, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 168, __pyx_L1_error)
8634  __Pyx_GOTREF(__pyx_t_14);
8635  __pyx_t_7 = PyNumber_Add(__pyx_t_4, __pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 168, __pyx_L1_error)
8636  __Pyx_GOTREF(__pyx_t_7);
8637  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8638  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8639  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_type, __pyx_t_7) < 0) __PYX_ERR(0, 168, __pyx_L1_error)
8640  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8641 
8642  /* "dtocean.pyx":169
8643  * im = divmod(sse.argmin(),NBIG)
8644  * self.type = (NBIG-1)*im[1] + im[0]
8645  * self.sse = sse[im[0],im[1]] # <<<<<<<<<<<<<<
8646  * self.aot = aot[im[0],im[1]]
8647  * self.fmf = fmf[im[0],im[1]]
8648  */
8649  __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_im, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 169, __pyx_L1_error)
8650  __Pyx_GOTREF(__pyx_t_7);
8651  __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_im, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 169, __pyx_L1_error)
8652  __Pyx_GOTREF(__pyx_t_14);
8653  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 169, __pyx_L1_error)
8654  __Pyx_GOTREF(__pyx_t_4);
8655  __Pyx_GIVEREF(__pyx_t_7);
8656  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7);
8657  __Pyx_GIVEREF(__pyx_t_14);
8658  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_14);
8659  __pyx_t_7 = 0;
8660  __pyx_t_14 = 0;
8661  __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_v_sse, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 169, __pyx_L1_error)
8662  __Pyx_GOTREF(__pyx_t_14);
8663  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8664  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sse, __pyx_t_14) < 0) __PYX_ERR(0, 169, __pyx_L1_error)
8665  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8666 
8667  /* "dtocean.pyx":170
8668  * self.type = (NBIG-1)*im[1] + im[0]
8669  * self.sse = sse[im[0],im[1]]
8670  * self.aot = aot[im[0],im[1]] # <<<<<<<<<<<<<<
8671  * self.fmf = fmf[im[0],im[1]]
8672  * self.rfl = rfl
8673  */
8674  __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_im, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 170, __pyx_L1_error)
8675  __Pyx_GOTREF(__pyx_t_14);
8676  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_im, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 170, __pyx_L1_error)
8677  __Pyx_GOTREF(__pyx_t_4);
8678  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 170, __pyx_L1_error)
8679  __Pyx_GOTREF(__pyx_t_7);
8680  __Pyx_GIVEREF(__pyx_t_14);
8681  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_14);
8682  __Pyx_GIVEREF(__pyx_t_4);
8683  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4);
8684  __pyx_t_14 = 0;
8685  __pyx_t_4 = 0;
8686  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_aot, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 170, __pyx_L1_error)
8687  __Pyx_GOTREF(__pyx_t_4);
8688  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8689  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_aot, __pyx_t_4) < 0) __PYX_ERR(0, 170, __pyx_L1_error)
8690  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8691 
8692  /* "dtocean.pyx":171
8693  * self.sse = sse[im[0],im[1]]
8694  * self.aot = aot[im[0],im[1]]
8695  * self.fmf = fmf[im[0],im[1]] # <<<<<<<<<<<<<<
8696  * self.rfl = rfl
8697  * self.mrfl = self.fmf*trfls[:,im[0]] + (1.0-self.fmf)*trflb[:,im[1]]
8698  */
8699  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_im, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
8700  __Pyx_GOTREF(__pyx_t_4);
8701  __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_im, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 171, __pyx_L1_error)
8702  __Pyx_GOTREF(__pyx_t_7);
8703  __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 171, __pyx_L1_error)
8704  __Pyx_GOTREF(__pyx_t_14);
8705  __Pyx_GIVEREF(__pyx_t_4);
8706  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_4);
8707  __Pyx_GIVEREF(__pyx_t_7);
8708  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_7);
8709  __pyx_t_4 = 0;
8710  __pyx_t_7 = 0;
8711  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_fmf, __pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 171, __pyx_L1_error)
8712  __Pyx_GOTREF(__pyx_t_7);
8713  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8714  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fmf, __pyx_t_7) < 0) __PYX_ERR(0, 171, __pyx_L1_error)
8715  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8716 
8717  /* "dtocean.pyx":172
8718  * self.aot = aot[im[0],im[1]]
8719  * self.fmf = fmf[im[0],im[1]]
8720  * self.rfl = rfl # <<<<<<<<<<<<<<
8721  * self.mrfl = self.fmf*trfls[:,im[0]] + (1.0-self.fmf)*trflb[:,im[1]]
8722  * self.rsd = self.mrfl - self.rfl
8723  */
8724  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rfl, __pyx_v_rfl) < 0) __PYX_ERR(0, 172, __pyx_L1_error)
8725 
8726  /* "dtocean.pyx":173
8727  * self.fmf = fmf[im[0],im[1]]
8728  * self.rfl = rfl
8729  * self.mrfl = self.fmf*trfls[:,im[0]] + (1.0-self.fmf)*trflb[:,im[1]] # <<<<<<<<<<<<<<
8730  * self.rsd = self.mrfl - self.rfl
8731  * self.sse = np.dot(self.rsd,self.rsd)/(NWL-2)
8732  */
8733  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fmf); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 173, __pyx_L1_error)
8734  __Pyx_GOTREF(__pyx_t_7);
8735  __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_im, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 173, __pyx_L1_error)
8736  __Pyx_GOTREF(__pyx_t_14);
8737  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
8738  __Pyx_GOTREF(__pyx_t_4);
8739  __Pyx_INCREF(__pyx_slice__4);
8740  __Pyx_GIVEREF(__pyx_slice__4);
8741  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_slice__4);
8742  __Pyx_GIVEREF(__pyx_t_14);
8743  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_14);
8744  __pyx_t_14 = 0;
8745  __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_v_trfls, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 173, __pyx_L1_error)
8746  __Pyx_GOTREF(__pyx_t_14);
8747  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8748  __pyx_t_4 = PyNumber_Multiply(__pyx_t_7, __pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
8749  __Pyx_GOTREF(__pyx_t_4);
8750  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8751  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8752  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fmf); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 173, __pyx_L1_error)
8753  __Pyx_GOTREF(__pyx_t_14);
8754  __pyx_t_7 = __Pyx_PyFloat_SubtractCObj(__pyx_float_1_0, __pyx_t_14, 1.0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 173, __pyx_L1_error)
8755  __Pyx_GOTREF(__pyx_t_7);
8756  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8757  __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_im, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 173, __pyx_L1_error)
8758  __Pyx_GOTREF(__pyx_t_14);
8759  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error)
8760  __Pyx_GOTREF(__pyx_t_3);
8761  __Pyx_INCREF(__pyx_slice__4);
8762  __Pyx_GIVEREF(__pyx_slice__4);
8763  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_slice__4);
8764  __Pyx_GIVEREF(__pyx_t_14);
8765  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_14);
8766  __pyx_t_14 = 0;
8767  __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_v_trflb, __pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 173, __pyx_L1_error)
8768  __Pyx_GOTREF(__pyx_t_14);
8769  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8770  __pyx_t_3 = PyNumber_Multiply(__pyx_t_7, __pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error)
8771  __Pyx_GOTREF(__pyx_t_3);
8772  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8773  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8774  __pyx_t_14 = PyNumber_Add(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 173, __pyx_L1_error)
8775  __Pyx_GOTREF(__pyx_t_14);
8776  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8777  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8778  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mrfl, __pyx_t_14) < 0) __PYX_ERR(0, 173, __pyx_L1_error)
8779  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8780 
8781  /* "dtocean.pyx":174
8782  * self.rfl = rfl
8783  * self.mrfl = self.fmf*trfls[:,im[0]] + (1.0-self.fmf)*trflb[:,im[1]]
8784  * self.rsd = self.mrfl - self.rfl # <<<<<<<<<<<<<<
8785  * self.sse = np.dot(self.rsd,self.rsd)/(NWL-2)
8786  * self.rayl = mrflr
8787  */
8788  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mrfl); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 174, __pyx_L1_error)
8789  __Pyx_GOTREF(__pyx_t_14);
8790  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rfl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 174, __pyx_L1_error)
8791  __Pyx_GOTREF(__pyx_t_3);
8792  __pyx_t_4 = PyNumber_Subtract(__pyx_t_14, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 174, __pyx_L1_error)
8793  __Pyx_GOTREF(__pyx_t_4);
8794  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8795  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8796  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rsd, __pyx_t_4) < 0) __PYX_ERR(0, 174, __pyx_L1_error)
8797  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8798 
8799  /* "dtocean.pyx":175
8800  * self.mrfl = self.fmf*trfls[:,im[0]] + (1.0-self.fmf)*trflb[:,im[1]]
8801  * self.rsd = self.mrfl - self.rfl
8802  * self.sse = np.dot(self.rsd,self.rsd)/(NWL-2) # <<<<<<<<<<<<<<
8803  * self.rayl = mrflr
8804  *
8805  */
8806  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 175, __pyx_L1_error)
8807  __Pyx_GOTREF(__pyx_t_3);
8808  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dot); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 175, __pyx_L1_error)
8809  __Pyx_GOTREF(__pyx_t_14);
8810  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8811  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rsd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 175, __pyx_L1_error)
8812  __Pyx_GOTREF(__pyx_t_3);
8813  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rsd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 175, __pyx_L1_error)
8814  __Pyx_GOTREF(__pyx_t_7);
8815  __pyx_t_2 = NULL;
8816  __pyx_t_6 = 0;
8817  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
8818  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_14);
8819  if (likely(__pyx_t_2)) {
8820  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
8821  __Pyx_INCREF(__pyx_t_2);
8822  __Pyx_INCREF(function);
8823  __Pyx_DECREF_SET(__pyx_t_14, function);
8824  __pyx_t_6 = 1;
8825  }
8826  }
8827  #if CYTHON_FAST_PYCALL
8828  if (PyFunction_Check(__pyx_t_14)) {
8829  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_3, __pyx_t_7};
8830  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 175, __pyx_L1_error)
8831  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
8832  __Pyx_GOTREF(__pyx_t_4);
8833  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8834  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8835  } else
8836  #endif
8837  #if CYTHON_FAST_PYCCALL
8838  if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
8839  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_3, __pyx_t_7};
8840  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 175, __pyx_L1_error)
8841  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
8842  __Pyx_GOTREF(__pyx_t_4);
8843  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8844  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8845  } else
8846  #endif
8847  {
8848  __pyx_t_11 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 175, __pyx_L1_error)
8849  __Pyx_GOTREF(__pyx_t_11);
8850  if (__pyx_t_2) {
8851  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2); __pyx_t_2 = NULL;
8852  }
8853  __Pyx_GIVEREF(__pyx_t_3);
8854  PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_6, __pyx_t_3);
8855  __Pyx_GIVEREF(__pyx_t_7);
8856  PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_6, __pyx_t_7);
8857  __pyx_t_3 = 0;
8858  __pyx_t_7 = 0;
8859  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 175, __pyx_L1_error)
8860  __Pyx_GOTREF(__pyx_t_4);
8861  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
8862  }
8863  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8864  __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_NWL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 175, __pyx_L1_error)
8865  __Pyx_GOTREF(__pyx_t_14);
8866  __pyx_t_11 = __Pyx_PyInt_SubtractObjC(__pyx_t_14, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 175, __pyx_L1_error)
8867  __Pyx_GOTREF(__pyx_t_11);
8868  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8869  __pyx_t_14 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_t_11); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 175, __pyx_L1_error)
8870  __Pyx_GOTREF(__pyx_t_14);
8871  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8872  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
8873  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sse, __pyx_t_14) < 0) __PYX_ERR(0, 175, __pyx_L1_error)
8874  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8875 
8876  /* "dtocean.pyx":176
8877  * self.rsd = self.mrfl - self.rfl
8878  * self.sse = np.dot(self.rsd,self.rsd)/(NWL-2)
8879  * self.rayl = mrflr # <<<<<<<<<<<<<<
8880  *
8881  * return self.fmf, self.aot, self.sse, self.type
8882  */
8883  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rayl, __pyx_v_mrflr) < 0) __PYX_ERR(0, 176, __pyx_L1_error)
8884 
8885  /* "dtocean.pyx":178
8886  * self.rayl = mrflr
8887  *
8888  * return self.fmf, self.aot, self.sse, self.type # <<<<<<<<<<<<<<
8889  *
8890  * def plot(self, iy, ix):
8891  */
8892  __Pyx_XDECREF(__pyx_r);
8893  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fmf); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 178, __pyx_L1_error)
8894  __Pyx_GOTREF(__pyx_t_14);
8895  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_aot); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 178, __pyx_L1_error)
8896  __Pyx_GOTREF(__pyx_t_11);
8897  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_sse); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 178, __pyx_L1_error)
8898  __Pyx_GOTREF(__pyx_t_4);
8899  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 178, __pyx_L1_error)
8900  __Pyx_GOTREF(__pyx_t_7);
8901  __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error)
8902  __Pyx_GOTREF(__pyx_t_3);
8903  __Pyx_GIVEREF(__pyx_t_14);
8904  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_14);
8905  __Pyx_GIVEREF(__pyx_t_11);
8906  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_11);
8907  __Pyx_GIVEREF(__pyx_t_4);
8908  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_4);
8909  __Pyx_GIVEREF(__pyx_t_7);
8910  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_7);
8911  __pyx_t_14 = 0;
8912  __pyx_t_11 = 0;
8913  __pyx_t_4 = 0;
8914  __pyx_t_7 = 0;
8915  __pyx_r = __pyx_t_3;
8916  __pyx_t_3 = 0;
8917  goto __pyx_L0;
8918 
8919  /* "dtocean.pyx":124
8920  * return
8921  *
8922  * def process(self,rfl,sza,vza,raa,wnd): # <<<<<<<<<<<<<<
8923  * xit = np.stack((wnd, sza, vza, raa))
8924  * units = np.pi/np.cos(sza*D2R)
8925  */
8926 
8927  /* function exit code */
8928  __pyx_L1_error:;
8929  __Pyx_XDECREF(__pyx_t_1);
8930  __Pyx_XDECREF(__pyx_t_2);
8931  __Pyx_XDECREF(__pyx_t_3);
8932  __Pyx_XDECREF(__pyx_t_4);
8933  __Pyx_XDECREF(__pyx_t_5);
8934  __Pyx_XDECREF(__pyx_t_7);
8935  __Pyx_XDECREF(__pyx_t_10);
8936  __Pyx_XDECREF(__pyx_t_11);
8937  __Pyx_XDECREF(__pyx_t_14);
8938  __Pyx_AddTraceback("dtocean.dtocean.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
8939  __pyx_r = NULL;
8940  __pyx_L0:;
8941  __Pyx_XDECREF(__pyx_v_xit);
8942  __Pyx_XDECREF(__pyx_v_units);
8943  __Pyx_XDECREF(__pyx_v_mrfls);
8944  __Pyx_XDECREF(__pyx_v_mrflb);
8945  __Pyx_XDECREF(__pyx_v_mrflr);
8946  __Pyx_XDECREF(__pyx_v_tauxs);
8947  __Pyx_XDECREF(__pyx_v_tauxb);
8948  __Pyx_XDECREF(__pyx_v_ism);
8949  __Pyx_XDECREF(__pyx_v_ibm);
8950  __Pyx_XDECREF(__pyx_v_trfls);
8951  __Pyx_XDECREF(__pyx_v_trflb);
8952  __Pyx_XDECREF(__pyx_v_iwl);
8953  __Pyx_XDECREF(__pyx_v_aot);
8954  __Pyx_XDECREF(__pyx_v_fmf);
8955  __Pyx_XDECREF(__pyx_v_sse);
8956  __Pyx_XDECREF(__pyx_v_denom);
8957  __Pyx_XDECREF(__pyx_v_rbdif);
8958  __Pyx_XDECREF(__pyx_v_sbdif);
8959  __Pyx_XDECREF(__pyx_v_sb2);
8960  __Pyx_XDECREF(__pyx_v_rbsb);
8961  __Pyx_XDECREF(__pyx_v_xm);
8962  __Pyx_XDECREF(__pyx_v_mrfl);
8963  __Pyx_XDECREF(__pyx_v_err);
8964  __Pyx_XDECREF(__pyx_v_im);
8965  __Pyx_XGIVEREF(__pyx_r);
8966  __Pyx_RefNannyFinishContext();
8967  return __pyx_r;
8968 }
8969 
8970 /* "dtocean.pyx":180
8971  * return self.fmf, self.aot, self.sse, self.type
8972  *
8973  * def plot(self, iy, ix): # <<<<<<<<<<<<<<
8974  * plt.clf()
8975  * plt.grid(True)
8976  */
8977 
8978 /* Python wrapper */
8979 static PyObject *__pyx_pw_7dtocean_7dtocean_9plot(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8980 static PyMethodDef __pyx_mdef_7dtocean_7dtocean_9plot = {"plot", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7dtocean_7dtocean_9plot, METH_VARARGS|METH_KEYWORDS, 0};
8981 static PyObject *__pyx_pw_7dtocean_7dtocean_9plot(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8982  PyObject *__pyx_v_self = 0;
8983  PyObject *__pyx_v_iy = 0;
8984  PyObject *__pyx_v_ix = 0;
8985  int __pyx_lineno = 0;
8986  const char *__pyx_filename = NULL;
8987  int __pyx_clineno = 0;
8988  PyObject *__pyx_r = 0;
8989  __Pyx_RefNannyDeclarations
8990  __Pyx_RefNannySetupContext("plot (wrapper)", 0);
8991  {
8992  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_iy,&__pyx_n_s_ix,0};
8993  PyObject* values[3] = {0,0,0};
8994  if (unlikely(__pyx_kwds)) {
8995  Py_ssize_t kw_args;
8996  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8997  switch (pos_args) {
8998  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8999  CYTHON_FALLTHROUGH;
9000  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9001  CYTHON_FALLTHROUGH;
9002  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9003  CYTHON_FALLTHROUGH;
9004  case 0: break;
9005  default: goto __pyx_L5_argtuple_error;
9006  }
9007  kw_args = PyDict_Size(__pyx_kwds);
9008  switch (pos_args) {
9009  case 0:
9010  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
9011  else goto __pyx_L5_argtuple_error;
9012  CYTHON_FALLTHROUGH;
9013  case 1:
9014  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iy)) != 0)) kw_args--;
9015  else {
9016  __Pyx_RaiseArgtupleInvalid("plot", 1, 3, 3, 1); __PYX_ERR(0, 180, __pyx_L3_error)
9017  }
9018  CYTHON_FALLTHROUGH;
9019  case 2:
9020  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ix)) != 0)) kw_args--;
9021  else {
9022  __Pyx_RaiseArgtupleInvalid("plot", 1, 3, 3, 2); __PYX_ERR(0, 180, __pyx_L3_error)
9023  }
9024  }
9025  if (unlikely(kw_args > 0)) {
9026  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "plot") < 0)) __PYX_ERR(0, 180, __pyx_L3_error)
9027  }
9028  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
9029  goto __pyx_L5_argtuple_error;
9030  } else {
9031  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9032  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9033  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9034  }
9035  __pyx_v_self = values[0];
9036  __pyx_v_iy = values[1];
9037  __pyx_v_ix = values[2];
9038  }
9039  goto __pyx_L4_argument_unpacking_done;
9040  __pyx_L5_argtuple_error:;
9041  __Pyx_RaiseArgtupleInvalid("plot", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 180, __pyx_L3_error)
9042  __pyx_L3_error:;
9043  __Pyx_AddTraceback("dtocean.dtocean.plot", __pyx_clineno, __pyx_lineno, __pyx_filename);
9044  __Pyx_RefNannyFinishContext();
9045  return NULL;
9046  __pyx_L4_argument_unpacking_done:;
9047  __pyx_r = __pyx_pf_7dtocean_7dtocean_8plot(__pyx_self, __pyx_v_self, __pyx_v_iy, __pyx_v_ix);
9048 
9049  /* function exit code */
9050  __Pyx_RefNannyFinishContext();
9051  return __pyx_r;
9052 }
9053 
9054 static PyObject *__pyx_pf_7dtocean_7dtocean_8plot(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_iy, PyObject *__pyx_v_ix) {
9055  PyObject *__pyx_v_tstr = NULL;
9056  PyObject *__pyx_r = NULL;
9057  __Pyx_RefNannyDeclarations
9058  PyObject *__pyx_t_1 = NULL;
9059  PyObject *__pyx_t_2 = NULL;
9060  PyObject *__pyx_t_3 = NULL;
9061  PyObject *__pyx_t_4 = NULL;
9062  PyObject *__pyx_t_5 = NULL;
9063  PyObject *__pyx_t_6 = NULL;
9064  PyObject *__pyx_t_7 = NULL;
9065  PyObject *__pyx_t_8 = NULL;
9066  int __pyx_t_9;
9067  PyObject *__pyx_t_10 = NULL;
9068  int __pyx_lineno = 0;
9069  const char *__pyx_filename = NULL;
9070  int __pyx_clineno = 0;
9071  __Pyx_RefNannySetupContext("plot", 0);
9072 
9073  /* "dtocean.pyx":181
9074  *
9075  * def plot(self, iy, ix):
9076  * plt.clf() # <<<<<<<<<<<<<<
9077  * plt.grid(True)
9078  * plt.plot(self.wl_pts, self.rfl, marker='.', color='b', label='measured')
9079  */
9080  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_plt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error)
9081  __Pyx_GOTREF(__pyx_t_2);
9082  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_clf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error)
9083  __Pyx_GOTREF(__pyx_t_3);
9084  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9085  __pyx_t_2 = NULL;
9086  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
9087  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
9088  if (likely(__pyx_t_2)) {
9089  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
9090  __Pyx_INCREF(__pyx_t_2);
9091  __Pyx_INCREF(function);
9092  __Pyx_DECREF_SET(__pyx_t_3, function);
9093  }
9094  }
9095  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
9096  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
9097  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error)
9098  __Pyx_GOTREF(__pyx_t_1);
9099  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9100  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9101 
9102  /* "dtocean.pyx":182
9103  * def plot(self, iy, ix):
9104  * plt.clf()
9105  * plt.grid(True) # <<<<<<<<<<<<<<
9106  * plt.plot(self.wl_pts, self.rfl, marker='.', color='b', label='measured')
9107  * plt.plot(self.wl_pts, self.mrfl, marker='.', color='g', label='modeled')
9108  */
9109  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_plt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error)
9110  __Pyx_GOTREF(__pyx_t_3);
9111  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_grid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)
9112  __Pyx_GOTREF(__pyx_t_2);
9113  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9114  __pyx_t_3 = NULL;
9115  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
9116  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
9117  if (likely(__pyx_t_3)) {
9118  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
9119  __Pyx_INCREF(__pyx_t_3);
9120  __Pyx_INCREF(function);
9121  __Pyx_DECREF_SET(__pyx_t_2, function);
9122  }
9123  }
9124  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, Py_True) : __Pyx_PyObject_CallOneArg(__pyx_t_2, Py_True);
9125  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
9126  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
9127  __Pyx_GOTREF(__pyx_t_1);
9128  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9129  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9130 
9131  /* "dtocean.pyx":183
9132  * plt.clf()
9133  * plt.grid(True)
9134  * plt.plot(self.wl_pts, self.rfl, marker='.', color='b', label='measured') # <<<<<<<<<<<<<<
9135  * plt.plot(self.wl_pts, self.mrfl, marker='.', color='g', label='modeled')
9136  * plt.plot(self.wl_pts, self.rsd, marker='.', color='r', label='residual')
9137  */
9138  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_plt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error)
9139  __Pyx_GOTREF(__pyx_t_1);
9140  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_plot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)
9141  __Pyx_GOTREF(__pyx_t_2);
9142  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9143  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wl_pts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error)
9144  __Pyx_GOTREF(__pyx_t_1);
9145  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rfl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error)
9146  __Pyx_GOTREF(__pyx_t_3);
9147  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 183, __pyx_L1_error)
9148  __Pyx_GOTREF(__pyx_t_4);
9149  __Pyx_GIVEREF(__pyx_t_1);
9150  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
9151  __Pyx_GIVEREF(__pyx_t_3);
9152  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
9153  __pyx_t_1 = 0;
9154  __pyx_t_3 = 0;
9155  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error)
9156  __Pyx_GOTREF(__pyx_t_3);
9157  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_marker, __pyx_kp_u__8) < 0) __PYX_ERR(0, 183, __pyx_L1_error)
9158  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_color, __pyx_n_u_b) < 0) __PYX_ERR(0, 183, __pyx_L1_error)
9159  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_label, __pyx_n_u_measured) < 0) __PYX_ERR(0, 183, __pyx_L1_error)
9160  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error)
9161  __Pyx_GOTREF(__pyx_t_1);
9162  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9163  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9164  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9165  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9166 
9167  /* "dtocean.pyx":184
9168  * plt.grid(True)
9169  * plt.plot(self.wl_pts, self.rfl, marker='.', color='b', label='measured')
9170  * plt.plot(self.wl_pts, self.mrfl, marker='.', color='g', label='modeled') # <<<<<<<<<<<<<<
9171  * plt.plot(self.wl_pts, self.rsd, marker='.', color='r', label='residual')
9172  * plt.xlabel('wavelength (nm)')
9173  */
9174  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_plt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error)
9175  __Pyx_GOTREF(__pyx_t_1);
9176  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_plot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 184, __pyx_L1_error)
9177  __Pyx_GOTREF(__pyx_t_3);
9178  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9179  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wl_pts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error)
9180  __Pyx_GOTREF(__pyx_t_1);
9181  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mrfl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 184, __pyx_L1_error)
9182  __Pyx_GOTREF(__pyx_t_4);
9183  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error)
9184  __Pyx_GOTREF(__pyx_t_2);
9185  __Pyx_GIVEREF(__pyx_t_1);
9186  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
9187  __Pyx_GIVEREF(__pyx_t_4);
9188  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
9189  __pyx_t_1 = 0;
9190  __pyx_t_4 = 0;
9191  __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 184, __pyx_L1_error)
9192  __Pyx_GOTREF(__pyx_t_4);
9193  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_marker, __pyx_kp_u__8) < 0) __PYX_ERR(0, 184, __pyx_L1_error)
9194  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_color, __pyx_n_u_g) < 0) __PYX_ERR(0, 184, __pyx_L1_error)
9195  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_label, __pyx_n_u_modeled) < 0) __PYX_ERR(0, 184, __pyx_L1_error)
9196  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error)
9197  __Pyx_GOTREF(__pyx_t_1);
9198  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9199  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9200  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9201  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9202 
9203  /* "dtocean.pyx":185
9204  * plt.plot(self.wl_pts, self.rfl, marker='.', color='b', label='measured')
9205  * plt.plot(self.wl_pts, self.mrfl, marker='.', color='g', label='modeled')
9206  * plt.plot(self.wl_pts, self.rsd, marker='.', color='r', label='residual') # <<<<<<<<<<<<<<
9207  * plt.xlabel('wavelength (nm)')
9208  * plt.ylabel('reflectance')
9209  */
9210  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_plt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error)
9211  __Pyx_GOTREF(__pyx_t_1);
9212  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_plot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 185, __pyx_L1_error)
9213  __Pyx_GOTREF(__pyx_t_4);
9214  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9215  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wl_pts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error)
9216  __Pyx_GOTREF(__pyx_t_1);
9217  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rsd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error)
9218  __Pyx_GOTREF(__pyx_t_2);
9219  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error)
9220  __Pyx_GOTREF(__pyx_t_3);
9221  __Pyx_GIVEREF(__pyx_t_1);
9222  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
9223  __Pyx_GIVEREF(__pyx_t_2);
9224  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
9225  __pyx_t_1 = 0;
9226  __pyx_t_2 = 0;
9227  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error)
9228  __Pyx_GOTREF(__pyx_t_2);
9229  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_marker, __pyx_kp_u__8) < 0) __PYX_ERR(0, 185, __pyx_L1_error)
9230  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_color, __pyx_n_u_r) < 0) __PYX_ERR(0, 185, __pyx_L1_error)
9231  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_label, __pyx_n_u_residual) < 0) __PYX_ERR(0, 185, __pyx_L1_error)
9232  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error)
9233  __Pyx_GOTREF(__pyx_t_1);
9234  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9235  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9236  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9237  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9238 
9239  /* "dtocean.pyx":186
9240  * plt.plot(self.wl_pts, self.mrfl, marker='.', color='g', label='modeled')
9241  * plt.plot(self.wl_pts, self.rsd, marker='.', color='r', label='residual')
9242  * plt.xlabel('wavelength (nm)') # <<<<<<<<<<<<<<
9243  * plt.ylabel('reflectance')
9244  * tstr = "dtocean -- y={3:}, x={4:} aot: {0:.3f} fmf: {1:.3f} sse: {2:.3}"
9245  */
9246  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_plt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 186, __pyx_L1_error)
9247  __Pyx_GOTREF(__pyx_t_2);
9248  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_xlabel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 186, __pyx_L1_error)
9249  __Pyx_GOTREF(__pyx_t_3);
9250  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9251  __pyx_t_2 = NULL;
9252  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
9253  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
9254  if (likely(__pyx_t_2)) {
9255  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
9256  __Pyx_INCREF(__pyx_t_2);
9257  __Pyx_INCREF(function);
9258  __Pyx_DECREF_SET(__pyx_t_3, function);
9259  }
9260  }
9261  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_u_wavelength_nm) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_wavelength_nm);
9262  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
9263  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
9264  __Pyx_GOTREF(__pyx_t_1);
9265  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9266  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9267 
9268  /* "dtocean.pyx":187
9269  * plt.plot(self.wl_pts, self.rsd, marker='.', color='r', label='residual')
9270  * plt.xlabel('wavelength (nm)')
9271  * plt.ylabel('reflectance') # <<<<<<<<<<<<<<
9272  * tstr = "dtocean -- y={3:}, x={4:} aot: {0:.3f} fmf: {1:.3f} sse: {2:.3}"
9273  * plt.title(tstr.format(self.aot, self.fmf, self.sse, iy, ix))
9274  */
9275  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_plt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error)
9276  __Pyx_GOTREF(__pyx_t_3);
9277  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ylabel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error)
9278  __Pyx_GOTREF(__pyx_t_2);
9279  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9280  __pyx_t_3 = NULL;
9281  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
9282  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
9283  if (likely(__pyx_t_3)) {
9284  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
9285  __Pyx_INCREF(__pyx_t_3);
9286  __Pyx_INCREF(function);
9287  __Pyx_DECREF_SET(__pyx_t_2, function);
9288  }
9289  }
9290  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_reflectance) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_reflectance);
9291  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
9292  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error)
9293  __Pyx_GOTREF(__pyx_t_1);
9294  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9295  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9296 
9297  /* "dtocean.pyx":188
9298  * plt.xlabel('wavelength (nm)')
9299  * plt.ylabel('reflectance')
9300  * tstr = "dtocean -- y={3:}, x={4:} aot: {0:.3f} fmf: {1:.3f} sse: {2:.3}" # <<<<<<<<<<<<<<
9301  * plt.title(tstr.format(self.aot, self.fmf, self.sse, iy, ix))
9302  * plt.legend(loc='upper right')
9303  */
9304  __Pyx_INCREF(__pyx_kp_u_dtocean_y_3_x_4_aot_0_3f_fmf_1_3);
9305  __pyx_v_tstr = __pyx_kp_u_dtocean_y_3_x_4_aot_0_3f_fmf_1_3;
9306 
9307  /* "dtocean.pyx":189
9308  * plt.ylabel('reflectance')
9309  * tstr = "dtocean -- y={3:}, x={4:} aot: {0:.3f} fmf: {1:.3f} sse: {2:.3}"
9310  * plt.title(tstr.format(self.aot, self.fmf, self.sse, iy, ix)) # <<<<<<<<<<<<<<
9311  * plt.legend(loc='upper right')
9312  * plt.show()
9313  */
9314  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_plt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error)
9315  __Pyx_GOTREF(__pyx_t_2);
9316  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_title); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error)
9317  __Pyx_GOTREF(__pyx_t_3);
9318  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9319  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_tstr, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error)
9320  __Pyx_GOTREF(__pyx_t_4);
9321  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_aot); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 189, __pyx_L1_error)
9322  __Pyx_GOTREF(__pyx_t_5);
9323  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fmf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 189, __pyx_L1_error)
9324  __Pyx_GOTREF(__pyx_t_6);
9325  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_sse); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 189, __pyx_L1_error)
9326  __Pyx_GOTREF(__pyx_t_7);
9327  __pyx_t_8 = NULL;
9328  __pyx_t_9 = 0;
9329  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
9330  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
9331  if (likely(__pyx_t_8)) {
9332  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
9333  __Pyx_INCREF(__pyx_t_8);
9334  __Pyx_INCREF(function);
9335  __Pyx_DECREF_SET(__pyx_t_4, function);
9336  __pyx_t_9 = 1;
9337  }
9338  }
9339  #if CYTHON_FAST_PYCALL
9340  if (PyFunction_Check(__pyx_t_4)) {
9341  PyObject *__pyx_temp[6] = {__pyx_t_8, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_v_iy, __pyx_v_ix};
9342  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 5+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error)
9343  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
9344  __Pyx_GOTREF(__pyx_t_2);
9345  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9346  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9347  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9348  } else
9349  #endif
9350  #if CYTHON_FAST_PYCCALL
9351  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
9352  PyObject *__pyx_temp[6] = {__pyx_t_8, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_v_iy, __pyx_v_ix};
9353  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 5+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error)
9354  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
9355  __Pyx_GOTREF(__pyx_t_2);
9356  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9357  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9358  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9359  } else
9360  #endif
9361  {
9362  __pyx_t_10 = PyTuple_New(5+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 189, __pyx_L1_error)
9363  __Pyx_GOTREF(__pyx_t_10);
9364  if (__pyx_t_8) {
9365  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
9366  }
9367  __Pyx_GIVEREF(__pyx_t_5);
9368  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_5);
9369  __Pyx_GIVEREF(__pyx_t_6);
9370  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_6);
9371  __Pyx_GIVEREF(__pyx_t_7);
9372  PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_7);
9373  __Pyx_INCREF(__pyx_v_iy);
9374  __Pyx_GIVEREF(__pyx_v_iy);
9375  PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_9, __pyx_v_iy);
9376  __Pyx_INCREF(__pyx_v_ix);
9377  __Pyx_GIVEREF(__pyx_v_ix);
9378  PyTuple_SET_ITEM(__pyx_t_10, 4+__pyx_t_9, __pyx_v_ix);
9379  __pyx_t_5 = 0;
9380  __pyx_t_6 = 0;
9381  __pyx_t_7 = 0;
9382  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error)
9383  __Pyx_GOTREF(__pyx_t_2);
9384  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9385  }
9386  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9387  __pyx_t_4 = NULL;
9388  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
9389  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
9390  if (likely(__pyx_t_4)) {
9391  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
9392  __Pyx_INCREF(__pyx_t_4);
9393  __Pyx_INCREF(function);
9394  __Pyx_DECREF_SET(__pyx_t_3, function);
9395  }
9396  }
9397  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
9398  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
9399  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9400  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error)
9401  __Pyx_GOTREF(__pyx_t_1);
9402  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9403  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9404 
9405  /* "dtocean.pyx":190
9406  * tstr = "dtocean -- y={3:}, x={4:} aot: {0:.3f} fmf: {1:.3f} sse: {2:.3}"
9407  * plt.title(tstr.format(self.aot, self.fmf, self.sse, iy, ix))
9408  * plt.legend(loc='upper right') # <<<<<<<<<<<<<<
9409  * plt.show()
9410  *
9411  */
9412  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_plt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)
9413  __Pyx_GOTREF(__pyx_t_1);
9414  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_legend); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error)
9415  __Pyx_GOTREF(__pyx_t_3);
9416  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9417  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)
9418  __Pyx_GOTREF(__pyx_t_1);
9419  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_loc, __pyx_kp_u_upper_right) < 0) __PYX_ERR(0, 190, __pyx_L1_error)
9420  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
9421  __Pyx_GOTREF(__pyx_t_2);
9422  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9423  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9424  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9425 
9426  /* "dtocean.pyx":191
9427  * plt.title(tstr.format(self.aot, self.fmf, self.sse, iy, ix))
9428  * plt.legend(loc='upper right')
9429  * plt.show() # <<<<<<<<<<<<<<
9430  *
9431  * def plot_points(self):
9432  */
9433  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_plt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error)
9434  __Pyx_GOTREF(__pyx_t_1);
9435  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_show); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 191, __pyx_L1_error)
9436  __Pyx_GOTREF(__pyx_t_3);
9437  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9438  __pyx_t_1 = NULL;
9439  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
9440  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
9441  if (likely(__pyx_t_1)) {
9442  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
9443  __Pyx_INCREF(__pyx_t_1);
9444  __Pyx_INCREF(function);
9445  __Pyx_DECREF_SET(__pyx_t_3, function);
9446  }
9447  }
9448  __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
9449  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
9450  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
9451  __Pyx_GOTREF(__pyx_t_2);
9452  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9453  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9454 
9455  /* "dtocean.pyx":180
9456  * return self.fmf, self.aot, self.sse, self.type
9457  *
9458  * def plot(self, iy, ix): # <<<<<<<<<<<<<<
9459  * plt.clf()
9460  * plt.grid(True)
9461  */
9462 
9463  /* function exit code */
9464  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9465  goto __pyx_L0;
9466  __pyx_L1_error:;
9467  __Pyx_XDECREF(__pyx_t_1);
9468  __Pyx_XDECREF(__pyx_t_2);
9469  __Pyx_XDECREF(__pyx_t_3);
9470  __Pyx_XDECREF(__pyx_t_4);
9471  __Pyx_XDECREF(__pyx_t_5);
9472  __Pyx_XDECREF(__pyx_t_6);
9473  __Pyx_XDECREF(__pyx_t_7);
9474  __Pyx_XDECREF(__pyx_t_8);
9475  __Pyx_XDECREF(__pyx_t_10);
9476  __Pyx_AddTraceback("dtocean.dtocean.plot", __pyx_clineno, __pyx_lineno, __pyx_filename);
9477  __pyx_r = NULL;
9478  __pyx_L0:;
9479  __Pyx_XDECREF(__pyx_v_tstr);
9480  __Pyx_XGIVEREF(__pyx_r);
9481  __Pyx_RefNannyFinishContext();
9482  return __pyx_r;
9483 }
9484 
9485 /* "dtocean.pyx":193
9486  * plt.show()
9487  *
9488  * def plot_points(self): # <<<<<<<<<<<<<<
9489  * fig = plt.figure()
9490  * ax = fig.add_subplot(111, projection='3d')
9491  */
9492 
9493 /* Python wrapper */
9494 static PyObject *__pyx_pw_7dtocean_7dtocean_11plot_points(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
9495 static PyMethodDef __pyx_mdef_7dtocean_7dtocean_11plot_points = {"plot_points", (PyCFunction)__pyx_pw_7dtocean_7dtocean_11plot_points, METH_O, 0};
9496 static PyObject *__pyx_pw_7dtocean_7dtocean_11plot_points(PyObject *__pyx_self, PyObject *__pyx_v_self) {
9497  PyObject *__pyx_r = 0;
9498  __Pyx_RefNannyDeclarations
9499  __Pyx_RefNannySetupContext("plot_points (wrapper)", 0);
9500  __pyx_r = __pyx_pf_7dtocean_7dtocean_10plot_points(__pyx_self, ((PyObject *)__pyx_v_self));
9501 
9502  /* function exit code */
9503  __Pyx_RefNannyFinishContext();
9504  return __pyx_r;
9505 }
9506 
9507 static PyObject *__pyx_pf_7dtocean_7dtocean_10plot_points(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
9508  PyObject *__pyx_v_fig = NULL;
9509  PyObject *__pyx_v_ax = NULL;
9510  PyObject *__pyx_v_s = NULL;
9511  PyObject *__pyx_v_xs = NULL;
9512  PyObject *__pyx_v_ys = NULL;
9513  PyObject *__pyx_v_zs = NULL;
9514  PyObject *__pyx_v_b = NULL;
9515  PyObject *__pyx_v_xb = NULL;
9516  PyObject *__pyx_v_yb = NULL;
9517  PyObject *__pyx_v_zb = NULL;
9518  PyObject *__pyx_v_xp = NULL;
9519  PyObject *__pyx_v_yp = NULL;
9520  PyObject *__pyx_v_zp = NULL;
9521  PyObject *__pyx_v_xm = NULL;
9522  PyObject *__pyx_v_ym = NULL;
9523  PyObject *__pyx_v_zm = NULL;
9524  PyObject *__pyx_v_ws = NULL;
9525  PyObject *__pyx_v_ts = NULL;
9526  PyObject *__pyx_v_ls = NULL;
9527  PyObject *__pyx_v_lb = NULL;
9528  PyObject *__pyx_r = NULL;
9529  __Pyx_RefNannyDeclarations
9530  PyObject *__pyx_t_1 = NULL;
9531  PyObject *__pyx_t_2 = NULL;
9532  PyObject *__pyx_t_3 = NULL;
9533  Py_ssize_t __pyx_t_4;
9534  PyObject *(*__pyx_t_5)(PyObject *);
9535  PyObject *__pyx_t_6 = NULL;
9536  PyObject *__pyx_t_7 = NULL;
9537  Py_ssize_t __pyx_t_8;
9538  PyObject *(*__pyx_t_9)(PyObject *);
9539  PyObject *__pyx_t_10 = NULL;
9540  int __pyx_t_11;
9541  PyObject *(*__pyx_t_12)(PyObject *);
9542  int __pyx_lineno = 0;
9543  const char *__pyx_filename = NULL;
9544  int __pyx_clineno = 0;
9545  __Pyx_RefNannySetupContext("plot_points", 0);
9546 
9547  /* "dtocean.pyx":194
9548  *
9549  * def plot_points(self):
9550  * fig = plt.figure() # <<<<<<<<<<<<<<
9551  * ax = fig.add_subplot(111, projection='3d')
9552  * for s in small:
9553  */
9554  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_plt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
9555  __Pyx_GOTREF(__pyx_t_2);
9556  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_figure); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __pyx_L1_error)
9557  __Pyx_GOTREF(__pyx_t_3);
9558  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9559  __pyx_t_2 = NULL;
9560  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
9561  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
9562  if (likely(__pyx_t_2)) {
9563  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
9564  __Pyx_INCREF(__pyx_t_2);
9565  __Pyx_INCREF(function);
9566  __Pyx_DECREF_SET(__pyx_t_3, function);
9567  }
9568  }
9569  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
9570  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
9571  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error)
9572  __Pyx_GOTREF(__pyx_t_1);
9573  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9574  __pyx_v_fig = __pyx_t_1;
9575  __pyx_t_1 = 0;
9576 
9577  /* "dtocean.pyx":195
9578  * def plot_points(self):
9579  * fig = plt.figure()
9580  * ax = fig.add_subplot(111, projection='3d') # <<<<<<<<<<<<<<
9581  * for s in small:
9582  * xs = toast[W550,s,:]
9583  */
9584  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fig, __pyx_n_s_add_subplot); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
9585  __Pyx_GOTREF(__pyx_t_1);
9586  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L1_error)
9587  __Pyx_GOTREF(__pyx_t_3);
9588  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_projection, __pyx_kp_u_3d) < 0) __PYX_ERR(0, 195, __pyx_L1_error)
9589  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__9, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error)
9590  __Pyx_GOTREF(__pyx_t_2);
9591  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9592  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9593  __pyx_v_ax = __pyx_t_2;
9594  __pyx_t_2 = 0;
9595 
9596  /* "dtocean.pyx":196
9597  * fig = plt.figure()
9598  * ax = fig.add_subplot(111, projection='3d')
9599  * for s in small: # <<<<<<<<<<<<<<
9600  * xs = toast[W550,s,:]
9601  * ys = toast[W659,s,:]
9602  */
9603  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_small); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error)
9604  __Pyx_GOTREF(__pyx_t_2);
9605  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
9606  __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
9607  __pyx_t_5 = NULL;
9608  } else {
9609  __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 196, __pyx_L1_error)
9610  __Pyx_GOTREF(__pyx_t_3);
9611  __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error)
9612  }
9613  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9614  for (;;) {
9615  if (likely(!__pyx_t_5)) {
9616  if (likely(PyList_CheckExact(__pyx_t_3))) {
9617  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
9618  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9619  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 196, __pyx_L1_error)
9620  #else
9621  __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error)
9622  __Pyx_GOTREF(__pyx_t_2);
9623  #endif
9624  } else {
9625  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
9626  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9627  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 196, __pyx_L1_error)
9628  #else
9629  __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error)
9630  __Pyx_GOTREF(__pyx_t_2);
9631  #endif
9632  }
9633  } else {
9634  __pyx_t_2 = __pyx_t_5(__pyx_t_3);
9635  if (unlikely(!__pyx_t_2)) {
9636  PyObject* exc_type = PyErr_Occurred();
9637  if (exc_type) {
9638  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
9639  else __PYX_ERR(0, 196, __pyx_L1_error)
9640  }
9641  break;
9642  }
9643  __Pyx_GOTREF(__pyx_t_2);
9644  }
9645  __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_2);
9646  __pyx_t_2 = 0;
9647 
9648  /* "dtocean.pyx":197
9649  * ax = fig.add_subplot(111, projection='3d')
9650  * for s in small:
9651  * xs = toast[W550,s,:] # <<<<<<<<<<<<<<
9652  * ys = toast[W659,s,:]
9653  * zs = toast[W860,s,:]
9654  */
9655  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error)
9656  __Pyx_GOTREF(__pyx_t_2);
9657  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_W550); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error)
9658  __Pyx_GOTREF(__pyx_t_1);
9659  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 197, __pyx_L1_error)
9660  __Pyx_GOTREF(__pyx_t_6);
9661  __Pyx_GIVEREF(__pyx_t_1);
9662  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
9663  __Pyx_INCREF(__pyx_v_s);
9664  __Pyx_GIVEREF(__pyx_v_s);
9665  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_s);
9666  __Pyx_INCREF(__pyx_slice__4);
9667  __Pyx_GIVEREF(__pyx_slice__4);
9668  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_slice__4);
9669  __pyx_t_1 = 0;
9670  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error)
9671  __Pyx_GOTREF(__pyx_t_1);
9672  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9673  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9674  __Pyx_XDECREF_SET(__pyx_v_xs, __pyx_t_1);
9675  __pyx_t_1 = 0;
9676 
9677  /* "dtocean.pyx":198
9678  * for s in small:
9679  * xs = toast[W550,s,:]
9680  * ys = toast[W659,s,:] # <<<<<<<<<<<<<<
9681  * zs = toast[W860,s,:]
9682  * ax.plot(xs, ys, zs, c="b", label="small model")
9683  */
9684  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_toast); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error)
9685  __Pyx_GOTREF(__pyx_t_1);
9686  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_W659); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 198, __pyx_L1_error)
9687  __Pyx_GOTREF(__pyx_t_6);
9688  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error)
9689  __Pyx_GOTREF(__pyx_t_2);
9690  __Pyx_GIVEREF(__pyx_t_6);
9691  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
9692  __Pyx_INCREF(__pyx_v_s);
9693  __Pyx_GIVEREF(__pyx_v_s);
9694  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_s);
9695  __Pyx_INCREF(__pyx_slice__4);
9696  __Pyx_GIVEREF(__pyx_slice__4);
9697  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_slice__4);
9698  __pyx_t_6 = 0;
9699  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 198, __pyx_L1_error)
9700  __Pyx_GOTREF(__pyx_t_6);
9701  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9702  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9703  __Pyx_XDECREF_SET(__pyx_v_ys, __pyx_t_6);
9704  __pyx_t_6 = 0;
9705 
9706  /* "dtocean.pyx":199
9707  * xs = toast[W550,s,:]
9708  * ys = toast[W659,s,:]
9709  * zs = toast[W860,s,:] # <<<<<<<<<<<<<<
9710  * ax.plot(xs, ys, zs, c="b", label="small model")
9711  * ax.scatter(xs, ys, zs, c="b", marker="o")
9712  */
9713  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_toast); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 199, __pyx_L1_error)
9714  __Pyx_GOTREF(__pyx_t_6);
9715  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_W860); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
9716  __Pyx_GOTREF(__pyx_t_2);
9717  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
9718  __Pyx_GOTREF(__pyx_t_1);
9719  __Pyx_GIVEREF(__pyx_t_2);
9720  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
9721  __Pyx_INCREF(__pyx_v_s);
9722  __Pyx_GIVEREF(__pyx_v_s);
9723  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_s);
9724  __Pyx_INCREF(__pyx_slice__4);
9725  __Pyx_GIVEREF(__pyx_slice__4);
9726  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_slice__4);
9727  __pyx_t_2 = 0;
9728  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
9729  __Pyx_GOTREF(__pyx_t_2);
9730  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9731  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9732  __Pyx_XDECREF_SET(__pyx_v_zs, __pyx_t_2);
9733  __pyx_t_2 = 0;
9734 
9735  /* "dtocean.pyx":200
9736  * ys = toast[W659,s,:]
9737  * zs = toast[W860,s,:]
9738  * ax.plot(xs, ys, zs, c="b", label="small model") # <<<<<<<<<<<<<<
9739  * ax.scatter(xs, ys, zs, c="b", marker="o")
9740  * for b in big:
9741  */
9742  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_plot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error)
9743  __Pyx_GOTREF(__pyx_t_2);
9744  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error)
9745  __Pyx_GOTREF(__pyx_t_1);
9746  __Pyx_INCREF(__pyx_v_xs);
9747  __Pyx_GIVEREF(__pyx_v_xs);
9748  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_xs);
9749  __Pyx_INCREF(__pyx_v_ys);
9750  __Pyx_GIVEREF(__pyx_v_ys);
9751  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ys);
9752  __Pyx_INCREF(__pyx_v_zs);
9753  __Pyx_GIVEREF(__pyx_v_zs);
9754  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_zs);
9755  __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 200, __pyx_L1_error)
9756  __Pyx_GOTREF(__pyx_t_6);
9757  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_c, __pyx_n_u_b) < 0) __PYX_ERR(0, 200, __pyx_L1_error)
9758  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_label, __pyx_kp_u_small_model) < 0) __PYX_ERR(0, 200, __pyx_L1_error)
9759  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 200, __pyx_L1_error)
9760  __Pyx_GOTREF(__pyx_t_7);
9761  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9762  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9763  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9764  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9765 
9766  /* "dtocean.pyx":201
9767  * zs = toast[W860,s,:]
9768  * ax.plot(xs, ys, zs, c="b", label="small model")
9769  * ax.scatter(xs, ys, zs, c="b", marker="o") # <<<<<<<<<<<<<<
9770  * for b in big:
9771  * xb = toabt[W550,b,:]
9772  */
9773  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_scatter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 201, __pyx_L1_error)
9774  __Pyx_GOTREF(__pyx_t_7);
9775  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 201, __pyx_L1_error)
9776  __Pyx_GOTREF(__pyx_t_6);
9777  __Pyx_INCREF(__pyx_v_xs);
9778  __Pyx_GIVEREF(__pyx_v_xs);
9779  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_xs);
9780  __Pyx_INCREF(__pyx_v_ys);
9781  __Pyx_GIVEREF(__pyx_v_ys);
9782  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ys);
9783  __Pyx_INCREF(__pyx_v_zs);
9784  __Pyx_GIVEREF(__pyx_v_zs);
9785  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_zs);
9786  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error)
9787  __Pyx_GOTREF(__pyx_t_1);
9788  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_c, __pyx_n_u_b) < 0) __PYX_ERR(0, 201, __pyx_L1_error)
9789  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_marker, __pyx_n_u_o) < 0) __PYX_ERR(0, 201, __pyx_L1_error)
9790  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
9791  __Pyx_GOTREF(__pyx_t_2);
9792  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9793  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9794  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9795  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9796 
9797  /* "dtocean.pyx":196
9798  * fig = plt.figure()
9799  * ax = fig.add_subplot(111, projection='3d')
9800  * for s in small: # <<<<<<<<<<<<<<
9801  * xs = toast[W550,s,:]
9802  * ys = toast[W659,s,:]
9803  */
9804  }
9805  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9806 
9807  /* "dtocean.pyx":202
9808  * ax.plot(xs, ys, zs, c="b", label="small model")
9809  * ax.scatter(xs, ys, zs, c="b", marker="o")
9810  * for b in big: # <<<<<<<<<<<<<<
9811  * xb = toabt[W550,b,:]
9812  * yb = toabt[W659,b,:]
9813  */
9814  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_big); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 202, __pyx_L1_error)
9815  __Pyx_GOTREF(__pyx_t_3);
9816  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
9817  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
9818  __pyx_t_5 = NULL;
9819  } else {
9820  __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 202, __pyx_L1_error)
9821  __Pyx_GOTREF(__pyx_t_2);
9822  __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 202, __pyx_L1_error)
9823  }
9824  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9825  for (;;) {
9826  if (likely(!__pyx_t_5)) {
9827  if (likely(PyList_CheckExact(__pyx_t_2))) {
9828  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
9829  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9830  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 202, __pyx_L1_error)
9831  #else
9832  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 202, __pyx_L1_error)
9833  __Pyx_GOTREF(__pyx_t_3);
9834  #endif
9835  } else {
9836  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
9837  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9838  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 202, __pyx_L1_error)
9839  #else
9840  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 202, __pyx_L1_error)
9841  __Pyx_GOTREF(__pyx_t_3);
9842  #endif
9843  }
9844  } else {
9845  __pyx_t_3 = __pyx_t_5(__pyx_t_2);
9846  if (unlikely(!__pyx_t_3)) {
9847  PyObject* exc_type = PyErr_Occurred();
9848  if (exc_type) {
9849  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
9850  else __PYX_ERR(0, 202, __pyx_L1_error)
9851  }
9852  break;
9853  }
9854  __Pyx_GOTREF(__pyx_t_3);
9855  }
9856  __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_3);
9857  __pyx_t_3 = 0;
9858 
9859  /* "dtocean.pyx":203
9860  * ax.scatter(xs, ys, zs, c="b", marker="o")
9861  * for b in big:
9862  * xb = toabt[W550,b,:] # <<<<<<<<<<<<<<
9863  * yb = toabt[W659,b,:]
9864  * zb = toabt[W860,b,:]
9865  */
9866  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_toabt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 203, __pyx_L1_error)
9867  __Pyx_GOTREF(__pyx_t_3);
9868  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_W550); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error)
9869  __Pyx_GOTREF(__pyx_t_1);
9870  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 203, __pyx_L1_error)
9871  __Pyx_GOTREF(__pyx_t_6);
9872  __Pyx_GIVEREF(__pyx_t_1);
9873  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
9874  __Pyx_INCREF(__pyx_v_b);
9875  __Pyx_GIVEREF(__pyx_v_b);
9876  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_b);
9877  __Pyx_INCREF(__pyx_slice__4);
9878  __Pyx_GIVEREF(__pyx_slice__4);
9879  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_slice__4);
9880  __pyx_t_1 = 0;
9881  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error)
9882  __Pyx_GOTREF(__pyx_t_1);
9883  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9884  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9885  __Pyx_XDECREF_SET(__pyx_v_xb, __pyx_t_1);
9886  __pyx_t_1 = 0;
9887 
9888  /* "dtocean.pyx":204
9889  * for b in big:
9890  * xb = toabt[W550,b,:]
9891  * yb = toabt[W659,b,:] # <<<<<<<<<<<<<<
9892  * zb = toabt[W860,b,:]
9893  * ax.plot(xb, yb, zb, c="r", label="big model")
9894  */
9895  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_toabt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error)
9896  __Pyx_GOTREF(__pyx_t_1);
9897  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_W659); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 204, __pyx_L1_error)
9898  __Pyx_GOTREF(__pyx_t_6);
9899  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 204, __pyx_L1_error)
9900  __Pyx_GOTREF(__pyx_t_3);
9901  __Pyx_GIVEREF(__pyx_t_6);
9902  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
9903  __Pyx_INCREF(__pyx_v_b);
9904  __Pyx_GIVEREF(__pyx_v_b);
9905  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_b);
9906  __Pyx_INCREF(__pyx_slice__4);
9907  __Pyx_GIVEREF(__pyx_slice__4);
9908  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_slice__4);
9909  __pyx_t_6 = 0;
9910  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 204, __pyx_L1_error)
9911  __Pyx_GOTREF(__pyx_t_6);
9912  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9913  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9914  __Pyx_XDECREF_SET(__pyx_v_yb, __pyx_t_6);
9915  __pyx_t_6 = 0;
9916 
9917  /* "dtocean.pyx":205
9918  * xb = toabt[W550,b,:]
9919  * yb = toabt[W659,b,:]
9920  * zb = toabt[W860,b,:] # <<<<<<<<<<<<<<
9921  * ax.plot(xb, yb, zb, c="r", label="big model")
9922  * ax.scatter(xb, yb, zb, c="r", marker="o")
9923  */
9924  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_toabt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 205, __pyx_L1_error)
9925  __Pyx_GOTREF(__pyx_t_6);
9926  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_W860); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 205, __pyx_L1_error)
9927  __Pyx_GOTREF(__pyx_t_3);
9928  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error)
9929  __Pyx_GOTREF(__pyx_t_1);
9930  __Pyx_GIVEREF(__pyx_t_3);
9931  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
9932  __Pyx_INCREF(__pyx_v_b);
9933  __Pyx_GIVEREF(__pyx_v_b);
9934  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_b);
9935  __Pyx_INCREF(__pyx_slice__4);
9936  __Pyx_GIVEREF(__pyx_slice__4);
9937  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_slice__4);
9938  __pyx_t_3 = 0;
9939  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 205, __pyx_L1_error)
9940  __Pyx_GOTREF(__pyx_t_3);
9941  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9942  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9943  __Pyx_XDECREF_SET(__pyx_v_zb, __pyx_t_3);
9944  __pyx_t_3 = 0;
9945 
9946  /* "dtocean.pyx":206
9947  * yb = toabt[W659,b,:]
9948  * zb = toabt[W860,b,:]
9949  * ax.plot(xb, yb, zb, c="r", label="big model") # <<<<<<<<<<<<<<
9950  * ax.scatter(xb, yb, zb, c="r", marker="o")
9951  * for s in small:
9952  */
9953  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_plot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 206, __pyx_L1_error)
9954  __Pyx_GOTREF(__pyx_t_3);
9955  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error)
9956  __Pyx_GOTREF(__pyx_t_1);
9957  __Pyx_INCREF(__pyx_v_xb);
9958  __Pyx_GIVEREF(__pyx_v_xb);
9959  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_xb);
9960  __Pyx_INCREF(__pyx_v_yb);
9961  __Pyx_GIVEREF(__pyx_v_yb);
9962  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_yb);
9963  __Pyx_INCREF(__pyx_v_zb);
9964  __Pyx_GIVEREF(__pyx_v_zb);
9965  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_zb);
9966  __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 206, __pyx_L1_error)
9967  __Pyx_GOTREF(__pyx_t_6);
9968  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_c, __pyx_n_u_r) < 0) __PYX_ERR(0, 206, __pyx_L1_error)
9969  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_label, __pyx_kp_u_big_model) < 0) __PYX_ERR(0, 206, __pyx_L1_error)
9970  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 206, __pyx_L1_error)
9971  __Pyx_GOTREF(__pyx_t_7);
9972  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9973  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9974  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9975  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9976 
9977  /* "dtocean.pyx":207
9978  * zb = toabt[W860,b,:]
9979  * ax.plot(xb, yb, zb, c="r", label="big model")
9980  * ax.scatter(xb, yb, zb, c="r", marker="o") # <<<<<<<<<<<<<<
9981  * for s in small:
9982  * for b in big:
9983  */
9984  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_scatter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 207, __pyx_L1_error)
9985  __Pyx_GOTREF(__pyx_t_7);
9986  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 207, __pyx_L1_error)
9987  __Pyx_GOTREF(__pyx_t_6);
9988  __Pyx_INCREF(__pyx_v_xb);
9989  __Pyx_GIVEREF(__pyx_v_xb);
9990  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_xb);
9991  __Pyx_INCREF(__pyx_v_yb);
9992  __Pyx_GIVEREF(__pyx_v_yb);
9993  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_yb);
9994  __Pyx_INCREF(__pyx_v_zb);
9995  __Pyx_GIVEREF(__pyx_v_zb);
9996  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_zb);
9997  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
9998  __Pyx_GOTREF(__pyx_t_1);
9999  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_c, __pyx_n_u_r) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
10000  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_marker, __pyx_n_u_o) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
10001  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error)
10002  __Pyx_GOTREF(__pyx_t_3);
10003  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10004  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10005  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10006  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10007 
10008  /* "dtocean.pyx":202
10009  * ax.plot(xs, ys, zs, c="b", label="small model")
10010  * ax.scatter(xs, ys, zs, c="b", marker="o")
10011  * for b in big: # <<<<<<<<<<<<<<
10012  * xb = toabt[W550,b,:]
10013  * yb = toabt[W659,b,:]
10014  */
10015  }
10016  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10017 
10018  /* "dtocean.pyx":208
10019  * ax.plot(xb, yb, zb, c="r", label="big model")
10020  * ax.scatter(xb, yb, zb, c="r", marker="o")
10021  * for s in small: # <<<<<<<<<<<<<<
10022  * for b in big:
10023  * xp = bspair[:,W550,s,b]
10024  */
10025  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_small); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
10026  __Pyx_GOTREF(__pyx_t_2);
10027  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
10028  __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
10029  __pyx_t_5 = NULL;
10030  } else {
10031  __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 208, __pyx_L1_error)
10032  __Pyx_GOTREF(__pyx_t_3);
10033  __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 208, __pyx_L1_error)
10034  }
10035  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10036  for (;;) {
10037  if (likely(!__pyx_t_5)) {
10038  if (likely(PyList_CheckExact(__pyx_t_3))) {
10039  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
10040  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
10041  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 208, __pyx_L1_error)
10042  #else
10043  __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
10044  __Pyx_GOTREF(__pyx_t_2);
10045  #endif
10046  } else {
10047  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
10048  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
10049  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 208, __pyx_L1_error)
10050  #else
10051  __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
10052  __Pyx_GOTREF(__pyx_t_2);
10053  #endif
10054  }
10055  } else {
10056  __pyx_t_2 = __pyx_t_5(__pyx_t_3);
10057  if (unlikely(!__pyx_t_2)) {
10058  PyObject* exc_type = PyErr_Occurred();
10059  if (exc_type) {
10060  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
10061  else __PYX_ERR(0, 208, __pyx_L1_error)
10062  }
10063  break;
10064  }
10065  __Pyx_GOTREF(__pyx_t_2);
10066  }
10067  __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_2);
10068  __pyx_t_2 = 0;
10069 
10070  /* "dtocean.pyx":209
10071  * ax.scatter(xb, yb, zb, c="r", marker="o")
10072  * for s in small:
10073  * for b in big: # <<<<<<<<<<<<<<
10074  * xp = bspair[:,W550,s,b]
10075  * yp = bspair[:,W659,s,b]
10076  */
10077  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_big); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L1_error)
10078  __Pyx_GOTREF(__pyx_t_2);
10079  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
10080  __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
10081  __pyx_t_9 = NULL;
10082  } else {
10083  __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
10084  __Pyx_GOTREF(__pyx_t_1);
10085  __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 209, __pyx_L1_error)
10086  }
10087  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10088  for (;;) {
10089  if (likely(!__pyx_t_9)) {
10090  if (likely(PyList_CheckExact(__pyx_t_1))) {
10091  if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break;
10092  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
10093  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 209, __pyx_L1_error)
10094  #else
10095  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L1_error)
10096  __Pyx_GOTREF(__pyx_t_2);
10097  #endif
10098  } else {
10099  if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
10100  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
10101  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 209, __pyx_L1_error)
10102  #else
10103  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L1_error)
10104  __Pyx_GOTREF(__pyx_t_2);
10105  #endif
10106  }
10107  } else {
10108  __pyx_t_2 = __pyx_t_9(__pyx_t_1);
10109  if (unlikely(!__pyx_t_2)) {
10110  PyObject* exc_type = PyErr_Occurred();
10111  if (exc_type) {
10112  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
10113  else __PYX_ERR(0, 209, __pyx_L1_error)
10114  }
10115  break;
10116  }
10117  __Pyx_GOTREF(__pyx_t_2);
10118  }
10119  __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_2);
10120  __pyx_t_2 = 0;
10121 
10122  /* "dtocean.pyx":210
10123  * for s in small:
10124  * for b in big:
10125  * xp = bspair[:,W550,s,b] # <<<<<<<<<<<<<<
10126  * yp = bspair[:,W659,s,b]
10127  * zp = bspair[:,W860,s,b]
10128  */
10129  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_bspair); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 210, __pyx_L1_error)
10130  __Pyx_GOTREF(__pyx_t_2);
10131  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_W550); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 210, __pyx_L1_error)
10132  __Pyx_GOTREF(__pyx_t_6);
10133  __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 210, __pyx_L1_error)
10134  __Pyx_GOTREF(__pyx_t_7);
10135  __Pyx_INCREF(__pyx_slice__4);
10136  __Pyx_GIVEREF(__pyx_slice__4);
10137  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_slice__4);
10138  __Pyx_GIVEREF(__pyx_t_6);
10139  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
10140  __Pyx_INCREF(__pyx_v_s);
10141  __Pyx_GIVEREF(__pyx_v_s);
10142  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_s);
10143  __Pyx_INCREF(__pyx_v_b);
10144  __Pyx_GIVEREF(__pyx_v_b);
10145  PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_v_b);
10146  __pyx_t_6 = 0;
10147  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 210, __pyx_L1_error)
10148  __Pyx_GOTREF(__pyx_t_6);
10149  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10150  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10151  __Pyx_XDECREF_SET(__pyx_v_xp, __pyx_t_6);
10152  __pyx_t_6 = 0;
10153 
10154  /* "dtocean.pyx":211
10155  * for b in big:
10156  * xp = bspair[:,W550,s,b]
10157  * yp = bspair[:,W659,s,b] # <<<<<<<<<<<<<<
10158  * zp = bspair[:,W860,s,b]
10159  * ax.plot(xp, yp, zp, c="g", label="big/small continuum")
10160  */
10161  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_bspair); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 211, __pyx_L1_error)
10162  __Pyx_GOTREF(__pyx_t_6);
10163  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_W659); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 211, __pyx_L1_error)
10164  __Pyx_GOTREF(__pyx_t_7);
10165  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error)
10166  __Pyx_GOTREF(__pyx_t_2);
10167  __Pyx_INCREF(__pyx_slice__4);
10168  __Pyx_GIVEREF(__pyx_slice__4);
10169  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_slice__4);
10170  __Pyx_GIVEREF(__pyx_t_7);
10171  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7);
10172  __Pyx_INCREF(__pyx_v_s);
10173  __Pyx_GIVEREF(__pyx_v_s);
10174  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_s);
10175  __Pyx_INCREF(__pyx_v_b);
10176  __Pyx_GIVEREF(__pyx_v_b);
10177  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_b);
10178  __pyx_t_7 = 0;
10179  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 211, __pyx_L1_error)
10180  __Pyx_GOTREF(__pyx_t_7);
10181  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10182  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10183  __Pyx_XDECREF_SET(__pyx_v_yp, __pyx_t_7);
10184  __pyx_t_7 = 0;
10185 
10186  /* "dtocean.pyx":212
10187  * xp = bspair[:,W550,s,b]
10188  * yp = bspair[:,W659,s,b]
10189  * zp = bspair[:,W860,s,b] # <<<<<<<<<<<<<<
10190  * ax.plot(xp, yp, zp, c="g", label="big/small continuum")
10191  *
10192  */
10193  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_bspair); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 212, __pyx_L1_error)
10194  __Pyx_GOTREF(__pyx_t_7);
10195  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_W860); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L1_error)
10196  __Pyx_GOTREF(__pyx_t_2);
10197  __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 212, __pyx_L1_error)
10198  __Pyx_GOTREF(__pyx_t_6);
10199  __Pyx_INCREF(__pyx_slice__4);
10200  __Pyx_GIVEREF(__pyx_slice__4);
10201  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_slice__4);
10202  __Pyx_GIVEREF(__pyx_t_2);
10203  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
10204  __Pyx_INCREF(__pyx_v_s);
10205  __Pyx_GIVEREF(__pyx_v_s);
10206  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_s);
10207  __Pyx_INCREF(__pyx_v_b);
10208  __Pyx_GIVEREF(__pyx_v_b);
10209  PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_b);
10210  __pyx_t_2 = 0;
10211  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L1_error)
10212  __Pyx_GOTREF(__pyx_t_2);
10213  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10214  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10215  __Pyx_XDECREF_SET(__pyx_v_zp, __pyx_t_2);
10216  __pyx_t_2 = 0;
10217 
10218  /* "dtocean.pyx":213
10219  * yp = bspair[:,W659,s,b]
10220  * zp = bspair[:,W860,s,b]
10221  * ax.plot(xp, yp, zp, c="g", label="big/small continuum") # <<<<<<<<<<<<<<
10222  *
10223  * xs = trfls[W550,:]
10224  */
10225  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_plot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error)
10226  __Pyx_GOTREF(__pyx_t_2);
10227  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 213, __pyx_L1_error)
10228  __Pyx_GOTREF(__pyx_t_6);
10229  __Pyx_INCREF(__pyx_v_xp);
10230  __Pyx_GIVEREF(__pyx_v_xp);
10231  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_xp);
10232  __Pyx_INCREF(__pyx_v_yp);
10233  __Pyx_GIVEREF(__pyx_v_yp);
10234  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_yp);
10235  __Pyx_INCREF(__pyx_v_zp);
10236  __Pyx_GIVEREF(__pyx_v_zp);
10237  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_zp);
10238  __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 213, __pyx_L1_error)
10239  __Pyx_GOTREF(__pyx_t_7);
10240  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_c, __pyx_n_u_g) < 0) __PYX_ERR(0, 213, __pyx_L1_error)
10241  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_label, __pyx_kp_u_big_small_continuum) < 0) __PYX_ERR(0, 213, __pyx_L1_error)
10242  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 213, __pyx_L1_error)
10243  __Pyx_GOTREF(__pyx_t_10);
10244  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10245  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10246  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10247  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10248 
10249  /* "dtocean.pyx":209
10250  * ax.scatter(xb, yb, zb, c="r", marker="o")
10251  * for s in small:
10252  * for b in big: # <<<<<<<<<<<<<<
10253  * xp = bspair[:,W550,s,b]
10254  * yp = bspair[:,W659,s,b]
10255  */
10256  }
10257  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10258 
10259  /* "dtocean.pyx":208
10260  * ax.plot(xb, yb, zb, c="r", label="big model")
10261  * ax.scatter(xb, yb, zb, c="r", marker="o")
10262  * for s in small: # <<<<<<<<<<<<<<
10263  * for b in big:
10264  * xp = bspair[:,W550,s,b]
10265  */
10266  }
10267  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10268 
10269  /* "dtocean.pyx":215
10270  * ax.plot(xp, yp, zp, c="g", label="big/small continuum")
10271  *
10272  * xs = trfls[W550,:] # <<<<<<<<<<<<<<
10273  * ys = trfls[W659,:]
10274  * zs = trfls[W860,:]
10275  */
10276  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_trfls); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 215, __pyx_L1_error)
10277  __Pyx_GOTREF(__pyx_t_3);
10278  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_W550); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error)
10279  __Pyx_GOTREF(__pyx_t_1);
10280  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 215, __pyx_L1_error)
10281  __Pyx_GOTREF(__pyx_t_10);
10282  __Pyx_GIVEREF(__pyx_t_1);
10283  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
10284  __Pyx_INCREF(__pyx_slice__4);
10285  __Pyx_GIVEREF(__pyx_slice__4);
10286  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_slice__4);
10287  __pyx_t_1 = 0;
10288  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error)
10289  __Pyx_GOTREF(__pyx_t_1);
10290  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10291  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10292  __Pyx_XDECREF_SET(__pyx_v_xs, __pyx_t_1);
10293  __pyx_t_1 = 0;
10294 
10295  /* "dtocean.pyx":216
10296  *
10297  * xs = trfls[W550,:]
10298  * ys = trfls[W659,:] # <<<<<<<<<<<<<<
10299  * zs = trfls[W860,:]
10300  * ax.scatter(xs, ys, zs, c="b", marker="o", s=50)
10301  */
10302  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_trfls); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error)
10303  __Pyx_GOTREF(__pyx_t_1);
10304  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_W659); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 216, __pyx_L1_error)
10305  __Pyx_GOTREF(__pyx_t_10);
10306  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 216, __pyx_L1_error)
10307  __Pyx_GOTREF(__pyx_t_3);
10308  __Pyx_GIVEREF(__pyx_t_10);
10309  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10);
10310  __Pyx_INCREF(__pyx_slice__4);
10311  __Pyx_GIVEREF(__pyx_slice__4);
10312  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_slice__4);
10313  __pyx_t_10 = 0;
10314  __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 216, __pyx_L1_error)
10315  __Pyx_GOTREF(__pyx_t_10);
10316  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10317  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10318  __Pyx_XDECREF_SET(__pyx_v_ys, __pyx_t_10);
10319  __pyx_t_10 = 0;
10320 
10321  /* "dtocean.pyx":217
10322  * xs = trfls[W550,:]
10323  * ys = trfls[W659,:]
10324  * zs = trfls[W860,:] # <<<<<<<<<<<<<<
10325  * ax.scatter(xs, ys, zs, c="b", marker="o", s=50)
10326  * xb = trflb[W550,:]
10327  */
10328  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_trfls); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 217, __pyx_L1_error)
10329  __Pyx_GOTREF(__pyx_t_10);
10330  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_W860); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 217, __pyx_L1_error)
10331  __Pyx_GOTREF(__pyx_t_3);
10332  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error)
10333  __Pyx_GOTREF(__pyx_t_1);
10334  __Pyx_GIVEREF(__pyx_t_3);
10335  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
10336  __Pyx_INCREF(__pyx_slice__4);
10337  __Pyx_GIVEREF(__pyx_slice__4);
10338  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_slice__4);
10339  __pyx_t_3 = 0;
10340  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 217, __pyx_L1_error)
10341  __Pyx_GOTREF(__pyx_t_3);
10342  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10343  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10344  __Pyx_XDECREF_SET(__pyx_v_zs, __pyx_t_3);
10345  __pyx_t_3 = 0;
10346 
10347  /* "dtocean.pyx":218
10348  * ys = trfls[W659,:]
10349  * zs = trfls[W860,:]
10350  * ax.scatter(xs, ys, zs, c="b", marker="o", s=50) # <<<<<<<<<<<<<<
10351  * xb = trflb[W550,:]
10352  * yb = trflb[W659,:]
10353  */
10354  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_scatter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 218, __pyx_L1_error)
10355  __Pyx_GOTREF(__pyx_t_3);
10356  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
10357  __Pyx_GOTREF(__pyx_t_1);
10358  __Pyx_INCREF(__pyx_v_xs);
10359  __Pyx_GIVEREF(__pyx_v_xs);
10360  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_xs);
10361  __Pyx_INCREF(__pyx_v_ys);
10362  __Pyx_GIVEREF(__pyx_v_ys);
10363  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ys);
10364  __Pyx_INCREF(__pyx_v_zs);
10365  __Pyx_GIVEREF(__pyx_v_zs);
10366  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_zs);
10367  __pyx_t_10 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 218, __pyx_L1_error)
10368  __Pyx_GOTREF(__pyx_t_10);
10369  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_c, __pyx_n_u_b) < 0) __PYX_ERR(0, 218, __pyx_L1_error)
10370  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_marker, __pyx_n_u_o) < 0) __PYX_ERR(0, 218, __pyx_L1_error)
10371  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_s, __pyx_int_50) < 0) __PYX_ERR(0, 218, __pyx_L1_error)
10372  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 218, __pyx_L1_error)
10373  __Pyx_GOTREF(__pyx_t_7);
10374  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10375  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10376  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10377  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10378 
10379  /* "dtocean.pyx":219
10380  * zs = trfls[W860,:]
10381  * ax.scatter(xs, ys, zs, c="b", marker="o", s=50)
10382  * xb = trflb[W550,:] # <<<<<<<<<<<<<<
10383  * yb = trflb[W659,:]
10384  * zb = trflb[W860,:]
10385  */
10386  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_trflb); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 219, __pyx_L1_error)
10387  __Pyx_GOTREF(__pyx_t_7);
10388  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_W550); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 219, __pyx_L1_error)
10389  __Pyx_GOTREF(__pyx_t_10);
10390  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error)
10391  __Pyx_GOTREF(__pyx_t_1);
10392  __Pyx_GIVEREF(__pyx_t_10);
10393  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10);
10394  __Pyx_INCREF(__pyx_slice__4);
10395  __Pyx_GIVEREF(__pyx_slice__4);
10396  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_slice__4);
10397  __pyx_t_10 = 0;
10398  __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 219, __pyx_L1_error)
10399  __Pyx_GOTREF(__pyx_t_10);
10400  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10401  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10402  __Pyx_XDECREF_SET(__pyx_v_xb, __pyx_t_10);
10403  __pyx_t_10 = 0;
10404 
10405  /* "dtocean.pyx":220
10406  * ax.scatter(xs, ys, zs, c="b", marker="o", s=50)
10407  * xb = trflb[W550,:]
10408  * yb = trflb[W659,:] # <<<<<<<<<<<<<<
10409  * zb = trflb[W860,:]
10410  * ax.scatter(xb, yb, zb, c="r", marker="o", s=50)
10411  */
10412  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_trflb); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 220, __pyx_L1_error)
10413  __Pyx_GOTREF(__pyx_t_10);
10414  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_W659); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error)
10415  __Pyx_GOTREF(__pyx_t_1);
10416  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 220, __pyx_L1_error)
10417  __Pyx_GOTREF(__pyx_t_7);
10418  __Pyx_GIVEREF(__pyx_t_1);
10419  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
10420  __Pyx_INCREF(__pyx_slice__4);
10421  __Pyx_GIVEREF(__pyx_slice__4);
10422  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_slice__4);
10423  __pyx_t_1 = 0;
10424  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error)
10425  __Pyx_GOTREF(__pyx_t_1);
10426  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10427  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10428  __Pyx_XDECREF_SET(__pyx_v_yb, __pyx_t_1);
10429  __pyx_t_1 = 0;
10430 
10431  /* "dtocean.pyx":221
10432  * xb = trflb[W550,:]
10433  * yb = trflb[W659,:]
10434  * zb = trflb[W860,:] # <<<<<<<<<<<<<<
10435  * ax.scatter(xb, yb, zb, c="r", marker="o", s=50)
10436  * xm = rfl[W550,row,col]
10437  */
10438  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_trflb); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error)
10439  __Pyx_GOTREF(__pyx_t_1);
10440  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_W860); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 221, __pyx_L1_error)
10441  __Pyx_GOTREF(__pyx_t_7);
10442  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 221, __pyx_L1_error)
10443  __Pyx_GOTREF(__pyx_t_10);
10444  __Pyx_GIVEREF(__pyx_t_7);
10445  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7);
10446  __Pyx_INCREF(__pyx_slice__4);
10447  __Pyx_GIVEREF(__pyx_slice__4);
10448  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_slice__4);
10449  __pyx_t_7 = 0;
10450  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 221, __pyx_L1_error)
10451  __Pyx_GOTREF(__pyx_t_7);
10452  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10453  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10454  __Pyx_XDECREF_SET(__pyx_v_zb, __pyx_t_7);
10455  __pyx_t_7 = 0;
10456 
10457  /* "dtocean.pyx":222
10458  * yb = trflb[W659,:]
10459  * zb = trflb[W860,:]
10460  * ax.scatter(xb, yb, zb, c="r", marker="o", s=50) # <<<<<<<<<<<<<<
10461  * xm = rfl[W550,row,col]
10462  * ym = rfl[W659,row,col]
10463  */
10464  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_scatter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 222, __pyx_L1_error)
10465  __Pyx_GOTREF(__pyx_t_7);
10466  __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 222, __pyx_L1_error)
10467  __Pyx_GOTREF(__pyx_t_10);
10468  __Pyx_INCREF(__pyx_v_xb);
10469  __Pyx_GIVEREF(__pyx_v_xb);
10470  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_xb);
10471  __Pyx_INCREF(__pyx_v_yb);
10472  __Pyx_GIVEREF(__pyx_v_yb);
10473  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_yb);
10474  __Pyx_INCREF(__pyx_v_zb);
10475  __Pyx_GIVEREF(__pyx_v_zb);
10476  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_zb);
10477  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error)
10478  __Pyx_GOTREF(__pyx_t_1);
10479  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_c, __pyx_n_u_r) < 0) __PYX_ERR(0, 222, __pyx_L1_error)
10480  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_marker, __pyx_n_u_o) < 0) __PYX_ERR(0, 222, __pyx_L1_error)
10481  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_s, __pyx_int_50) < 0) __PYX_ERR(0, 222, __pyx_L1_error)
10482  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 222, __pyx_L1_error)
10483  __Pyx_GOTREF(__pyx_t_3);
10484  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10485  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10486  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10487  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10488 
10489  /* "dtocean.pyx":223
10490  * zb = trflb[W860,:]
10491  * ax.scatter(xb, yb, zb, c="r", marker="o", s=50)
10492  * xm = rfl[W550,row,col] # <<<<<<<<<<<<<<
10493  * ym = rfl[W659,row,col]
10494  * zm = rfl[W860,row,col]
10495  */
10496  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_rfl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 223, __pyx_L1_error)
10497  __Pyx_GOTREF(__pyx_t_3);
10498  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_W550); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
10499  __Pyx_GOTREF(__pyx_t_1);
10500  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_row); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 223, __pyx_L1_error)
10501  __Pyx_GOTREF(__pyx_t_10);
10502  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_col); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 223, __pyx_L1_error)
10503  __Pyx_GOTREF(__pyx_t_7);
10504  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 223, __pyx_L1_error)
10505  __Pyx_GOTREF(__pyx_t_6);
10506  __Pyx_GIVEREF(__pyx_t_1);
10507  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
10508  __Pyx_GIVEREF(__pyx_t_10);
10509  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_10);
10510  __Pyx_GIVEREF(__pyx_t_7);
10511  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_7);
10512  __pyx_t_1 = 0;
10513  __pyx_t_10 = 0;
10514  __pyx_t_7 = 0;
10515  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 223, __pyx_L1_error)
10516  __Pyx_GOTREF(__pyx_t_7);
10517  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10518  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10519  __pyx_v_xm = __pyx_t_7;
10520  __pyx_t_7 = 0;
10521 
10522  /* "dtocean.pyx":224
10523  * ax.scatter(xb, yb, zb, c="r", marker="o", s=50)
10524  * xm = rfl[W550,row,col]
10525  * ym = rfl[W659,row,col] # <<<<<<<<<<<<<<
10526  * zm = rfl[W860,row,col]
10527  * ax.scatter(xm, ym, zm, c="k", marker="o", s=50)
10528  */
10529  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_rfl); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 224, __pyx_L1_error)
10530  __Pyx_GOTREF(__pyx_t_7);
10531  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_W659); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L1_error)
10532  __Pyx_GOTREF(__pyx_t_6);
10533  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_row); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 224, __pyx_L1_error)
10534  __Pyx_GOTREF(__pyx_t_3);
10535  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_col); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 224, __pyx_L1_error)
10536  __Pyx_GOTREF(__pyx_t_10);
10537  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error)
10538  __Pyx_GOTREF(__pyx_t_1);
10539  __Pyx_GIVEREF(__pyx_t_6);
10540  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
10541  __Pyx_GIVEREF(__pyx_t_3);
10542  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
10543  __Pyx_GIVEREF(__pyx_t_10);
10544  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_10);
10545  __pyx_t_6 = 0;
10546  __pyx_t_3 = 0;
10547  __pyx_t_10 = 0;
10548  __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 224, __pyx_L1_error)
10549  __Pyx_GOTREF(__pyx_t_10);
10550  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10551  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10552  __pyx_v_ym = __pyx_t_10;
10553  __pyx_t_10 = 0;
10554 
10555  /* "dtocean.pyx":225
10556  * xm = rfl[W550,row,col]
10557  * ym = rfl[W659,row,col]
10558  * zm = rfl[W860,row,col] # <<<<<<<<<<<<<<
10559  * ax.scatter(xm, ym, zm, c="k", marker="o", s=50)
10560  * ax.set_xlabel('W550')
10561  */
10562  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_rfl); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 225, __pyx_L1_error)
10563  __Pyx_GOTREF(__pyx_t_10);
10564  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_W860); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error)
10565  __Pyx_GOTREF(__pyx_t_1);
10566  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_row); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 225, __pyx_L1_error)
10567  __Pyx_GOTREF(__pyx_t_7);
10568  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 225, __pyx_L1_error)
10569  __Pyx_GOTREF(__pyx_t_3);
10570  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error)
10571  __Pyx_GOTREF(__pyx_t_6);
10572  __Pyx_GIVEREF(__pyx_t_1);
10573  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
10574  __Pyx_GIVEREF(__pyx_t_7);
10575  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7);
10576  __Pyx_GIVEREF(__pyx_t_3);
10577  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3);
10578  __pyx_t_1 = 0;
10579  __pyx_t_7 = 0;
10580  __pyx_t_3 = 0;
10581  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 225, __pyx_L1_error)
10582  __Pyx_GOTREF(__pyx_t_3);
10583  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10584  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10585  __pyx_v_zm = __pyx_t_3;
10586  __pyx_t_3 = 0;
10587 
10588  /* "dtocean.pyx":226
10589  * ym = rfl[W659,row,col]
10590  * zm = rfl[W860,row,col]
10591  * ax.scatter(xm, ym, zm, c="k", marker="o", s=50) # <<<<<<<<<<<<<<
10592  * ax.set_xlabel('W550')
10593  * ax.set_ylabel('W659')
10594  */
10595  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_scatter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 226, __pyx_L1_error)
10596  __Pyx_GOTREF(__pyx_t_3);
10597  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 226, __pyx_L1_error)
10598  __Pyx_GOTREF(__pyx_t_6);
10599  __Pyx_INCREF(__pyx_v_xm);
10600  __Pyx_GIVEREF(__pyx_v_xm);
10601  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_xm);
10602  __Pyx_INCREF(__pyx_v_ym);
10603  __Pyx_GIVEREF(__pyx_v_ym);
10604  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ym);
10605  __Pyx_INCREF(__pyx_v_zm);
10606  __Pyx_GIVEREF(__pyx_v_zm);
10607  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_zm);
10608  __pyx_t_10 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 226, __pyx_L1_error)
10609  __Pyx_GOTREF(__pyx_t_10);
10610  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_c, __pyx_n_u_k) < 0) __PYX_ERR(0, 226, __pyx_L1_error)
10611  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_marker, __pyx_n_u_o) < 0) __PYX_ERR(0, 226, __pyx_L1_error)
10612  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_s, __pyx_int_50) < 0) __PYX_ERR(0, 226, __pyx_L1_error)
10613  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, __pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 226, __pyx_L1_error)
10614  __Pyx_GOTREF(__pyx_t_7);
10615  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10616  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10617  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10618  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10619 
10620  /* "dtocean.pyx":227
10621  * zm = rfl[W860,row,col]
10622  * ax.scatter(xm, ym, zm, c="k", marker="o", s=50)
10623  * ax.set_xlabel('W550') # <<<<<<<<<<<<<<
10624  * ax.set_ylabel('W659')
10625  * ax.set_zlabel('W860')
10626  */
10627  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_set_xlabel); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 227, __pyx_L1_error)
10628  __Pyx_GOTREF(__pyx_t_10);
10629  __pyx_t_6 = NULL;
10630  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
10631  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
10632  if (likely(__pyx_t_6)) {
10633  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
10634  __Pyx_INCREF(__pyx_t_6);
10635  __Pyx_INCREF(function);
10636  __Pyx_DECREF_SET(__pyx_t_10, function);
10637  }
10638  }
10639  __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_6, __pyx_n_u_W550) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_n_u_W550);
10640  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
10641  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 227, __pyx_L1_error)
10642  __Pyx_GOTREF(__pyx_t_7);
10643  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10644  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10645 
10646  /* "dtocean.pyx":228
10647  * ax.scatter(xm, ym, zm, c="k", marker="o", s=50)
10648  * ax.set_xlabel('W550')
10649  * ax.set_ylabel('W659') # <<<<<<<<<<<<<<
10650  * ax.set_zlabel('W860')
10651  * #plt.show()
10652  */
10653  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_set_ylabel); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 228, __pyx_L1_error)
10654  __Pyx_GOTREF(__pyx_t_10);
10655  __pyx_t_6 = NULL;
10656  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
10657  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
10658  if (likely(__pyx_t_6)) {
10659  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
10660  __Pyx_INCREF(__pyx_t_6);
10661  __Pyx_INCREF(function);
10662  __Pyx_DECREF_SET(__pyx_t_10, function);
10663  }
10664  }
10665  __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_6, __pyx_n_u_W659) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_n_u_W659);
10666  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
10667  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 228, __pyx_L1_error)
10668  __Pyx_GOTREF(__pyx_t_7);
10669  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10670  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10671 
10672  /* "dtocean.pyx":229
10673  * ax.set_xlabel('W550')
10674  * ax.set_ylabel('W659')
10675  * ax.set_zlabel('W860') # <<<<<<<<<<<<<<
10676  * #plt.show()
10677  *
10678  */
10679  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_set_zlabel); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 229, __pyx_L1_error)
10680  __Pyx_GOTREF(__pyx_t_10);
10681  __pyx_t_6 = NULL;
10682  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
10683  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
10684  if (likely(__pyx_t_6)) {
10685  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
10686  __Pyx_INCREF(__pyx_t_6);
10687  __Pyx_INCREF(function);
10688  __Pyx_DECREF_SET(__pyx_t_10, function);
10689  }
10690  }
10691  __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_6, __pyx_n_u_W860) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_n_u_W860);
10692  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
10693  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 229, __pyx_L1_error)
10694  __Pyx_GOTREF(__pyx_t_7);
10695  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10696  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10697 
10698  /* "dtocean.pyx":232
10699  * #plt.show()
10700  *
10701  * fig = plt.figure() # <<<<<<<<<<<<<<
10702  * ax = fig.add_subplot(111, projection='3d')
10703  * ws = np.arange(NWL)
10704  */
10705  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_plt); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 232, __pyx_L1_error)
10706  __Pyx_GOTREF(__pyx_t_10);
10707  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_figure); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 232, __pyx_L1_error)
10708  __Pyx_GOTREF(__pyx_t_6);
10709  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10710  __pyx_t_10 = NULL;
10711  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
10712  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
10713  if (likely(__pyx_t_10)) {
10714  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
10715  __Pyx_INCREF(__pyx_t_10);
10716  __Pyx_INCREF(function);
10717  __Pyx_DECREF_SET(__pyx_t_6, function);
10718  }
10719  }
10720  __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
10721  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
10722  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 232, __pyx_L1_error)
10723  __Pyx_GOTREF(__pyx_t_7);
10724  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10725  __Pyx_DECREF_SET(__pyx_v_fig, __pyx_t_7);
10726  __pyx_t_7 = 0;
10727 
10728  /* "dtocean.pyx":233
10729  *
10730  * fig = plt.figure()
10731  * ax = fig.add_subplot(111, projection='3d') # <<<<<<<<<<<<<<
10732  * ws = np.arange(NWL)
10733  * ts = np.arange(NAOT+1)
10734  */
10735  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_fig, __pyx_n_s_add_subplot); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 233, __pyx_L1_error)
10736  __Pyx_GOTREF(__pyx_t_7);
10737  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 233, __pyx_L1_error)
10738  __Pyx_GOTREF(__pyx_t_6);
10739  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_projection, __pyx_kp_u_3d) < 0) __PYX_ERR(0, 233, __pyx_L1_error)
10740  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__9, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 233, __pyx_L1_error)
10741  __Pyx_GOTREF(__pyx_t_10);
10742  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10743  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10744  __Pyx_DECREF_SET(__pyx_v_ax, __pyx_t_10);
10745  __pyx_t_10 = 0;
10746 
10747  /* "dtocean.pyx":234
10748  * fig = plt.figure()
10749  * ax = fig.add_subplot(111, projection='3d')
10750  * ws = np.arange(NWL) # <<<<<<<<<<<<<<
10751  * ts = np.arange(NAOT+1)
10752  * ws, ts = np.meshgrid(ws, ts)
10753  */
10754  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error)
10755  __Pyx_GOTREF(__pyx_t_6);
10756  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_arange); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 234, __pyx_L1_error)
10757  __Pyx_GOTREF(__pyx_t_7);
10758  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10759  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NWL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error)
10760  __Pyx_GOTREF(__pyx_t_6);
10761  __pyx_t_3 = NULL;
10762  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
10763  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
10764  if (likely(__pyx_t_3)) {
10765  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
10766  __Pyx_INCREF(__pyx_t_3);
10767  __Pyx_INCREF(function);
10768  __Pyx_DECREF_SET(__pyx_t_7, function);
10769  }
10770  }
10771  __pyx_t_10 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
10772  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10773  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10774  if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 234, __pyx_L1_error)
10775  __Pyx_GOTREF(__pyx_t_10);
10776  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10777  __pyx_v_ws = __pyx_t_10;
10778  __pyx_t_10 = 0;
10779 
10780  /* "dtocean.pyx":235
10781  * ax = fig.add_subplot(111, projection='3d')
10782  * ws = np.arange(NWL)
10783  * ts = np.arange(NAOT+1) # <<<<<<<<<<<<<<
10784  * ws, ts = np.meshgrid(ws, ts)
10785  * ls = np.zeros((NWL,NAOT+1))
10786  */
10787  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 235, __pyx_L1_error)
10788  __Pyx_GOTREF(__pyx_t_7);
10789  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_arange); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 235, __pyx_L1_error)
10790  __Pyx_GOTREF(__pyx_t_6);
10791  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10792  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NAOT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 235, __pyx_L1_error)
10793  __Pyx_GOTREF(__pyx_t_7);
10794  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_7, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error)
10795  __Pyx_GOTREF(__pyx_t_3);
10796  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10797  __pyx_t_7 = NULL;
10798  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
10799  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
10800  if (likely(__pyx_t_7)) {
10801  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
10802  __Pyx_INCREF(__pyx_t_7);
10803  __Pyx_INCREF(function);
10804  __Pyx_DECREF_SET(__pyx_t_6, function);
10805  }
10806  }
10807  __pyx_t_10 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3);
10808  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10809  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10810  if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 235, __pyx_L1_error)
10811  __Pyx_GOTREF(__pyx_t_10);
10812  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10813  __pyx_v_ts = __pyx_t_10;
10814  __pyx_t_10 = 0;
10815 
10816  /* "dtocean.pyx":236
10817  * ws = np.arange(NWL)
10818  * ts = np.arange(NAOT+1)
10819  * ws, ts = np.meshgrid(ws, ts) # <<<<<<<<<<<<<<
10820  * ls = np.zeros((NWL,NAOT+1))
10821  * lb = np.zeros((NWL,NAOT+1))
10822  */
10823  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 236, __pyx_L1_error)
10824  __Pyx_GOTREF(__pyx_t_6);
10825  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_meshgrid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
10826  __Pyx_GOTREF(__pyx_t_3);
10827  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10828  __pyx_t_6 = NULL;
10829  __pyx_t_11 = 0;
10830  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
10831  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
10832  if (likely(__pyx_t_6)) {
10833  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
10834  __Pyx_INCREF(__pyx_t_6);
10835  __Pyx_INCREF(function);
10836  __Pyx_DECREF_SET(__pyx_t_3, function);
10837  __pyx_t_11 = 1;
10838  }
10839  }
10840  #if CYTHON_FAST_PYCALL
10841  if (PyFunction_Check(__pyx_t_3)) {
10842  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_ws, __pyx_v_ts};
10843  __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 236, __pyx_L1_error)
10844  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
10845  __Pyx_GOTREF(__pyx_t_10);
10846  } else
10847  #endif
10848  #if CYTHON_FAST_PYCCALL
10849  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
10850  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_ws, __pyx_v_ts};
10851  __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 236, __pyx_L1_error)
10852  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
10853  __Pyx_GOTREF(__pyx_t_10);
10854  } else
10855  #endif
10856  {
10857  __pyx_t_7 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 236, __pyx_L1_error)
10858  __Pyx_GOTREF(__pyx_t_7);
10859  if (__pyx_t_6) {
10860  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
10861  }
10862  __Pyx_INCREF(__pyx_v_ws);
10863  __Pyx_GIVEREF(__pyx_v_ws);
10864  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_11, __pyx_v_ws);
10865  __Pyx_INCREF(__pyx_v_ts);
10866  __Pyx_GIVEREF(__pyx_v_ts);
10867  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_11, __pyx_v_ts);
10868  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 236, __pyx_L1_error)
10869  __Pyx_GOTREF(__pyx_t_10);
10870  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10871  }
10872  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10873  if ((likely(PyTuple_CheckExact(__pyx_t_10))) || (PyList_CheckExact(__pyx_t_10))) {
10874  PyObject* sequence = __pyx_t_10;
10875  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
10876  if (unlikely(size != 2)) {
10877  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
10878  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
10879  __PYX_ERR(0, 236, __pyx_L1_error)
10880  }
10881  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
10882  if (likely(PyTuple_CheckExact(sequence))) {
10883  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
10884  __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
10885  } else {
10886  __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
10887  __pyx_t_7 = PyList_GET_ITEM(sequence, 1);
10888  }
10889  __Pyx_INCREF(__pyx_t_3);
10890  __Pyx_INCREF(__pyx_t_7);
10891  #else
10892  __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
10893  __Pyx_GOTREF(__pyx_t_3);
10894  __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 236, __pyx_L1_error)
10895  __Pyx_GOTREF(__pyx_t_7);
10896  #endif
10897  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10898  } else {
10899  Py_ssize_t index = -1;
10900  __pyx_t_6 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 236, __pyx_L1_error)
10901  __Pyx_GOTREF(__pyx_t_6);
10902  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10903  __pyx_t_12 = Py_TYPE(__pyx_t_6)->tp_iternext;
10904  index = 0; __pyx_t_3 = __pyx_t_12(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L11_unpacking_failed;
10905  __Pyx_GOTREF(__pyx_t_3);
10906  index = 1; __pyx_t_7 = __pyx_t_12(__pyx_t_6); if (unlikely(!__pyx_t_7)) goto __pyx_L11_unpacking_failed;
10907  __Pyx_GOTREF(__pyx_t_7);
10908  if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_6), 2) < 0) __PYX_ERR(0, 236, __pyx_L1_error)
10909  __pyx_t_12 = NULL;
10910  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10911  goto __pyx_L12_unpacking_done;
10912  __pyx_L11_unpacking_failed:;
10913  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10914  __pyx_t_12 = NULL;
10915  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
10916  __PYX_ERR(0, 236, __pyx_L1_error)
10917  __pyx_L12_unpacking_done:;
10918  }
10919  __Pyx_DECREF_SET(__pyx_v_ws, __pyx_t_3);
10920  __pyx_t_3 = 0;
10921  __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_7);
10922  __pyx_t_7 = 0;
10923 
10924  /* "dtocean.pyx":237
10925  * ts = np.arange(NAOT+1)
10926  * ws, ts = np.meshgrid(ws, ts)
10927  * ls = np.zeros((NWL,NAOT+1)) # <<<<<<<<<<<<<<
10928  * lb = np.zeros((NWL,NAOT+1))
10929  * ls[:,:-1] = toast[:,s,:]
10930  */
10931  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 237, __pyx_L1_error)
10932  __Pyx_GOTREF(__pyx_t_7);
10933  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 237, __pyx_L1_error)
10934  __Pyx_GOTREF(__pyx_t_3);
10935  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10936  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NWL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 237, __pyx_L1_error)
10937  __Pyx_GOTREF(__pyx_t_7);
10938  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NAOT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L1_error)
10939  __Pyx_GOTREF(__pyx_t_6);
10940  __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_6, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
10941  __Pyx_GOTREF(__pyx_t_1);
10942  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10943  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L1_error)
10944  __Pyx_GOTREF(__pyx_t_6);
10945  __Pyx_GIVEREF(__pyx_t_7);
10946  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
10947  __Pyx_GIVEREF(__pyx_t_1);
10948  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
10949  __pyx_t_7 = 0;
10950  __pyx_t_1 = 0;
10951  __pyx_t_1 = NULL;
10952  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
10953  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
10954  if (likely(__pyx_t_1)) {
10955  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
10956  __Pyx_INCREF(__pyx_t_1);
10957  __Pyx_INCREF(function);
10958  __Pyx_DECREF_SET(__pyx_t_3, function);
10959  }
10960  }
10961  __pyx_t_10 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6);
10962  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
10963  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10964  if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 237, __pyx_L1_error)
10965  __Pyx_GOTREF(__pyx_t_10);
10966  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10967  __pyx_v_ls = __pyx_t_10;
10968  __pyx_t_10 = 0;
10969 
10970  /* "dtocean.pyx":238
10971  * ws, ts = np.meshgrid(ws, ts)
10972  * ls = np.zeros((NWL,NAOT+1))
10973  * lb = np.zeros((NWL,NAOT+1)) # <<<<<<<<<<<<<<
10974  * ls[:,:-1] = toast[:,s,:]
10975  * ls[:,NAOT] = ls[:,NAOT-1]
10976  */
10977  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error)
10978  __Pyx_GOTREF(__pyx_t_3);
10979  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 238, __pyx_L1_error)
10980  __Pyx_GOTREF(__pyx_t_6);
10981  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10982  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NWL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error)
10983  __Pyx_GOTREF(__pyx_t_3);
10984  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NAOT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
10985  __Pyx_GOTREF(__pyx_t_1);
10986  __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 238, __pyx_L1_error)
10987  __Pyx_GOTREF(__pyx_t_7);
10988  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10989  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
10990  __Pyx_GOTREF(__pyx_t_1);
10991  __Pyx_GIVEREF(__pyx_t_3);
10992  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
10993  __Pyx_GIVEREF(__pyx_t_7);
10994  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);
10995  __pyx_t_3 = 0;
10996  __pyx_t_7 = 0;
10997  __pyx_t_7 = NULL;
10998  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
10999  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
11000  if (likely(__pyx_t_7)) {
11001  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
11002  __Pyx_INCREF(__pyx_t_7);
11003  __Pyx_INCREF(function);
11004  __Pyx_DECREF_SET(__pyx_t_6, function);
11005  }
11006  }
11007  __pyx_t_10 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1);
11008  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
11009  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11010  if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 238, __pyx_L1_error)
11011  __Pyx_GOTREF(__pyx_t_10);
11012  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11013  __pyx_v_lb = __pyx_t_10;
11014  __pyx_t_10 = 0;
11015 
11016  /* "dtocean.pyx":239
11017  * ls = np.zeros((NWL,NAOT+1))
11018  * lb = np.zeros((NWL,NAOT+1))
11019  * ls[:,:-1] = toast[:,s,:] # <<<<<<<<<<<<<<
11020  * ls[:,NAOT] = ls[:,NAOT-1]
11021  * ax.plot_wireframe(ws, ts, ls, color='b', label="small model")
11022  */
11023  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_toast); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 239, __pyx_L1_error)
11024  __Pyx_GOTREF(__pyx_t_10);
11025  if (unlikely(!__pyx_v_s)) { __Pyx_RaiseUnboundLocalError("s"); __PYX_ERR(0, 239, __pyx_L1_error) }
11026  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 239, __pyx_L1_error)
11027  __Pyx_GOTREF(__pyx_t_6);
11028  __Pyx_INCREF(__pyx_slice__4);
11029  __Pyx_GIVEREF(__pyx_slice__4);
11030  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_slice__4);
11031  __Pyx_INCREF(__pyx_v_s);
11032  __Pyx_GIVEREF(__pyx_v_s);
11033  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_s);
11034  __Pyx_INCREF(__pyx_slice__4);
11035  __Pyx_GIVEREF(__pyx_slice__4);
11036  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_slice__4);
11037  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
11038  __Pyx_GOTREF(__pyx_t_1);
11039  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
11040  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11041  if (unlikely(PyObject_SetItem(__pyx_v_ls, __pyx_tuple__11, __pyx_t_1) < 0)) __PYX_ERR(0, 239, __pyx_L1_error)
11042  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11043 
11044  /* "dtocean.pyx":240
11045  * lb = np.zeros((NWL,NAOT+1))
11046  * ls[:,:-1] = toast[:,s,:]
11047  * ls[:,NAOT] = ls[:,NAOT-1] # <<<<<<<<<<<<<<
11048  * ax.plot_wireframe(ws, ts, ls, color='b', label="small model")
11049  * lb[:,:-1] = toabt[:,b,:]
11050  */
11051  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NAOT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error)
11052  __Pyx_GOTREF(__pyx_t_1);
11053  __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 240, __pyx_L1_error)
11054  __Pyx_GOTREF(__pyx_t_6);
11055  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11056  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error)
11057  __Pyx_GOTREF(__pyx_t_1);
11058  __Pyx_INCREF(__pyx_slice__4);
11059  __Pyx_GIVEREF(__pyx_slice__4);
11060  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_slice__4);
11061  __Pyx_GIVEREF(__pyx_t_6);
11062  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
11063  __pyx_t_6 = 0;
11064  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_ls, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 240, __pyx_L1_error)
11065  __Pyx_GOTREF(__pyx_t_6);
11066  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11067  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NAOT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error)
11068  __Pyx_GOTREF(__pyx_t_1);
11069  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 240, __pyx_L1_error)
11070  __Pyx_GOTREF(__pyx_t_10);
11071  __Pyx_INCREF(__pyx_slice__4);
11072  __Pyx_GIVEREF(__pyx_slice__4);
11073  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_slice__4);
11074  __Pyx_GIVEREF(__pyx_t_1);
11075  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_1);
11076  __pyx_t_1 = 0;
11077  if (unlikely(PyObject_SetItem(__pyx_v_ls, __pyx_t_10, __pyx_t_6) < 0)) __PYX_ERR(0, 240, __pyx_L1_error)
11078  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
11079  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11080 
11081  /* "dtocean.pyx":241
11082  * ls[:,:-1] = toast[:,s,:]
11083  * ls[:,NAOT] = ls[:,NAOT-1]
11084  * ax.plot_wireframe(ws, ts, ls, color='b', label="small model") # <<<<<<<<<<<<<<
11085  * lb[:,:-1] = toabt[:,b,:]
11086  * lb[:,NAOT] = lb[:,NAOT-1]
11087  */
11088  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_plot_wireframe); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 241, __pyx_L1_error)
11089  __Pyx_GOTREF(__pyx_t_6);
11090  __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 241, __pyx_L1_error)
11091  __Pyx_GOTREF(__pyx_t_10);
11092  __Pyx_INCREF(__pyx_v_ws);
11093  __Pyx_GIVEREF(__pyx_v_ws);
11094  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_ws);
11095  __Pyx_INCREF(__pyx_v_ts);
11096  __Pyx_GIVEREF(__pyx_v_ts);
11097  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_ts);
11098  __Pyx_INCREF(__pyx_v_ls);
11099  __Pyx_GIVEREF(__pyx_v_ls);
11100  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_ls);
11101  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error)
11102  __Pyx_GOTREF(__pyx_t_1);
11103  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_color, __pyx_n_u_b) < 0) __PYX_ERR(0, 241, __pyx_L1_error)
11104  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_label, __pyx_kp_u_small_model) < 0) __PYX_ERR(0, 241, __pyx_L1_error)
11105  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 241, __pyx_L1_error)
11106  __Pyx_GOTREF(__pyx_t_7);
11107  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11108  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
11109  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11110  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11111 
11112  /* "dtocean.pyx":242
11113  * ls[:,NAOT] = ls[:,NAOT-1]
11114  * ax.plot_wireframe(ws, ts, ls, color='b', label="small model")
11115  * lb[:,:-1] = toabt[:,b,:] # <<<<<<<<<<<<<<
11116  * lb[:,NAOT] = lb[:,NAOT-1]
11117  * ax.plot_wireframe(ws, ts, lb, color='r', label="big model")
11118  */
11119  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_toabt); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 242, __pyx_L1_error)
11120  __Pyx_GOTREF(__pyx_t_7);
11121  if (unlikely(!__pyx_v_b)) { __Pyx_RaiseUnboundLocalError("b"); __PYX_ERR(0, 242, __pyx_L1_error) }
11122  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error)
11123  __Pyx_GOTREF(__pyx_t_1);
11124  __Pyx_INCREF(__pyx_slice__4);
11125  __Pyx_GIVEREF(__pyx_slice__4);
11126  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_slice__4);
11127  __Pyx_INCREF(__pyx_v_b);
11128  __Pyx_GIVEREF(__pyx_v_b);
11129  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_b);
11130  __Pyx_INCREF(__pyx_slice__4);
11131  __Pyx_GIVEREF(__pyx_slice__4);
11132  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_slice__4);
11133  __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 242, __pyx_L1_error)
11134  __Pyx_GOTREF(__pyx_t_10);
11135  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11136  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11137  if (unlikely(PyObject_SetItem(__pyx_v_lb, __pyx_tuple__11, __pyx_t_10) < 0)) __PYX_ERR(0, 242, __pyx_L1_error)
11138  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
11139 
11140  /* "dtocean.pyx":243
11141  * ax.plot_wireframe(ws, ts, ls, color='b', label="small model")
11142  * lb[:,:-1] = toabt[:,b,:]
11143  * lb[:,NAOT] = lb[:,NAOT-1] # <<<<<<<<<<<<<<
11144  * ax.plot_wireframe(ws, ts, lb, color='r', label="big model")
11145  * plt.show()
11146  */
11147  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_NAOT); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 243, __pyx_L1_error)
11148  __Pyx_GOTREF(__pyx_t_10);
11149  __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_t_10, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error)
11150  __Pyx_GOTREF(__pyx_t_1);
11151  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
11152  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 243, __pyx_L1_error)
11153  __Pyx_GOTREF(__pyx_t_10);
11154  __Pyx_INCREF(__pyx_slice__4);
11155  __Pyx_GIVEREF(__pyx_slice__4);
11156  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_slice__4);
11157  __Pyx_GIVEREF(__pyx_t_1);
11158  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_1);
11159  __pyx_t_1 = 0;
11160  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_lb, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error)
11161  __Pyx_GOTREF(__pyx_t_1);
11162  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
11163  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_NAOT); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 243, __pyx_L1_error)
11164  __Pyx_GOTREF(__pyx_t_10);
11165  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 243, __pyx_L1_error)
11166  __Pyx_GOTREF(__pyx_t_7);
11167  __Pyx_INCREF(__pyx_slice__4);
11168  __Pyx_GIVEREF(__pyx_slice__4);
11169  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_slice__4);
11170  __Pyx_GIVEREF(__pyx_t_10);
11171  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_10);
11172  __pyx_t_10 = 0;
11173  if (unlikely(PyObject_SetItem(__pyx_v_lb, __pyx_t_7, __pyx_t_1) < 0)) __PYX_ERR(0, 243, __pyx_L1_error)
11174  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11175  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11176 
11177  /* "dtocean.pyx":244
11178  * lb[:,:-1] = toabt[:,b,:]
11179  * lb[:,NAOT] = lb[:,NAOT-1]
11180  * ax.plot_wireframe(ws, ts, lb, color='r', label="big model") # <<<<<<<<<<<<<<
11181  * plt.show()
11182  *
11183  */
11184  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_plot_wireframe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
11185  __Pyx_GOTREF(__pyx_t_1);
11186  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 244, __pyx_L1_error)
11187  __Pyx_GOTREF(__pyx_t_7);
11188  __Pyx_INCREF(__pyx_v_ws);
11189  __Pyx_GIVEREF(__pyx_v_ws);
11190  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_ws);
11191  __Pyx_INCREF(__pyx_v_ts);
11192  __Pyx_GIVEREF(__pyx_v_ts);
11193  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ts);
11194  __Pyx_INCREF(__pyx_v_lb);
11195  __Pyx_GIVEREF(__pyx_v_lb);
11196  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_lb);
11197  __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 244, __pyx_L1_error)
11198  __Pyx_GOTREF(__pyx_t_10);
11199  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_color, __pyx_n_u_r) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
11200  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_label, __pyx_kp_u_big_model) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
11201  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error)
11202  __Pyx_GOTREF(__pyx_t_6);
11203  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11204  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11205  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
11206  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11207 
11208  /* "dtocean.pyx":245
11209  * lb[:,NAOT] = lb[:,NAOT-1]
11210  * ax.plot_wireframe(ws, ts, lb, color='r', label="big model")
11211  * plt.show() # <<<<<<<<<<<<<<
11212  *
11213  * class input(object):
11214  */
11215  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_plt); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 245, __pyx_L1_error)
11216  __Pyx_GOTREF(__pyx_t_10);
11217  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_show); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 245, __pyx_L1_error)
11218  __Pyx_GOTREF(__pyx_t_7);
11219  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
11220  __pyx_t_10 = NULL;
11221  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
11222  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
11223  if (likely(__pyx_t_10)) {
11224  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
11225  __Pyx_INCREF(__pyx_t_10);
11226  __Pyx_INCREF(function);
11227  __Pyx_DECREF_SET(__pyx_t_7, function);
11228  }
11229  }
11230  __pyx_t_6 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
11231  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
11232  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 245, __pyx_L1_error)
11233  __Pyx_GOTREF(__pyx_t_6);
11234  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11235  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11236 
11237  /* "dtocean.pyx":193
11238  * plt.show()
11239  *
11240  * def plot_points(self): # <<<<<<<<<<<<<<
11241  * fig = plt.figure()
11242  * ax = fig.add_subplot(111, projection='3d')
11243  */
11244 
11245  /* function exit code */
11246  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11247  goto __pyx_L0;
11248  __pyx_L1_error:;
11249  __Pyx_XDECREF(__pyx_t_1);
11250  __Pyx_XDECREF(__pyx_t_2);
11251  __Pyx_XDECREF(__pyx_t_3);
11252  __Pyx_XDECREF(__pyx_t_6);
11253  __Pyx_XDECREF(__pyx_t_7);
11254  __Pyx_XDECREF(__pyx_t_10);
11255  __Pyx_AddTraceback("dtocean.dtocean.plot_points", __pyx_clineno, __pyx_lineno, __pyx_filename);
11256  __pyx_r = NULL;
11257  __pyx_L0:;
11258  __Pyx_XDECREF(__pyx_v_fig);
11259  __Pyx_XDECREF(__pyx_v_ax);
11260  __Pyx_XDECREF(__pyx_v_s);
11261  __Pyx_XDECREF(__pyx_v_xs);
11262  __Pyx_XDECREF(__pyx_v_ys);
11263  __Pyx_XDECREF(__pyx_v_zs);
11264  __Pyx_XDECREF(__pyx_v_b);
11265  __Pyx_XDECREF(__pyx_v_xb);
11266  __Pyx_XDECREF(__pyx_v_yb);
11267  __Pyx_XDECREF(__pyx_v_zb);
11268  __Pyx_XDECREF(__pyx_v_xp);
11269  __Pyx_XDECREF(__pyx_v_yp);
11270  __Pyx_XDECREF(__pyx_v_zp);
11271  __Pyx_XDECREF(__pyx_v_xm);
11272  __Pyx_XDECREF(__pyx_v_ym);
11273  __Pyx_XDECREF(__pyx_v_zm);
11274  __Pyx_XDECREF(__pyx_v_ws);
11275  __Pyx_XDECREF(__pyx_v_ts);
11276  __Pyx_XDECREF(__pyx_v_ls);
11277  __Pyx_XDECREF(__pyx_v_lb);
11278  __Pyx_XGIVEREF(__pyx_r);
11279  __Pyx_RefNannyFinishContext();
11280  return __pyx_r;
11281 }
11282 
11283 /* "dtocean.pyx":249
11284  * class input(object):
11285  *
11286  * def __init__(self, l1b_filepath): # <<<<<<<<<<<<<<
11287  * self.ifile = l1b_filepath
11288  * print ("Reading VIIRS Data: " + self.ifile)
11289  */
11290 
11291 /* Python wrapper */
11292 static PyObject *__pyx_pw_7dtocean_5input_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11293 static PyMethodDef __pyx_mdef_7dtocean_5input_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7dtocean_5input_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
11294 static PyObject *__pyx_pw_7dtocean_5input_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11295  PyObject *__pyx_v_self = 0;
11296  PyObject *__pyx_v_l1b_filepath = 0;
11297  int __pyx_lineno = 0;
11298  const char *__pyx_filename = NULL;
11299  int __pyx_clineno = 0;
11300  PyObject *__pyx_r = 0;
11301  __Pyx_RefNannyDeclarations
11302  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
11303  {
11304  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_l1b_filepath,0};
11305  PyObject* values[2] = {0,0};
11306  if (unlikely(__pyx_kwds)) {
11307  Py_ssize_t kw_args;
11308  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11309  switch (pos_args) {
11310  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11311  CYTHON_FALLTHROUGH;
11312  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11313  CYTHON_FALLTHROUGH;
11314  case 0: break;
11315  default: goto __pyx_L5_argtuple_error;
11316  }
11317  kw_args = PyDict_Size(__pyx_kwds);
11318  switch (pos_args) {
11319  case 0:
11320  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
11321  else goto __pyx_L5_argtuple_error;
11322  CYTHON_FALLTHROUGH;
11323  case 1:
11324  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l1b_filepath)) != 0)) kw_args--;
11325  else {
11326  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 249, __pyx_L3_error)
11327  }
11328  }
11329  if (unlikely(kw_args > 0)) {
11330  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 249, __pyx_L3_error)
11331  }
11332  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
11333  goto __pyx_L5_argtuple_error;
11334  } else {
11335  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11336  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11337  }
11338  __pyx_v_self = values[0];
11339  __pyx_v_l1b_filepath = values[1];
11340  }
11341  goto __pyx_L4_argument_unpacking_done;
11342  __pyx_L5_argtuple_error:;
11343  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 249, __pyx_L3_error)
11344  __pyx_L3_error:;
11345  __Pyx_AddTraceback("dtocean.input.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11346  __Pyx_RefNannyFinishContext();
11347  return NULL;
11348  __pyx_L4_argument_unpacking_done:;
11349  __pyx_r = __pyx_pf_7dtocean_5input___init__(__pyx_self, __pyx_v_self, __pyx_v_l1b_filepath);
11350 
11351  /* function exit code */
11352  __Pyx_RefNannyFinishContext();
11353  return __pyx_r;
11354 }
11355 
11356 static PyObject *__pyx_pf_7dtocean_5input___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_l1b_filepath) {
11357  PyObject *__pyx_v_inst = NULL;
11358  PyObject *__pyx_r = NULL;
11359  __Pyx_RefNannyDeclarations
11360  PyObject *__pyx_t_1 = NULL;
11361  PyObject *__pyx_t_2 = NULL;
11362  PyObject *__pyx_t_3 = NULL;
11363  PyObject *__pyx_t_4 = NULL;
11364  PyObject *__pyx_t_5 = NULL;
11365  PyObject *__pyx_t_6 = NULL;
11366  PyObject *__pyx_t_7 = NULL;
11367  PyObject *__pyx_t_8 = NULL;
11368  PyObject *__pyx_t_9 = NULL;
11369  int __pyx_t_10;
11370  int __pyx_t_11;
11371  char const *__pyx_t_12;
11372  PyObject *__pyx_t_13 = NULL;
11373  PyObject *__pyx_t_14 = NULL;
11374  PyObject *__pyx_t_15 = NULL;
11375  PyObject *__pyx_t_16 = NULL;
11376  PyObject *__pyx_t_17 = NULL;
11377  PyObject *__pyx_t_18 = NULL;
11378  int __pyx_lineno = 0;
11379  const char *__pyx_filename = NULL;
11380  int __pyx_clineno = 0;
11381  __Pyx_RefNannySetupContext("__init__", 0);
11382 
11383  /* "dtocean.pyx":250
11384  *
11385  * def __init__(self, l1b_filepath):
11386  * self.ifile = l1b_filepath # <<<<<<<<<<<<<<
11387  * print ("Reading VIIRS Data: " + self.ifile)
11388  * try:
11389  */
11390  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ifile, __pyx_v_l1b_filepath) < 0) __PYX_ERR(0, 250, __pyx_L1_error)
11391 
11392  /* "dtocean.pyx":251
11393  * def __init__(self, l1b_filepath):
11394  * self.ifile = l1b_filepath
11395  * print ("Reading VIIRS Data: " + self.ifile) # <<<<<<<<<<<<<<
11396  * try:
11397  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:].values,
11398  */
11399  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ifile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error)
11400  __Pyx_GOTREF(__pyx_t_1);
11401  __pyx_t_2 = PyNumber_Add(__pyx_kp_u_Reading_VIIRS_Data, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error)
11402  __Pyx_GOTREF(__pyx_t_2);
11403  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11404  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error)
11405  __Pyx_GOTREF(__pyx_t_1);
11406  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11407  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11408 
11409  /* "dtocean.pyx":252
11410  * self.ifile = l1b_filepath
11411  * print ("Reading VIIRS Data: " + self.ifile)
11412  * try: # <<<<<<<<<<<<<<
11413  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:].values,
11414  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:].values,axis=0)
11415  */
11416  {
11417  __Pyx_PyThreadState_declare
11418  __Pyx_PyThreadState_assign
11419  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
11420  __Pyx_XGOTREF(__pyx_t_3);
11421  __Pyx_XGOTREF(__pyx_t_4);
11422  __Pyx_XGOTREF(__pyx_t_5);
11423  /*try:*/ {
11424 
11425  /* "dtocean.pyx":253
11426  * print ("Reading VIIRS Data: " + self.ifile)
11427  * try:
11428  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:].values, # <<<<<<<<<<<<<<
11429  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:].values,axis=0)
11430  * self.sza = xr.load_dataset(l1b_filepath,group='/geolocation')['solar_zenith'].values
11431  */
11432  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L3_error)
11433  __Pyx_GOTREF(__pyx_t_1);
11434  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L3_error)
11435  __Pyx_GOTREF(__pyx_t_2);
11436  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11437  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_xr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L3_error)
11438  __Pyx_GOTREF(__pyx_t_1);
11439  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 253, __pyx_L3_error)
11440  __Pyx_GOTREF(__pyx_t_6);
11441  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11442  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L3_error)
11443  __Pyx_GOTREF(__pyx_t_1);
11444  __Pyx_INCREF(__pyx_v_l1b_filepath);
11445  __Pyx_GIVEREF(__pyx_v_l1b_filepath);
11446  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_l1b_filepath);
11447  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 253, __pyx_L3_error)
11448  __Pyx_GOTREF(__pyx_t_7);
11449  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_group, __pyx_kp_u_reflectance_2) < 0) __PYX_ERR(0, 253, __pyx_L3_error)
11450  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 253, __pyx_L3_error)
11451  __Pyx_GOTREF(__pyx_t_8);
11452  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11453  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11454  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11455  __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_t_8, __pyx_n_u_toa_reflectance); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 253, __pyx_L3_error)
11456  __Pyx_GOTREF(__pyx_t_7);
11457  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11458  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_tuple__13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 253, __pyx_L3_error)
11459  __Pyx_GOTREF(__pyx_t_8);
11460  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11461  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 253, __pyx_L3_error)
11462  __Pyx_GOTREF(__pyx_t_7);
11463  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11464 
11465  /* "dtocean.pyx":254
11466  * try:
11467  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:].values,
11468  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:].values,axis=0) # <<<<<<<<<<<<<<
11469  * self.sza = xr.load_dataset(l1b_filepath,group='/geolocation')['solar_zenith'].values
11470  * self.vza = xr.load_dataset(l1b_filepath,group='/geolocation')['sensor_zenith'].values
11471  */
11472  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_xr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 254, __pyx_L3_error)
11473  __Pyx_GOTREF(__pyx_t_8);
11474  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L3_error)
11475  __Pyx_GOTREF(__pyx_t_1);
11476  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11477  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 254, __pyx_L3_error)
11478  __Pyx_GOTREF(__pyx_t_8);
11479  __Pyx_INCREF(__pyx_v_l1b_filepath);
11480  __Pyx_GIVEREF(__pyx_v_l1b_filepath);
11481  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_l1b_filepath);
11482  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 254, __pyx_L3_error)
11483  __Pyx_GOTREF(__pyx_t_6);
11484  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_group, __pyx_kp_u_reflectance_2) < 0) __PYX_ERR(0, 254, __pyx_L3_error)
11485  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 254, __pyx_L3_error)
11486  __Pyx_GOTREF(__pyx_t_9);
11487  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11488  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11489  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11490  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_9, __pyx_n_u_toa_reflectance); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 254, __pyx_L3_error)
11491  __Pyx_GOTREF(__pyx_t_6);
11492  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11493  __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_tuple__15); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 254, __pyx_L3_error)
11494  __Pyx_GOTREF(__pyx_t_9);
11495  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11496  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 254, __pyx_L3_error)
11497  __Pyx_GOTREF(__pyx_t_6);
11498  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11499 
11500  /* "dtocean.pyx":253
11501  * print ("Reading VIIRS Data: " + self.ifile)
11502  * try:
11503  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:].values, # <<<<<<<<<<<<<<
11504  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:].values,axis=0)
11505  * self.sza = xr.load_dataset(l1b_filepath,group='/geolocation')['solar_zenith'].values
11506  */
11507  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 253, __pyx_L3_error)
11508  __Pyx_GOTREF(__pyx_t_9);
11509  __Pyx_GIVEREF(__pyx_t_7);
11510  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7);
11511  __Pyx_GIVEREF(__pyx_t_6);
11512  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6);
11513  __pyx_t_7 = 0;
11514  __pyx_t_6 = 0;
11515 
11516  /* "dtocean.pyx":254
11517  * try:
11518  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:].values,
11519  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:].values,axis=0) # <<<<<<<<<<<<<<
11520  * self.sza = xr.load_dataset(l1b_filepath,group='/geolocation')['solar_zenith'].values
11521  * self.vza = xr.load_dataset(l1b_filepath,group='/geolocation')['sensor_zenith'].values
11522  */
11523  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 254, __pyx_L3_error)
11524  __Pyx_GOTREF(__pyx_t_6);
11525  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 254, __pyx_L3_error)
11526 
11527  /* "dtocean.pyx":253
11528  * print ("Reading VIIRS Data: " + self.ifile)
11529  * try:
11530  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:].values, # <<<<<<<<<<<<<<
11531  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:].values,axis=0)
11532  * self.sza = xr.load_dataset(l1b_filepath,group='/geolocation')['solar_zenith'].values
11533  */
11534  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 253, __pyx_L3_error)
11535  __Pyx_GOTREF(__pyx_t_7);
11536  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11537  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11538  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11539  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rfl, __pyx_t_7) < 0) __PYX_ERR(0, 253, __pyx_L3_error)
11540  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11541 
11542  /* "dtocean.pyx":255
11543  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:].values,
11544  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:].values,axis=0)
11545  * self.sza = xr.load_dataset(l1b_filepath,group='/geolocation')['solar_zenith'].values # <<<<<<<<<<<<<<
11546  * self.vza = xr.load_dataset(l1b_filepath,group='/geolocation')['sensor_zenith'].values
11547  * self.raa = xr.load_dataset(l1b_filepath,group='/geolocation')['relative_azimuth'].values
11548  */
11549  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_xr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 255, __pyx_L3_error)
11550  __Pyx_GOTREF(__pyx_t_7);
11551  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 255, __pyx_L3_error)
11552  __Pyx_GOTREF(__pyx_t_6);
11553  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11554  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 255, __pyx_L3_error)
11555  __Pyx_GOTREF(__pyx_t_7);
11556  __Pyx_INCREF(__pyx_v_l1b_filepath);
11557  __Pyx_GIVEREF(__pyx_v_l1b_filepath);
11558  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_l1b_filepath);
11559  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 255, __pyx_L3_error)
11560  __Pyx_GOTREF(__pyx_t_9);
11561  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_group, __pyx_kp_u_geolocation) < 0) __PYX_ERR(0, 255, __pyx_L3_error)
11562  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 255, __pyx_L3_error)
11563  __Pyx_GOTREF(__pyx_t_2);
11564  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11565  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11566  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11567  __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_solar_zenith); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 255, __pyx_L3_error)
11568  __Pyx_GOTREF(__pyx_t_9);
11569  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11570  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 255, __pyx_L3_error)
11571  __Pyx_GOTREF(__pyx_t_2);
11572  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11573  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sza, __pyx_t_2) < 0) __PYX_ERR(0, 255, __pyx_L3_error)
11574  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11575 
11576  /* "dtocean.pyx":256
11577  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:].values,axis=0)
11578  * self.sza = xr.load_dataset(l1b_filepath,group='/geolocation')['solar_zenith'].values
11579  * self.vza = xr.load_dataset(l1b_filepath,group='/geolocation')['sensor_zenith'].values # <<<<<<<<<<<<<<
11580  * self.raa = xr.load_dataset(l1b_filepath,group='/geolocation')['relative_azimuth'].values
11581  * self.lat = xr.load_dataset(l1b_filepath,group='/navigation_data')['latitude'].values
11582  */
11583  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_xr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 256, __pyx_L3_error)
11584  __Pyx_GOTREF(__pyx_t_2);
11585  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 256, __pyx_L3_error)
11586  __Pyx_GOTREF(__pyx_t_9);
11587  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11588  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 256, __pyx_L3_error)
11589  __Pyx_GOTREF(__pyx_t_2);
11590  __Pyx_INCREF(__pyx_v_l1b_filepath);
11591  __Pyx_GIVEREF(__pyx_v_l1b_filepath);
11592  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_l1b_filepath);
11593  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 256, __pyx_L3_error)
11594  __Pyx_GOTREF(__pyx_t_7);
11595  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_group, __pyx_kp_u_geolocation) < 0) __PYX_ERR(0, 256, __pyx_L3_error)
11596  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 256, __pyx_L3_error)
11597  __Pyx_GOTREF(__pyx_t_6);
11598  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11599  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11600  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11601  __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_sensor_zenith); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 256, __pyx_L3_error)
11602  __Pyx_GOTREF(__pyx_t_7);
11603  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11604  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 256, __pyx_L3_error)
11605  __Pyx_GOTREF(__pyx_t_6);
11606  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11607  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_vza, __pyx_t_6) < 0) __PYX_ERR(0, 256, __pyx_L3_error)
11608  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11609 
11610  /* "dtocean.pyx":257
11611  * self.sza = xr.load_dataset(l1b_filepath,group='/geolocation')['solar_zenith'].values
11612  * self.vza = xr.load_dataset(l1b_filepath,group='/geolocation')['sensor_zenith'].values
11613  * self.raa = xr.load_dataset(l1b_filepath,group='/geolocation')['relative_azimuth'].values # <<<<<<<<<<<<<<
11614  * self.lat = xr.load_dataset(l1b_filepath,group='/navigation_data')['latitude'].values
11615  * self.lon = xr.load_dataset(l1b_filepath,group='/navigation_data')['longitude'].values
11616  */
11617  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_xr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 257, __pyx_L3_error)
11618  __Pyx_GOTREF(__pyx_t_6);
11619  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 257, __pyx_L3_error)
11620  __Pyx_GOTREF(__pyx_t_7);
11621  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11622  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 257, __pyx_L3_error)
11623  __Pyx_GOTREF(__pyx_t_6);
11624  __Pyx_INCREF(__pyx_v_l1b_filepath);
11625  __Pyx_GIVEREF(__pyx_v_l1b_filepath);
11626  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_l1b_filepath);
11627  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 257, __pyx_L3_error)
11628  __Pyx_GOTREF(__pyx_t_2);
11629  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_group, __pyx_kp_u_geolocation) < 0) __PYX_ERR(0, 257, __pyx_L3_error)
11630  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 257, __pyx_L3_error)
11631  __Pyx_GOTREF(__pyx_t_9);
11632  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11633  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11634  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11635  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_9, __pyx_n_u_relative_azimuth); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 257, __pyx_L3_error)
11636  __Pyx_GOTREF(__pyx_t_2);
11637  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11638  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 257, __pyx_L3_error)
11639  __Pyx_GOTREF(__pyx_t_9);
11640  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11641  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_raa, __pyx_t_9) < 0) __PYX_ERR(0, 257, __pyx_L3_error)
11642  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11643 
11644  /* "dtocean.pyx":258
11645  * self.vza = xr.load_dataset(l1b_filepath,group='/geolocation')['sensor_zenith'].values
11646  * self.raa = xr.load_dataset(l1b_filepath,group='/geolocation')['relative_azimuth'].values
11647  * self.lat = xr.load_dataset(l1b_filepath,group='/navigation_data')['latitude'].values # <<<<<<<<<<<<<<
11648  * self.lon = xr.load_dataset(l1b_filepath,group='/navigation_data')['longitude'].values
11649  * self.cld = xr.load_dataset(l1b_filepath,group='/ancillary')['cloud_mask'].values
11650  */
11651  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_xr); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 258, __pyx_L3_error)
11652  __Pyx_GOTREF(__pyx_t_9);
11653  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 258, __pyx_L3_error)
11654  __Pyx_GOTREF(__pyx_t_2);
11655  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11656  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 258, __pyx_L3_error)
11657  __Pyx_GOTREF(__pyx_t_9);
11658  __Pyx_INCREF(__pyx_v_l1b_filepath);
11659  __Pyx_GIVEREF(__pyx_v_l1b_filepath);
11660  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_l1b_filepath);
11661  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 258, __pyx_L3_error)
11662  __Pyx_GOTREF(__pyx_t_6);
11663  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_group, __pyx_kp_u_navigation_data) < 0) __PYX_ERR(0, 258, __pyx_L3_error)
11664  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 258, __pyx_L3_error)
11665  __Pyx_GOTREF(__pyx_t_7);
11666  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11667  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11668  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11669  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_7, __pyx_n_u_latitude); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 258, __pyx_L3_error)
11670  __Pyx_GOTREF(__pyx_t_6);
11671  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11672  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 258, __pyx_L3_error)
11673  __Pyx_GOTREF(__pyx_t_7);
11674  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11675  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lat, __pyx_t_7) < 0) __PYX_ERR(0, 258, __pyx_L3_error)
11676  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11677 
11678  /* "dtocean.pyx":259
11679  * self.raa = xr.load_dataset(l1b_filepath,group='/geolocation')['relative_azimuth'].values
11680  * self.lat = xr.load_dataset(l1b_filepath,group='/navigation_data')['latitude'].values
11681  * self.lon = xr.load_dataset(l1b_filepath,group='/navigation_data')['longitude'].values # <<<<<<<<<<<<<<
11682  * self.cld = xr.load_dataset(l1b_filepath,group='/ancillary')['cloud_mask'].values
11683  * self.wnd = xr.load_dataset(l1b_filepath,group='/ancillary')['wind_speed'].values
11684  */
11685  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_xr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 259, __pyx_L3_error)
11686  __Pyx_GOTREF(__pyx_t_7);
11687  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 259, __pyx_L3_error)
11688  __Pyx_GOTREF(__pyx_t_6);
11689  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11690  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 259, __pyx_L3_error)
11691  __Pyx_GOTREF(__pyx_t_7);
11692  __Pyx_INCREF(__pyx_v_l1b_filepath);
11693  __Pyx_GIVEREF(__pyx_v_l1b_filepath);
11694  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_l1b_filepath);
11695  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 259, __pyx_L3_error)
11696  __Pyx_GOTREF(__pyx_t_9);
11697  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_group, __pyx_kp_u_navigation_data) < 0) __PYX_ERR(0, 259, __pyx_L3_error)
11698  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L3_error)
11699  __Pyx_GOTREF(__pyx_t_2);
11700  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11701  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11702  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11703  __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_longitude); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 259, __pyx_L3_error)
11704  __Pyx_GOTREF(__pyx_t_9);
11705  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11706  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L3_error)
11707  __Pyx_GOTREF(__pyx_t_2);
11708  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11709  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lon, __pyx_t_2) < 0) __PYX_ERR(0, 259, __pyx_L3_error)
11710  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11711 
11712  /* "dtocean.pyx":260
11713  * self.lat = xr.load_dataset(l1b_filepath,group='/navigation_data')['latitude'].values
11714  * self.lon = xr.load_dataset(l1b_filepath,group='/navigation_data')['longitude'].values
11715  * self.cld = xr.load_dataset(l1b_filepath,group='/ancillary')['cloud_mask'].values # <<<<<<<<<<<<<<
11716  * self.wnd = xr.load_dataset(l1b_filepath,group='/ancillary')['wind_speed'].values
11717  * self.rfl = np.transpose(self.rfl, (1,2,0))
11718  */
11719  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_xr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L3_error)
11720  __Pyx_GOTREF(__pyx_t_2);
11721  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 260, __pyx_L3_error)
11722  __Pyx_GOTREF(__pyx_t_9);
11723  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11724  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L3_error)
11725  __Pyx_GOTREF(__pyx_t_2);
11726  __Pyx_INCREF(__pyx_v_l1b_filepath);
11727  __Pyx_GIVEREF(__pyx_v_l1b_filepath);
11728  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_l1b_filepath);
11729  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 260, __pyx_L3_error)
11730  __Pyx_GOTREF(__pyx_t_7);
11731  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_group, __pyx_kp_u_ancillary) < 0) __PYX_ERR(0, 260, __pyx_L3_error)
11732  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 260, __pyx_L3_error)
11733  __Pyx_GOTREF(__pyx_t_6);
11734  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11735  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11736  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11737  __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_cloud_mask); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 260, __pyx_L3_error)
11738  __Pyx_GOTREF(__pyx_t_7);
11739  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11740  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 260, __pyx_L3_error)
11741  __Pyx_GOTREF(__pyx_t_6);
11742  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11743  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cld, __pyx_t_6) < 0) __PYX_ERR(0, 260, __pyx_L3_error)
11744  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11745 
11746  /* "dtocean.pyx":261
11747  * self.lon = xr.load_dataset(l1b_filepath,group='/navigation_data')['longitude'].values
11748  * self.cld = xr.load_dataset(l1b_filepath,group='/ancillary')['cloud_mask'].values
11749  * self.wnd = xr.load_dataset(l1b_filepath,group='/ancillary')['wind_speed'].values # <<<<<<<<<<<<<<
11750  * self.rfl = np.transpose(self.rfl, (1,2,0))
11751  * except Exception as inst:
11752  */
11753  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_xr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 261, __pyx_L3_error)
11754  __Pyx_GOTREF(__pyx_t_6);
11755  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 261, __pyx_L3_error)
11756  __Pyx_GOTREF(__pyx_t_7);
11757  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11758  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 261, __pyx_L3_error)
11759  __Pyx_GOTREF(__pyx_t_6);
11760  __Pyx_INCREF(__pyx_v_l1b_filepath);
11761  __Pyx_GIVEREF(__pyx_v_l1b_filepath);
11762  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_l1b_filepath);
11763  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 261, __pyx_L3_error)
11764  __Pyx_GOTREF(__pyx_t_2);
11765  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_group, __pyx_kp_u_ancillary) < 0) __PYX_ERR(0, 261, __pyx_L3_error)
11766  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 261, __pyx_L3_error)
11767  __Pyx_GOTREF(__pyx_t_9);
11768  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11769  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11770  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11771  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_9, __pyx_n_u_wind_speed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 261, __pyx_L3_error)
11772  __Pyx_GOTREF(__pyx_t_2);
11773  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11774  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 261, __pyx_L3_error)
11775  __Pyx_GOTREF(__pyx_t_9);
11776  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11777  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wnd, __pyx_t_9) < 0) __PYX_ERR(0, 261, __pyx_L3_error)
11778  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11779 
11780  /* "dtocean.pyx":262
11781  * self.cld = xr.load_dataset(l1b_filepath,group='/ancillary')['cloud_mask'].values
11782  * self.wnd = xr.load_dataset(l1b_filepath,group='/ancillary')['wind_speed'].values
11783  * self.rfl = np.transpose(self.rfl, (1,2,0)) # <<<<<<<<<<<<<<
11784  * except Exception as inst:
11785  * print(type(inst))
11786  */
11787  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 262, __pyx_L3_error)
11788  __Pyx_GOTREF(__pyx_t_2);
11789  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_transpose); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 262, __pyx_L3_error)
11790  __Pyx_GOTREF(__pyx_t_6);
11791  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11792  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rfl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 262, __pyx_L3_error)
11793  __Pyx_GOTREF(__pyx_t_2);
11794  __pyx_t_7 = NULL;
11795  __pyx_t_10 = 0;
11796  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
11797  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
11798  if (likely(__pyx_t_7)) {
11799  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
11800  __Pyx_INCREF(__pyx_t_7);
11801  __Pyx_INCREF(function);
11802  __Pyx_DECREF_SET(__pyx_t_6, function);
11803  __pyx_t_10 = 1;
11804  }
11805  }
11806  #if CYTHON_FAST_PYCALL
11807  if (PyFunction_Check(__pyx_t_6)) {
11808  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_2, __pyx_tuple__16};
11809  __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 262, __pyx_L3_error)
11810  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
11811  __Pyx_GOTREF(__pyx_t_9);
11812  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11813  } else
11814  #endif
11815  #if CYTHON_FAST_PYCCALL
11816  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
11817  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_2, __pyx_tuple__16};
11818  __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 262, __pyx_L3_error)
11819  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
11820  __Pyx_GOTREF(__pyx_t_9);
11821  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11822  } else
11823  #endif
11824  {
11825  __pyx_t_8 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 262, __pyx_L3_error)
11826  __Pyx_GOTREF(__pyx_t_8);
11827  if (__pyx_t_7) {
11828  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
11829  }
11830  __Pyx_GIVEREF(__pyx_t_2);
11831  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_10, __pyx_t_2);
11832  __Pyx_INCREF(__pyx_tuple__16);
11833  __Pyx_GIVEREF(__pyx_tuple__16);
11834  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_10, __pyx_tuple__16);
11835  __pyx_t_2 = 0;
11836  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 262, __pyx_L3_error)
11837  __Pyx_GOTREF(__pyx_t_9);
11838  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11839  }
11840  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11841  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rfl, __pyx_t_9) < 0) __PYX_ERR(0, 262, __pyx_L3_error)
11842  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11843 
11844  /* "dtocean.pyx":252
11845  * self.ifile = l1b_filepath
11846  * print ("Reading VIIRS Data: " + self.ifile)
11847  * try: # <<<<<<<<<<<<<<
11848  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:].values,
11849  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:].values,axis=0)
11850  */
11851  }
11852  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
11853  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
11854  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
11855  goto __pyx_L8_try_end;
11856  __pyx_L3_error:;
11857  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
11858  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11859  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
11860  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
11861  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
11862  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
11863 
11864  /* "dtocean.pyx":263
11865  * self.wnd = xr.load_dataset(l1b_filepath,group='/ancillary')['wind_speed'].values
11866  * self.rfl = np.transpose(self.rfl, (1,2,0))
11867  * except Exception as inst: # <<<<<<<<<<<<<<
11868  * print(type(inst))
11869  * print(inst)
11870  */
11871  __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
11872  if (__pyx_t_10) {
11873  __Pyx_AddTraceback("dtocean.input.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11874  if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 263, __pyx_L5_except_error)
11875  __Pyx_GOTREF(__pyx_t_9);
11876  __Pyx_GOTREF(__pyx_t_6);
11877  __Pyx_GOTREF(__pyx_t_8);
11878  __Pyx_INCREF(__pyx_t_6);
11879  __pyx_v_inst = __pyx_t_6;
11880  /*try:*/ {
11881 
11882  /* "dtocean.pyx":264
11883  * self.rfl = np.transpose(self.rfl, (1,2,0))
11884  * except Exception as inst:
11885  * print(type(inst)) # <<<<<<<<<<<<<<
11886  * print(inst)
11887  * print ("Unable to read from input file ... exiting")
11888  */
11889  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, ((PyObject *)Py_TYPE(__pyx_v_inst))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 264, __pyx_L14_error)
11890  __Pyx_GOTREF(__pyx_t_2);
11891  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11892 
11893  /* "dtocean.pyx":265
11894  * except Exception as inst:
11895  * print(type(inst))
11896  * print(inst) # <<<<<<<<<<<<<<
11897  * print ("Unable to read from input file ... exiting")
11898  * sys.exit()
11899  */
11900  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v_inst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 265, __pyx_L14_error)
11901  __Pyx_GOTREF(__pyx_t_2);
11902  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11903 
11904  /* "dtocean.pyx":266
11905  * print(type(inst))
11906  * print(inst)
11907  * print ("Unable to read from input file ... exiting") # <<<<<<<<<<<<<<
11908  * sys.exit()
11909  *
11910  */
11911  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L14_error)
11912  __Pyx_GOTREF(__pyx_t_2);
11913  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11914 
11915  /* "dtocean.pyx":267
11916  * print(inst)
11917  * print ("Unable to read from input file ... exiting")
11918  * sys.exit() # <<<<<<<<<<<<<<
11919  *
11920  *
11921  */
11922  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 267, __pyx_L14_error)
11923  __Pyx_GOTREF(__pyx_t_7);
11924  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L14_error)
11925  __Pyx_GOTREF(__pyx_t_1);
11926  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11927  __pyx_t_7 = NULL;
11928  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
11929  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
11930  if (likely(__pyx_t_7)) {
11931  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
11932  __Pyx_INCREF(__pyx_t_7);
11933  __Pyx_INCREF(function);
11934  __Pyx_DECREF_SET(__pyx_t_1, function);
11935  }
11936  }
11937  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
11938  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
11939  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 267, __pyx_L14_error)
11940  __Pyx_GOTREF(__pyx_t_2);
11941  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11942  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11943  }
11944 
11945  /* "dtocean.pyx":263
11946  * self.wnd = xr.load_dataset(l1b_filepath,group='/ancillary')['wind_speed'].values
11947  * self.rfl = np.transpose(self.rfl, (1,2,0))
11948  * except Exception as inst: # <<<<<<<<<<<<<<
11949  * print(type(inst))
11950  * print(inst)
11951  */
11952  /*finally:*/ {
11953  /*normal exit:*/{
11954  __Pyx_DECREF(__pyx_v_inst);
11955  __pyx_v_inst = NULL;
11956  goto __pyx_L15;
11957  }
11958  __pyx_L14_error:;
11959  /*exception exit:*/{
11960  __Pyx_PyThreadState_declare
11961  __Pyx_PyThreadState_assign
11962  __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
11963  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
11964  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11965  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
11966  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
11967  if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
11968  __Pyx_XGOTREF(__pyx_t_13);
11969  __Pyx_XGOTREF(__pyx_t_14);
11970  __Pyx_XGOTREF(__pyx_t_15);
11971  __Pyx_XGOTREF(__pyx_t_16);
11972  __Pyx_XGOTREF(__pyx_t_17);
11973  __Pyx_XGOTREF(__pyx_t_18);
11974  __pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
11975  {
11976  __Pyx_DECREF(__pyx_v_inst);
11977  __pyx_v_inst = NULL;
11978  }
11979  if (PY_MAJOR_VERSION >= 3) {
11980  __Pyx_XGIVEREF(__pyx_t_16);
11981  __Pyx_XGIVEREF(__pyx_t_17);
11982  __Pyx_XGIVEREF(__pyx_t_18);
11983  __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
11984  }
11985  __Pyx_XGIVEREF(__pyx_t_13);
11986  __Pyx_XGIVEREF(__pyx_t_14);
11987  __Pyx_XGIVEREF(__pyx_t_15);
11988  __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
11989  __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
11990  __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
11991  goto __pyx_L5_except_error;
11992  }
11993  __pyx_L15:;
11994  }
11995  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
11996  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
11997  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
11998  goto __pyx_L4_exception_handled;
11999  }
12000  goto __pyx_L5_except_error;
12001  __pyx_L5_except_error:;
12002 
12003  /* "dtocean.pyx":252
12004  * self.ifile = l1b_filepath
12005  * print ("Reading VIIRS Data: " + self.ifile)
12006  * try: # <<<<<<<<<<<<<<
12007  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:].values,
12008  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:].values,axis=0)
12009  */
12010  __Pyx_XGIVEREF(__pyx_t_3);
12011  __Pyx_XGIVEREF(__pyx_t_4);
12012  __Pyx_XGIVEREF(__pyx_t_5);
12013  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
12014  goto __pyx_L1_error;
12015  __pyx_L4_exception_handled:;
12016  __Pyx_XGIVEREF(__pyx_t_3);
12017  __Pyx_XGIVEREF(__pyx_t_4);
12018  __Pyx_XGIVEREF(__pyx_t_5);
12019  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
12020  __pyx_L8_try_end:;
12021  }
12022 
12023  /* "dtocean.pyx":249
12024  * class input(object):
12025  *
12026  * def __init__(self, l1b_filepath): # <<<<<<<<<<<<<<
12027  * self.ifile = l1b_filepath
12028  * print ("Reading VIIRS Data: " + self.ifile)
12029  */
12030 
12031  /* function exit code */
12032  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12033  goto __pyx_L0;
12034  __pyx_L1_error:;
12035  __Pyx_XDECREF(__pyx_t_1);
12036  __Pyx_XDECREF(__pyx_t_2);
12037  __Pyx_XDECREF(__pyx_t_6);
12038  __Pyx_XDECREF(__pyx_t_7);
12039  __Pyx_XDECREF(__pyx_t_8);
12040  __Pyx_XDECREF(__pyx_t_9);
12041  __Pyx_AddTraceback("dtocean.input.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12042  __pyx_r = NULL;
12043  __pyx_L0:;
12044  __Pyx_XDECREF(__pyx_v_inst);
12045  __Pyx_XGIVEREF(__pyx_r);
12046  __Pyx_RefNannyFinishContext();
12047  return __pyx_r;
12048 }
12049 
12050 /* "dtocean.pyx":272
12051  * class output(object):
12052  *
12053  * def __init__(self, out_filepath, ydim, xdim): # <<<<<<<<<<<<<<
12054  * self.ofile = out_filepath
12055  * self.ydim = ydim
12056  */
12057 
12058 /* Python wrapper */
12059 static PyObject *__pyx_pw_7dtocean_6output_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12060 static PyMethodDef __pyx_mdef_7dtocean_6output_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7dtocean_6output_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
12061 static PyObject *__pyx_pw_7dtocean_6output_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12062  PyObject *__pyx_v_self = 0;
12063  PyObject *__pyx_v_out_filepath = 0;
12064  PyObject *__pyx_v_ydim = 0;
12065  PyObject *__pyx_v_xdim = 0;
12066  int __pyx_lineno = 0;
12067  const char *__pyx_filename = NULL;
12068  int __pyx_clineno = 0;
12069  PyObject *__pyx_r = 0;
12070  __Pyx_RefNannyDeclarations
12071  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
12072  {
12073  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_out_filepath,&__pyx_n_s_ydim,&__pyx_n_s_xdim,0};
12074  PyObject* values[4] = {0,0,0,0};
12075  if (unlikely(__pyx_kwds)) {
12076  Py_ssize_t kw_args;
12077  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12078  switch (pos_args) {
12079  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
12080  CYTHON_FALLTHROUGH;
12081  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
12082  CYTHON_FALLTHROUGH;
12083  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12084  CYTHON_FALLTHROUGH;
12085  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12086  CYTHON_FALLTHROUGH;
12087  case 0: break;
12088  default: goto __pyx_L5_argtuple_error;
12089  }
12090  kw_args = PyDict_Size(__pyx_kwds);
12091  switch (pos_args) {
12092  case 0:
12093  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
12094  else goto __pyx_L5_argtuple_error;
12095  CYTHON_FALLTHROUGH;
12096  case 1:
12097  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out_filepath)) != 0)) kw_args--;
12098  else {
12099  __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 272, __pyx_L3_error)
12100  }
12101  CYTHON_FALLTHROUGH;
12102  case 2:
12103  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ydim)) != 0)) kw_args--;
12104  else {
12105  __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 272, __pyx_L3_error)
12106  }
12107  CYTHON_FALLTHROUGH;
12108  case 3:
12109  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xdim)) != 0)) kw_args--;
12110  else {
12111  __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 272, __pyx_L3_error)
12112  }
12113  }
12114  if (unlikely(kw_args > 0)) {
12115  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 272, __pyx_L3_error)
12116  }
12117  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
12118  goto __pyx_L5_argtuple_error;
12119  } else {
12120  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12121  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12122  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
12123  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
12124  }
12125  __pyx_v_self = values[0];
12126  __pyx_v_out_filepath = values[1];
12127  __pyx_v_ydim = values[2];
12128  __pyx_v_xdim = values[3];
12129  }
12130  goto __pyx_L4_argument_unpacking_done;
12131  __pyx_L5_argtuple_error:;
12132  __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 272, __pyx_L3_error)
12133  __pyx_L3_error:;
12134  __Pyx_AddTraceback("dtocean.output.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12135  __Pyx_RefNannyFinishContext();
12136  return NULL;
12137  __pyx_L4_argument_unpacking_done:;
12138  __pyx_r = __pyx_pf_7dtocean_6output___init__(__pyx_self, __pyx_v_self, __pyx_v_out_filepath, __pyx_v_ydim, __pyx_v_xdim);
12139 
12140  /* function exit code */
12141  __Pyx_RefNannyFinishContext();
12142  return __pyx_r;
12143 }
12144 
12145 static PyObject *__pyx_pf_7dtocean_6output___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_out_filepath, PyObject *__pyx_v_ydim, PyObject *__pyx_v_xdim) {
12146  PyObject *__pyx_v_inst = NULL;
12147  PyObject *__pyx_r = NULL;
12148  __Pyx_RefNannyDeclarations
12149  PyObject *__pyx_t_1 = NULL;
12150  PyObject *__pyx_t_2 = NULL;
12151  PyObject *__pyx_t_3 = NULL;
12152  PyObject *__pyx_t_4 = NULL;
12153  PyObject *__pyx_t_5 = NULL;
12154  PyObject *__pyx_t_6 = NULL;
12155  PyObject *__pyx_t_7 = NULL;
12156  PyObject *__pyx_t_8 = NULL;
12157  int __pyx_t_9;
12158  PyObject *__pyx_t_10 = NULL;
12159  int __pyx_t_11;
12160  char const *__pyx_t_12;
12161  PyObject *__pyx_t_13 = NULL;
12162  PyObject *__pyx_t_14 = NULL;
12163  PyObject *__pyx_t_15 = NULL;
12164  PyObject *__pyx_t_16 = NULL;
12165  PyObject *__pyx_t_17 = NULL;
12166  PyObject *__pyx_t_18 = NULL;
12167  int __pyx_lineno = 0;
12168  const char *__pyx_filename = NULL;
12169  int __pyx_clineno = 0;
12170  __Pyx_RefNannySetupContext("__init__", 0);
12171 
12172  /* "dtocean.pyx":273
12173  *
12174  * def __init__(self, out_filepath, ydim, xdim):
12175  * self.ofile = out_filepath # <<<<<<<<<<<<<<
12176  * self.ydim = ydim
12177  * self.xdim = xdim
12178  */
12179  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ofile, __pyx_v_out_filepath) < 0) __PYX_ERR(0, 273, __pyx_L1_error)
12180 
12181  /* "dtocean.pyx":274
12182  * def __init__(self, out_filepath, ydim, xdim):
12183  * self.ofile = out_filepath
12184  * self.ydim = ydim # <<<<<<<<<<<<<<
12185  * self.xdim = xdim
12186  * try:
12187  */
12188  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ydim, __pyx_v_ydim) < 0) __PYX_ERR(0, 274, __pyx_L1_error)
12189 
12190  /* "dtocean.pyx":275
12191  * self.ofile = out_filepath
12192  * self.ydim = ydim
12193  * self.xdim = xdim # <<<<<<<<<<<<<<
12194  * try:
12195  * self.rfl = xr.DataArray(np.zeros((NWL,ydim,xdim)),dims=('wl','y', 'x'))
12196  */
12197  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_xdim, __pyx_v_xdim) < 0) __PYX_ERR(0, 275, __pyx_L1_error)
12198 
12199  /* "dtocean.pyx":276
12200  * self.ydim = ydim
12201  * self.xdim = xdim
12202  * try: # <<<<<<<<<<<<<<
12203  * self.rfl = xr.DataArray(np.zeros((NWL,ydim,xdim)),dims=('wl','y', 'x'))
12204  * self.lat = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12205  */
12206  {
12207  __Pyx_PyThreadState_declare
12208  __Pyx_PyThreadState_assign
12209  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
12210  __Pyx_XGOTREF(__pyx_t_1);
12211  __Pyx_XGOTREF(__pyx_t_2);
12212  __Pyx_XGOTREF(__pyx_t_3);
12213  /*try:*/ {
12214 
12215  /* "dtocean.pyx":277
12216  * self.xdim = xdim
12217  * try:
12218  * self.rfl = xr.DataArray(np.zeros((NWL,ydim,xdim)),dims=('wl','y', 'x')) # <<<<<<<<<<<<<<
12219  * self.lat = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12220  * self.lon = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12221  */
12222  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_xr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 277, __pyx_L3_error)
12223  __Pyx_GOTREF(__pyx_t_4);
12224  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DataArray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 277, __pyx_L3_error)
12225  __Pyx_GOTREF(__pyx_t_5);
12226  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12227  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L3_error)
12228  __Pyx_GOTREF(__pyx_t_6);
12229  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 277, __pyx_L3_error)
12230  __Pyx_GOTREF(__pyx_t_7);
12231  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12232  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NWL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L3_error)
12233  __Pyx_GOTREF(__pyx_t_6);
12234  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 277, __pyx_L3_error)
12235  __Pyx_GOTREF(__pyx_t_8);
12236  __Pyx_GIVEREF(__pyx_t_6);
12237  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
12238  __Pyx_INCREF(__pyx_v_ydim);
12239  __Pyx_GIVEREF(__pyx_v_ydim);
12240  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ydim);
12241  __Pyx_INCREF(__pyx_v_xdim);
12242  __Pyx_GIVEREF(__pyx_v_xdim);
12243  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_xdim);
12244  __pyx_t_6 = 0;
12245  __pyx_t_6 = NULL;
12246  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
12247  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
12248  if (likely(__pyx_t_6)) {
12249  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
12250  __Pyx_INCREF(__pyx_t_6);
12251  __Pyx_INCREF(function);
12252  __Pyx_DECREF_SET(__pyx_t_7, function);
12253  }
12254  }
12255  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
12256  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12257  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12258  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 277, __pyx_L3_error)
12259  __Pyx_GOTREF(__pyx_t_4);
12260  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12261  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 277, __pyx_L3_error)
12262  __Pyx_GOTREF(__pyx_t_7);
12263  __Pyx_GIVEREF(__pyx_t_4);
12264  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
12265  __pyx_t_4 = 0;
12266  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 277, __pyx_L3_error)
12267  __Pyx_GOTREF(__pyx_t_4);
12268  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dims, __pyx_tuple__18) < 0) __PYX_ERR(0, 277, __pyx_L3_error)
12269  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 277, __pyx_L3_error)
12270  __Pyx_GOTREF(__pyx_t_8);
12271  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12272  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12273  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12274  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rfl, __pyx_t_8) < 0) __PYX_ERR(0, 277, __pyx_L3_error)
12275  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12276 
12277  /* "dtocean.pyx":278
12278  * try:
12279  * self.rfl = xr.DataArray(np.zeros((NWL,ydim,xdim)),dims=('wl','y', 'x'))
12280  * self.lat = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x')) # <<<<<<<<<<<<<<
12281  * self.lon = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12282  * self.sza = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12283  */
12284  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_xr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 278, __pyx_L3_error)
12285  __Pyx_GOTREF(__pyx_t_8);
12286  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_DataArray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 278, __pyx_L3_error)
12287  __Pyx_GOTREF(__pyx_t_4);
12288  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12289  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 278, __pyx_L3_error)
12290  __Pyx_GOTREF(__pyx_t_7);
12291  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 278, __pyx_L3_error)
12292  __Pyx_GOTREF(__pyx_t_5);
12293  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12294  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 278, __pyx_L3_error)
12295  __Pyx_GOTREF(__pyx_t_7);
12296  __Pyx_INCREF(__pyx_v_ydim);
12297  __Pyx_GIVEREF(__pyx_v_ydim);
12298  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_ydim);
12299  __Pyx_INCREF(__pyx_v_xdim);
12300  __Pyx_GIVEREF(__pyx_v_xdim);
12301  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_xdim);
12302  __pyx_t_6 = NULL;
12303  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
12304  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
12305  if (likely(__pyx_t_6)) {
12306  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
12307  __Pyx_INCREF(__pyx_t_6);
12308  __Pyx_INCREF(function);
12309  __Pyx_DECREF_SET(__pyx_t_5, function);
12310  }
12311  }
12312  __pyx_t_8 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
12313  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12314  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12315  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 278, __pyx_L3_error)
12316  __Pyx_GOTREF(__pyx_t_8);
12317  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12318  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 278, __pyx_L3_error)
12319  __Pyx_GOTREF(__pyx_t_5);
12320  __Pyx_GIVEREF(__pyx_t_8);
12321  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8);
12322  __pyx_t_8 = 0;
12323  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 278, __pyx_L3_error)
12324  __Pyx_GOTREF(__pyx_t_8);
12325  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dims, __pyx_tuple__19) < 0) __PYX_ERR(0, 278, __pyx_L3_error)
12326  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 278, __pyx_L3_error)
12327  __Pyx_GOTREF(__pyx_t_7);
12328  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12329  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12330  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12331  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lat, __pyx_t_7) < 0) __PYX_ERR(0, 278, __pyx_L3_error)
12332  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12333 
12334  /* "dtocean.pyx":279
12335  * self.rfl = xr.DataArray(np.zeros((NWL,ydim,xdim)),dims=('wl','y', 'x'))
12336  * self.lat = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12337  * self.lon = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x')) # <<<<<<<<<<<<<<
12338  * self.sza = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12339  * self.vza = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12340  */
12341  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_xr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 279, __pyx_L3_error)
12342  __Pyx_GOTREF(__pyx_t_7);
12343  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_DataArray); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 279, __pyx_L3_error)
12344  __Pyx_GOTREF(__pyx_t_8);
12345  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12346  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 279, __pyx_L3_error)
12347  __Pyx_GOTREF(__pyx_t_5);
12348  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 279, __pyx_L3_error)
12349  __Pyx_GOTREF(__pyx_t_4);
12350  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12351  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 279, __pyx_L3_error)
12352  __Pyx_GOTREF(__pyx_t_5);
12353  __Pyx_INCREF(__pyx_v_ydim);
12354  __Pyx_GIVEREF(__pyx_v_ydim);
12355  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ydim);
12356  __Pyx_INCREF(__pyx_v_xdim);
12357  __Pyx_GIVEREF(__pyx_v_xdim);
12358  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_xdim);
12359  __pyx_t_6 = NULL;
12360  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
12361  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
12362  if (likely(__pyx_t_6)) {
12363  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
12364  __Pyx_INCREF(__pyx_t_6);
12365  __Pyx_INCREF(function);
12366  __Pyx_DECREF_SET(__pyx_t_4, function);
12367  }
12368  }
12369  __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
12370  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12371  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12372  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 279, __pyx_L3_error)
12373  __Pyx_GOTREF(__pyx_t_7);
12374  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12375  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 279, __pyx_L3_error)
12376  __Pyx_GOTREF(__pyx_t_4);
12377  __Pyx_GIVEREF(__pyx_t_7);
12378  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7);
12379  __pyx_t_7 = 0;
12380  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 279, __pyx_L3_error)
12381  __Pyx_GOTREF(__pyx_t_7);
12382  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dims, __pyx_tuple__19) < 0) __PYX_ERR(0, 279, __pyx_L3_error)
12383  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 279, __pyx_L3_error)
12384  __Pyx_GOTREF(__pyx_t_5);
12385  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12386  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12387  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12388  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lon, __pyx_t_5) < 0) __PYX_ERR(0, 279, __pyx_L3_error)
12389  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12390 
12391  /* "dtocean.pyx":280
12392  * self.lat = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12393  * self.lon = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12394  * self.sza = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x')) # <<<<<<<<<<<<<<
12395  * self.vza = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12396  * self.raa = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12397  */
12398  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_xr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 280, __pyx_L3_error)
12399  __Pyx_GOTREF(__pyx_t_5);
12400  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_DataArray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 280, __pyx_L3_error)
12401  __Pyx_GOTREF(__pyx_t_7);
12402  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12403  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L3_error)
12404  __Pyx_GOTREF(__pyx_t_4);
12405  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 280, __pyx_L3_error)
12406  __Pyx_GOTREF(__pyx_t_8);
12407  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12408  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L3_error)
12409  __Pyx_GOTREF(__pyx_t_4);
12410  __Pyx_INCREF(__pyx_v_ydim);
12411  __Pyx_GIVEREF(__pyx_v_ydim);
12412  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_ydim);
12413  __Pyx_INCREF(__pyx_v_xdim);
12414  __Pyx_GIVEREF(__pyx_v_xdim);
12415  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_xdim);
12416  __pyx_t_6 = NULL;
12417  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
12418  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
12419  if (likely(__pyx_t_6)) {
12420  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
12421  __Pyx_INCREF(__pyx_t_6);
12422  __Pyx_INCREF(function);
12423  __Pyx_DECREF_SET(__pyx_t_8, function);
12424  }
12425  }
12426  __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_4);
12427  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12428  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12429  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 280, __pyx_L3_error)
12430  __Pyx_GOTREF(__pyx_t_5);
12431  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12432  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 280, __pyx_L3_error)
12433  __Pyx_GOTREF(__pyx_t_8);
12434  __Pyx_GIVEREF(__pyx_t_5);
12435  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
12436  __pyx_t_5 = 0;
12437  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 280, __pyx_L3_error)
12438  __Pyx_GOTREF(__pyx_t_5);
12439  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dims, __pyx_tuple__19) < 0) __PYX_ERR(0, 280, __pyx_L3_error)
12440  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L3_error)
12441  __Pyx_GOTREF(__pyx_t_4);
12442  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12443  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12444  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12445  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sza, __pyx_t_4) < 0) __PYX_ERR(0, 280, __pyx_L3_error)
12446  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12447 
12448  /* "dtocean.pyx":281
12449  * self.lon = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12450  * self.sza = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12451  * self.vza = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x')) # <<<<<<<<<<<<<<
12452  * self.raa = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12453  * self.wnd = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12454  */
12455  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_xr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 281, __pyx_L3_error)
12456  __Pyx_GOTREF(__pyx_t_4);
12457  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DataArray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 281, __pyx_L3_error)
12458  __Pyx_GOTREF(__pyx_t_5);
12459  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12460  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 281, __pyx_L3_error)
12461  __Pyx_GOTREF(__pyx_t_8);
12462  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 281, __pyx_L3_error)
12463  __Pyx_GOTREF(__pyx_t_7);
12464  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12465  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 281, __pyx_L3_error)
12466  __Pyx_GOTREF(__pyx_t_8);
12467  __Pyx_INCREF(__pyx_v_ydim);
12468  __Pyx_GIVEREF(__pyx_v_ydim);
12469  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_ydim);
12470  __Pyx_INCREF(__pyx_v_xdim);
12471  __Pyx_GIVEREF(__pyx_v_xdim);
12472  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_xdim);
12473  __pyx_t_6 = NULL;
12474  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
12475  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
12476  if (likely(__pyx_t_6)) {
12477  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
12478  __Pyx_INCREF(__pyx_t_6);
12479  __Pyx_INCREF(function);
12480  __Pyx_DECREF_SET(__pyx_t_7, function);
12481  }
12482  }
12483  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
12484  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12485  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12486  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 281, __pyx_L3_error)
12487  __Pyx_GOTREF(__pyx_t_4);
12488  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12489  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 281, __pyx_L3_error)
12490  __Pyx_GOTREF(__pyx_t_7);
12491  __Pyx_GIVEREF(__pyx_t_4);
12492  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
12493  __pyx_t_4 = 0;
12494  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 281, __pyx_L3_error)
12495  __Pyx_GOTREF(__pyx_t_4);
12496  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dims, __pyx_tuple__19) < 0) __PYX_ERR(0, 281, __pyx_L3_error)
12497  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 281, __pyx_L3_error)
12498  __Pyx_GOTREF(__pyx_t_8);
12499  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12500  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12501  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12502  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_vza, __pyx_t_8) < 0) __PYX_ERR(0, 281, __pyx_L3_error)
12503  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12504 
12505  /* "dtocean.pyx":282
12506  * self.sza = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12507  * self.vza = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12508  * self.raa = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x')) # <<<<<<<<<<<<<<
12509  * self.wnd = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12510  * self.aot = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12511  */
12512  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_xr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 282, __pyx_L3_error)
12513  __Pyx_GOTREF(__pyx_t_8);
12514  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_DataArray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 282, __pyx_L3_error)
12515  __Pyx_GOTREF(__pyx_t_4);
12516  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12517  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 282, __pyx_L3_error)
12518  __Pyx_GOTREF(__pyx_t_7);
12519  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 282, __pyx_L3_error)
12520  __Pyx_GOTREF(__pyx_t_5);
12521  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12522  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 282, __pyx_L3_error)
12523  __Pyx_GOTREF(__pyx_t_7);
12524  __Pyx_INCREF(__pyx_v_ydim);
12525  __Pyx_GIVEREF(__pyx_v_ydim);
12526  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_ydim);
12527  __Pyx_INCREF(__pyx_v_xdim);
12528  __Pyx_GIVEREF(__pyx_v_xdim);
12529  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_xdim);
12530  __pyx_t_6 = NULL;
12531  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
12532  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
12533  if (likely(__pyx_t_6)) {
12534  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
12535  __Pyx_INCREF(__pyx_t_6);
12536  __Pyx_INCREF(function);
12537  __Pyx_DECREF_SET(__pyx_t_5, function);
12538  }
12539  }
12540  __pyx_t_8 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
12541  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12542  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12543  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 282, __pyx_L3_error)
12544  __Pyx_GOTREF(__pyx_t_8);
12545  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12546  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 282, __pyx_L3_error)
12547  __Pyx_GOTREF(__pyx_t_5);
12548  __Pyx_GIVEREF(__pyx_t_8);
12549  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8);
12550  __pyx_t_8 = 0;
12551  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 282, __pyx_L3_error)
12552  __Pyx_GOTREF(__pyx_t_8);
12553  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dims, __pyx_tuple__19) < 0) __PYX_ERR(0, 282, __pyx_L3_error)
12554  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 282, __pyx_L3_error)
12555  __Pyx_GOTREF(__pyx_t_7);
12556  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12557  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12558  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12559  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_raa, __pyx_t_7) < 0) __PYX_ERR(0, 282, __pyx_L3_error)
12560  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12561 
12562  /* "dtocean.pyx":283
12563  * self.vza = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12564  * self.raa = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12565  * self.wnd = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x')) # <<<<<<<<<<<<<<
12566  * self.aot = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12567  * self.fmf = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12568  */
12569  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_xr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 283, __pyx_L3_error)
12570  __Pyx_GOTREF(__pyx_t_7);
12571  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_DataArray); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 283, __pyx_L3_error)
12572  __Pyx_GOTREF(__pyx_t_8);
12573  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12574  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 283, __pyx_L3_error)
12575  __Pyx_GOTREF(__pyx_t_5);
12576  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __pyx_L3_error)
12577  __Pyx_GOTREF(__pyx_t_4);
12578  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12579  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 283, __pyx_L3_error)
12580  __Pyx_GOTREF(__pyx_t_5);
12581  __Pyx_INCREF(__pyx_v_ydim);
12582  __Pyx_GIVEREF(__pyx_v_ydim);
12583  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ydim);
12584  __Pyx_INCREF(__pyx_v_xdim);
12585  __Pyx_GIVEREF(__pyx_v_xdim);
12586  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_xdim);
12587  __pyx_t_6 = NULL;
12588  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
12589  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
12590  if (likely(__pyx_t_6)) {
12591  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
12592  __Pyx_INCREF(__pyx_t_6);
12593  __Pyx_INCREF(function);
12594  __Pyx_DECREF_SET(__pyx_t_4, function);
12595  }
12596  }
12597  __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
12598  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12599  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12600  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 283, __pyx_L3_error)
12601  __Pyx_GOTREF(__pyx_t_7);
12602  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12603  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __pyx_L3_error)
12604  __Pyx_GOTREF(__pyx_t_4);
12605  __Pyx_GIVEREF(__pyx_t_7);
12606  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7);
12607  __pyx_t_7 = 0;
12608  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 283, __pyx_L3_error)
12609  __Pyx_GOTREF(__pyx_t_7);
12610  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dims, __pyx_tuple__19) < 0) __PYX_ERR(0, 283, __pyx_L3_error)
12611  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 283, __pyx_L3_error)
12612  __Pyx_GOTREF(__pyx_t_5);
12613  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12614  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12615  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12616  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wnd, __pyx_t_5) < 0) __PYX_ERR(0, 283, __pyx_L3_error)
12617  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12618 
12619  /* "dtocean.pyx":284
12620  * self.raa = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12621  * self.wnd = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12622  * self.aot = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x')) # <<<<<<<<<<<<<<
12623  * self.fmf = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12624  * self.sse = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12625  */
12626  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_xr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 284, __pyx_L3_error)
12627  __Pyx_GOTREF(__pyx_t_5);
12628  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_DataArray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 284, __pyx_L3_error)
12629  __Pyx_GOTREF(__pyx_t_7);
12630  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12631  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 284, __pyx_L3_error)
12632  __Pyx_GOTREF(__pyx_t_4);
12633  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 284, __pyx_L3_error)
12634  __Pyx_GOTREF(__pyx_t_8);
12635  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12636  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 284, __pyx_L3_error)
12637  __Pyx_GOTREF(__pyx_t_4);
12638  __Pyx_INCREF(__pyx_v_ydim);
12639  __Pyx_GIVEREF(__pyx_v_ydim);
12640  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_ydim);
12641  __Pyx_INCREF(__pyx_v_xdim);
12642  __Pyx_GIVEREF(__pyx_v_xdim);
12643  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_xdim);
12644  __pyx_t_6 = NULL;
12645  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
12646  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
12647  if (likely(__pyx_t_6)) {
12648  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
12649  __Pyx_INCREF(__pyx_t_6);
12650  __Pyx_INCREF(function);
12651  __Pyx_DECREF_SET(__pyx_t_8, function);
12652  }
12653  }
12654  __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_4);
12655  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12656  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12657  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 284, __pyx_L3_error)
12658  __Pyx_GOTREF(__pyx_t_5);
12659  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12660  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 284, __pyx_L3_error)
12661  __Pyx_GOTREF(__pyx_t_8);
12662  __Pyx_GIVEREF(__pyx_t_5);
12663  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
12664  __pyx_t_5 = 0;
12665  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 284, __pyx_L3_error)
12666  __Pyx_GOTREF(__pyx_t_5);
12667  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dims, __pyx_tuple__19) < 0) __PYX_ERR(0, 284, __pyx_L3_error)
12668  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 284, __pyx_L3_error)
12669  __Pyx_GOTREF(__pyx_t_4);
12670  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12671  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12672  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12673  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_aot, __pyx_t_4) < 0) __PYX_ERR(0, 284, __pyx_L3_error)
12674  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12675 
12676  /* "dtocean.pyx":285
12677  * self.wnd = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12678  * self.aot = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12679  * self.fmf = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x')) # <<<<<<<<<<<<<<
12680  * self.sse = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12681  * self.type = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12682  */
12683  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_xr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L3_error)
12684  __Pyx_GOTREF(__pyx_t_4);
12685  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DataArray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 285, __pyx_L3_error)
12686  __Pyx_GOTREF(__pyx_t_5);
12687  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12688  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 285, __pyx_L3_error)
12689  __Pyx_GOTREF(__pyx_t_8);
12690  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 285, __pyx_L3_error)
12691  __Pyx_GOTREF(__pyx_t_7);
12692  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12693  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 285, __pyx_L3_error)
12694  __Pyx_GOTREF(__pyx_t_8);
12695  __Pyx_INCREF(__pyx_v_ydim);
12696  __Pyx_GIVEREF(__pyx_v_ydim);
12697  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_ydim);
12698  __Pyx_INCREF(__pyx_v_xdim);
12699  __Pyx_GIVEREF(__pyx_v_xdim);
12700  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_xdim);
12701  __pyx_t_6 = NULL;
12702  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
12703  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
12704  if (likely(__pyx_t_6)) {
12705  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
12706  __Pyx_INCREF(__pyx_t_6);
12707  __Pyx_INCREF(function);
12708  __Pyx_DECREF_SET(__pyx_t_7, function);
12709  }
12710  }
12711  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
12712  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12713  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12714  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L3_error)
12715  __Pyx_GOTREF(__pyx_t_4);
12716  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12717  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 285, __pyx_L3_error)
12718  __Pyx_GOTREF(__pyx_t_7);
12719  __Pyx_GIVEREF(__pyx_t_4);
12720  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
12721  __pyx_t_4 = 0;
12722  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L3_error)
12723  __Pyx_GOTREF(__pyx_t_4);
12724  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dims, __pyx_tuple__19) < 0) __PYX_ERR(0, 285, __pyx_L3_error)
12725  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 285, __pyx_L3_error)
12726  __Pyx_GOTREF(__pyx_t_8);
12727  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12728  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12729  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12730  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fmf, __pyx_t_8) < 0) __PYX_ERR(0, 285, __pyx_L3_error)
12731  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12732 
12733  /* "dtocean.pyx":286
12734  * self.aot = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12735  * self.fmf = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12736  * self.sse = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x')) # <<<<<<<<<<<<<<
12737  * self.type = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12738  * self.ds = xr.Dataset({'rfl': self.rfl, 'lat': self.lat, 'lon': self.lon,
12739  */
12740  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_xr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 286, __pyx_L3_error)
12741  __Pyx_GOTREF(__pyx_t_8);
12742  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_DataArray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 286, __pyx_L3_error)
12743  __Pyx_GOTREF(__pyx_t_4);
12744  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12745  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 286, __pyx_L3_error)
12746  __Pyx_GOTREF(__pyx_t_7);
12747  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 286, __pyx_L3_error)
12748  __Pyx_GOTREF(__pyx_t_5);
12749  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12750  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 286, __pyx_L3_error)
12751  __Pyx_GOTREF(__pyx_t_7);
12752  __Pyx_INCREF(__pyx_v_ydim);
12753  __Pyx_GIVEREF(__pyx_v_ydim);
12754  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_ydim);
12755  __Pyx_INCREF(__pyx_v_xdim);
12756  __Pyx_GIVEREF(__pyx_v_xdim);
12757  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_xdim);
12758  __pyx_t_6 = NULL;
12759  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
12760  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
12761  if (likely(__pyx_t_6)) {
12762  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
12763  __Pyx_INCREF(__pyx_t_6);
12764  __Pyx_INCREF(function);
12765  __Pyx_DECREF_SET(__pyx_t_5, function);
12766  }
12767  }
12768  __pyx_t_8 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
12769  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12770  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12771  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 286, __pyx_L3_error)
12772  __Pyx_GOTREF(__pyx_t_8);
12773  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12774  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 286, __pyx_L3_error)
12775  __Pyx_GOTREF(__pyx_t_5);
12776  __Pyx_GIVEREF(__pyx_t_8);
12777  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8);
12778  __pyx_t_8 = 0;
12779  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 286, __pyx_L3_error)
12780  __Pyx_GOTREF(__pyx_t_8);
12781  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dims, __pyx_tuple__19) < 0) __PYX_ERR(0, 286, __pyx_L3_error)
12782  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 286, __pyx_L3_error)
12783  __Pyx_GOTREF(__pyx_t_7);
12784  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12785  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12786  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12787  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sse, __pyx_t_7) < 0) __PYX_ERR(0, 286, __pyx_L3_error)
12788  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12789 
12790  /* "dtocean.pyx":287
12791  * self.fmf = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12792  * self.sse = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12793  * self.type = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x')) # <<<<<<<<<<<<<<
12794  * self.ds = xr.Dataset({'rfl': self.rfl, 'lat': self.lat, 'lon': self.lon,
12795  * 'sza': self.sza, 'vza': self.vza, 'raa': self.raa,
12796  */
12797  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_xr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 287, __pyx_L3_error)
12798  __Pyx_GOTREF(__pyx_t_7);
12799  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_DataArray); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 287, __pyx_L3_error)
12800  __Pyx_GOTREF(__pyx_t_8);
12801  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12802  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 287, __pyx_L3_error)
12803  __Pyx_GOTREF(__pyx_t_5);
12804  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L3_error)
12805  __Pyx_GOTREF(__pyx_t_4);
12806  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12807  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 287, __pyx_L3_error)
12808  __Pyx_GOTREF(__pyx_t_5);
12809  __Pyx_INCREF(__pyx_v_ydim);
12810  __Pyx_GIVEREF(__pyx_v_ydim);
12811  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ydim);
12812  __Pyx_INCREF(__pyx_v_xdim);
12813  __Pyx_GIVEREF(__pyx_v_xdim);
12814  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_xdim);
12815  __pyx_t_6 = NULL;
12816  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
12817  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
12818  if (likely(__pyx_t_6)) {
12819  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
12820  __Pyx_INCREF(__pyx_t_6);
12821  __Pyx_INCREF(function);
12822  __Pyx_DECREF_SET(__pyx_t_4, function);
12823  }
12824  }
12825  __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
12826  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12827  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12828  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 287, __pyx_L3_error)
12829  __Pyx_GOTREF(__pyx_t_7);
12830  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12831  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L3_error)
12832  __Pyx_GOTREF(__pyx_t_4);
12833  __Pyx_GIVEREF(__pyx_t_7);
12834  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7);
12835  __pyx_t_7 = 0;
12836  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 287, __pyx_L3_error)
12837  __Pyx_GOTREF(__pyx_t_7);
12838  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dims, __pyx_tuple__19) < 0) __PYX_ERR(0, 287, __pyx_L3_error)
12839  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 287, __pyx_L3_error)
12840  __Pyx_GOTREF(__pyx_t_5);
12841  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12842  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12843  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12844  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_type, __pyx_t_5) < 0) __PYX_ERR(0, 287, __pyx_L3_error)
12845  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12846 
12847  /* "dtocean.pyx":288
12848  * self.sse = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12849  * self.type = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12850  * self.ds = xr.Dataset({'rfl': self.rfl, 'lat': self.lat, 'lon': self.lon, # <<<<<<<<<<<<<<
12851  * 'sza': self.sza, 'vza': self.vza, 'raa': self.raa,
12852  * 'wnd': self.wnd, 'aot': self.aot, 'fmf': self.fmf,
12853  */
12854  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_xr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 288, __pyx_L3_error)
12855  __Pyx_GOTREF(__pyx_t_7);
12856  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_Dataset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 288, __pyx_L3_error)
12857  __Pyx_GOTREF(__pyx_t_4);
12858  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12859  __pyx_t_7 = __Pyx_PyDict_NewPresized(11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 288, __pyx_L3_error)
12860  __Pyx_GOTREF(__pyx_t_7);
12861  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rfl); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 288, __pyx_L3_error)
12862  __Pyx_GOTREF(__pyx_t_8);
12863  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_rfl, __pyx_t_8) < 0) __PYX_ERR(0, 288, __pyx_L3_error)
12864  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12865  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lat); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 288, __pyx_L3_error)
12866  __Pyx_GOTREF(__pyx_t_8);
12867  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_lat, __pyx_t_8) < 0) __PYX_ERR(0, 288, __pyx_L3_error)
12868  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12869  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lon); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 288, __pyx_L3_error)
12870  __Pyx_GOTREF(__pyx_t_8);
12871  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_lon, __pyx_t_8) < 0) __PYX_ERR(0, 288, __pyx_L3_error)
12872  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12873 
12874  /* "dtocean.pyx":289
12875  * self.type = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12876  * self.ds = xr.Dataset({'rfl': self.rfl, 'lat': self.lat, 'lon': self.lon,
12877  * 'sza': self.sza, 'vza': self.vza, 'raa': self.raa, # <<<<<<<<<<<<<<
12878  * 'wnd': self.wnd, 'aot': self.aot, 'fmf': self.fmf,
12879  * 'sse': self.sse, 'type': self.type })
12880  */
12881  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_sza); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 289, __pyx_L3_error)
12882  __Pyx_GOTREF(__pyx_t_8);
12883  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_sza, __pyx_t_8) < 0) __PYX_ERR(0, 288, __pyx_L3_error)
12884  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12885  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_vza); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 289, __pyx_L3_error)
12886  __Pyx_GOTREF(__pyx_t_8);
12887  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_vza, __pyx_t_8) < 0) __PYX_ERR(0, 288, __pyx_L3_error)
12888  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12889  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_raa); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 289, __pyx_L3_error)
12890  __Pyx_GOTREF(__pyx_t_8);
12891  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_raa, __pyx_t_8) < 0) __PYX_ERR(0, 288, __pyx_L3_error)
12892  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12893 
12894  /* "dtocean.pyx":290
12895  * self.ds = xr.Dataset({'rfl': self.rfl, 'lat': self.lat, 'lon': self.lon,
12896  * 'sza': self.sza, 'vza': self.vza, 'raa': self.raa,
12897  * 'wnd': self.wnd, 'aot': self.aot, 'fmf': self.fmf, # <<<<<<<<<<<<<<
12898  * 'sse': self.sse, 'type': self.type })
12899  * except Exception as inst:
12900  */
12901  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wnd); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 290, __pyx_L3_error)
12902  __Pyx_GOTREF(__pyx_t_8);
12903  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_wnd, __pyx_t_8) < 0) __PYX_ERR(0, 288, __pyx_L3_error)
12904  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12905  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_aot); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 290, __pyx_L3_error)
12906  __Pyx_GOTREF(__pyx_t_8);
12907  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_aot, __pyx_t_8) < 0) __PYX_ERR(0, 288, __pyx_L3_error)
12908  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12909  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fmf); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 290, __pyx_L3_error)
12910  __Pyx_GOTREF(__pyx_t_8);
12911  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_fmf, __pyx_t_8) < 0) __PYX_ERR(0, 288, __pyx_L3_error)
12912  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12913 
12914  /* "dtocean.pyx":291
12915  * 'sza': self.sza, 'vza': self.vza, 'raa': self.raa,
12916  * 'wnd': self.wnd, 'aot': self.aot, 'fmf': self.fmf,
12917  * 'sse': self.sse, 'type': self.type }) # <<<<<<<<<<<<<<
12918  * except Exception as inst:
12919  * print(type(inst))
12920  */
12921  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_sse); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 291, __pyx_L3_error)
12922  __Pyx_GOTREF(__pyx_t_8);
12923  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_sse, __pyx_t_8) < 0) __PYX_ERR(0, 288, __pyx_L3_error)
12924  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12925  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 291, __pyx_L3_error)
12926  __Pyx_GOTREF(__pyx_t_8);
12927  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_type, __pyx_t_8) < 0) __PYX_ERR(0, 288, __pyx_L3_error)
12928  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12929  __pyx_t_8 = NULL;
12930  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
12931  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
12932  if (likely(__pyx_t_8)) {
12933  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
12934  __Pyx_INCREF(__pyx_t_8);
12935  __Pyx_INCREF(function);
12936  __Pyx_DECREF_SET(__pyx_t_4, function);
12937  }
12938  }
12939  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7);
12940  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
12941  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12942  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 288, __pyx_L3_error)
12943  __Pyx_GOTREF(__pyx_t_5);
12944  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12945 
12946  /* "dtocean.pyx":288
12947  * self.sse = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12948  * self.type = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12949  * self.ds = xr.Dataset({'rfl': self.rfl, 'lat': self.lat, 'lon': self.lon, # <<<<<<<<<<<<<<
12950  * 'sza': self.sza, 'vza': self.vza, 'raa': self.raa,
12951  * 'wnd': self.wnd, 'aot': self.aot, 'fmf': self.fmf,
12952  */
12953  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ds, __pyx_t_5) < 0) __PYX_ERR(0, 288, __pyx_L3_error)
12954  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12955 
12956  /* "dtocean.pyx":276
12957  * self.ydim = ydim
12958  * self.xdim = xdim
12959  * try: # <<<<<<<<<<<<<<
12960  * self.rfl = xr.DataArray(np.zeros((NWL,ydim,xdim)),dims=('wl','y', 'x'))
12961  * self.lat = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12962  */
12963  }
12964  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12965  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12966  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12967  goto __pyx_L8_try_end;
12968  __pyx_L3_error:;
12969  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12970  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12971  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12972  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
12973  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
12974 
12975  /* "dtocean.pyx":292
12976  * 'wnd': self.wnd, 'aot': self.aot, 'fmf': self.fmf,
12977  * 'sse': self.sse, 'type': self.type })
12978  * except Exception as inst: # <<<<<<<<<<<<<<
12979  * print(type(inst))
12980  * print(inst)
12981  */
12982  __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
12983  if (__pyx_t_9) {
12984  __Pyx_AddTraceback("dtocean.output.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12985  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 292, __pyx_L5_except_error)
12986  __Pyx_GOTREF(__pyx_t_5);
12987  __Pyx_GOTREF(__pyx_t_4);
12988  __Pyx_GOTREF(__pyx_t_7);
12989  __Pyx_INCREF(__pyx_t_4);
12990  __pyx_v_inst = __pyx_t_4;
12991  /*try:*/ {
12992 
12993  /* "dtocean.pyx":293
12994  * 'sse': self.sse, 'type': self.type })
12995  * except Exception as inst:
12996  * print(type(inst)) # <<<<<<<<<<<<<<
12997  * print(inst)
12998  * print ("Unable to initialize output file ... exiting")
12999  */
13000  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, ((PyObject *)Py_TYPE(__pyx_v_inst))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 293, __pyx_L14_error)
13001  __Pyx_GOTREF(__pyx_t_8);
13002  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13003 
13004  /* "dtocean.pyx":294
13005  * except Exception as inst:
13006  * print(type(inst))
13007  * print(inst) # <<<<<<<<<<<<<<
13008  * print ("Unable to initialize output file ... exiting")
13009  * sys.exit()
13010  */
13011  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v_inst); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 294, __pyx_L14_error)
13012  __Pyx_GOTREF(__pyx_t_8);
13013  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13014 
13015  /* "dtocean.pyx":295
13016  * print(type(inst))
13017  * print(inst)
13018  * print ("Unable to initialize output file ... exiting") # <<<<<<<<<<<<<<
13019  * sys.exit()
13020  *
13021  */
13022  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 295, __pyx_L14_error)
13023  __Pyx_GOTREF(__pyx_t_8);
13024  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13025 
13026  /* "dtocean.pyx":296
13027  * print(inst)
13028  * print ("Unable to initialize output file ... exiting")
13029  * sys.exit() # <<<<<<<<<<<<<<
13030  *
13031  * def write(self):
13032  */
13033  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 296, __pyx_L14_error)
13034  __Pyx_GOTREF(__pyx_t_6);
13035  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_exit); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 296, __pyx_L14_error)
13036  __Pyx_GOTREF(__pyx_t_10);
13037  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13038  __pyx_t_6 = NULL;
13039  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
13040  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
13041  if (likely(__pyx_t_6)) {
13042  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
13043  __Pyx_INCREF(__pyx_t_6);
13044  __Pyx_INCREF(function);
13045  __Pyx_DECREF_SET(__pyx_t_10, function);
13046  }
13047  }
13048  __pyx_t_8 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_10);
13049  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13050  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 296, __pyx_L14_error)
13051  __Pyx_GOTREF(__pyx_t_8);
13052  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13053  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13054  }
13055 
13056  /* "dtocean.pyx":292
13057  * 'wnd': self.wnd, 'aot': self.aot, 'fmf': self.fmf,
13058  * 'sse': self.sse, 'type': self.type })
13059  * except Exception as inst: # <<<<<<<<<<<<<<
13060  * print(type(inst))
13061  * print(inst)
13062  */
13063  /*finally:*/ {
13064  /*normal exit:*/{
13065  __Pyx_DECREF(__pyx_v_inst);
13066  __pyx_v_inst = NULL;
13067  goto __pyx_L15;
13068  }
13069  __pyx_L14_error:;
13070  /*exception exit:*/{
13071  __Pyx_PyThreadState_declare
13072  __Pyx_PyThreadState_assign
13073  __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
13074  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
13075  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13076  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
13077  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
13078  if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
13079  __Pyx_XGOTREF(__pyx_t_13);
13080  __Pyx_XGOTREF(__pyx_t_14);
13081  __Pyx_XGOTREF(__pyx_t_15);
13082  __Pyx_XGOTREF(__pyx_t_16);
13083  __Pyx_XGOTREF(__pyx_t_17);
13084  __Pyx_XGOTREF(__pyx_t_18);
13085  __pyx_t_9 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
13086  {
13087  __Pyx_DECREF(__pyx_v_inst);
13088  __pyx_v_inst = NULL;
13089  }
13090  if (PY_MAJOR_VERSION >= 3) {
13091  __Pyx_XGIVEREF(__pyx_t_16);
13092  __Pyx_XGIVEREF(__pyx_t_17);
13093  __Pyx_XGIVEREF(__pyx_t_18);
13094  __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
13095  }
13096  __Pyx_XGIVEREF(__pyx_t_13);
13097  __Pyx_XGIVEREF(__pyx_t_14);
13098  __Pyx_XGIVEREF(__pyx_t_15);
13099  __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
13100  __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
13101  __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
13102  goto __pyx_L5_except_error;
13103  }
13104  __pyx_L15:;
13105  }
13106  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13107  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13108  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
13109  goto __pyx_L4_exception_handled;
13110  }
13111  goto __pyx_L5_except_error;
13112  __pyx_L5_except_error:;
13113 
13114  /* "dtocean.pyx":276
13115  * self.ydim = ydim
13116  * self.xdim = xdim
13117  * try: # <<<<<<<<<<<<<<
13118  * self.rfl = xr.DataArray(np.zeros((NWL,ydim,xdim)),dims=('wl','y', 'x'))
13119  * self.lat = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
13120  */
13121  __Pyx_XGIVEREF(__pyx_t_1);
13122  __Pyx_XGIVEREF(__pyx_t_2);
13123  __Pyx_XGIVEREF(__pyx_t_3);
13124  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13125  goto __pyx_L1_error;
13126  __pyx_L4_exception_handled:;
13127  __Pyx_XGIVEREF(__pyx_t_1);
13128  __Pyx_XGIVEREF(__pyx_t_2);
13129  __Pyx_XGIVEREF(__pyx_t_3);
13130  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13131  __pyx_L8_try_end:;
13132  }
13133 
13134  /* "dtocean.pyx":272
13135  * class output(object):
13136  *
13137  * def __init__(self, out_filepath, ydim, xdim): # <<<<<<<<<<<<<<
13138  * self.ofile = out_filepath
13139  * self.ydim = ydim
13140  */
13141 
13142  /* function exit code */
13143  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13144  goto __pyx_L0;
13145  __pyx_L1_error:;
13146  __Pyx_XDECREF(__pyx_t_4);
13147  __Pyx_XDECREF(__pyx_t_5);
13148  __Pyx_XDECREF(__pyx_t_6);
13149  __Pyx_XDECREF(__pyx_t_7);
13150  __Pyx_XDECREF(__pyx_t_8);
13151  __Pyx_XDECREF(__pyx_t_10);
13152  __Pyx_AddTraceback("dtocean.output.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13153  __pyx_r = NULL;
13154  __pyx_L0:;
13155  __Pyx_XDECREF(__pyx_v_inst);
13156  __Pyx_XGIVEREF(__pyx_r);
13157  __Pyx_RefNannyFinishContext();
13158  return __pyx_r;
13159 }
13160 
13161 /* "dtocean.pyx":298
13162  * sys.exit()
13163  *
13164  * def write(self): # <<<<<<<<<<<<<<
13165  * print ("Writing to file: " + self.ofile)
13166  * self.ds.to_netcdf(self.ofile)
13167  */
13168 
13169 /* Python wrapper */
13170 static PyObject *__pyx_pw_7dtocean_6output_3write(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
13171 static PyMethodDef __pyx_mdef_7dtocean_6output_3write = {"write", (PyCFunction)__pyx_pw_7dtocean_6output_3write, METH_O, 0};
13172 static PyObject *__pyx_pw_7dtocean_6output_3write(PyObject *__pyx_self, PyObject *__pyx_v_self) {
13173  PyObject *__pyx_r = 0;
13174  __Pyx_RefNannyDeclarations
13175  __Pyx_RefNannySetupContext("write (wrapper)", 0);
13176  __pyx_r = __pyx_pf_7dtocean_6output_2write(__pyx_self, ((PyObject *)__pyx_v_self));
13177 
13178  /* function exit code */
13179  __Pyx_RefNannyFinishContext();
13180  return __pyx_r;
13181 }
13182 
13183 static PyObject *__pyx_pf_7dtocean_6output_2write(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
13184  PyObject *__pyx_r = NULL;
13185  __Pyx_RefNannyDeclarations
13186  PyObject *__pyx_t_1 = NULL;
13187  PyObject *__pyx_t_2 = NULL;
13188  PyObject *__pyx_t_3 = NULL;
13189  PyObject *__pyx_t_4 = NULL;
13190  int __pyx_lineno = 0;
13191  const char *__pyx_filename = NULL;
13192  int __pyx_clineno = 0;
13193  __Pyx_RefNannySetupContext("write", 0);
13194 
13195  /* "dtocean.pyx":299
13196  *
13197  * def write(self):
13198  * print ("Writing to file: " + self.ofile) # <<<<<<<<<<<<<<
13199  * self.ds.to_netcdf(self.ofile)
13200  *
13201  */
13202  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ofile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __pyx_L1_error)
13203  __Pyx_GOTREF(__pyx_t_1);
13204  __pyx_t_2 = PyNumber_Add(__pyx_kp_u_Writing_to_file, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 299, __pyx_L1_error)
13205  __Pyx_GOTREF(__pyx_t_2);
13206  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13207  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __pyx_L1_error)
13208  __Pyx_GOTREF(__pyx_t_1);
13209  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13210  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13211 
13212  /* "dtocean.pyx":300
13213  * def write(self):
13214  * print ("Writing to file: " + self.ofile)
13215  * self.ds.to_netcdf(self.ofile) # <<<<<<<<<<<<<<
13216  *
13217  * def main():
13218  */
13219  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)
13220  __Pyx_GOTREF(__pyx_t_2);
13221  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_to_netcdf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error)
13222  __Pyx_GOTREF(__pyx_t_3);
13223  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13224  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ofile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)
13225  __Pyx_GOTREF(__pyx_t_2);
13226  __pyx_t_4 = NULL;
13227  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
13228  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
13229  if (likely(__pyx_t_4)) {
13230  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13231  __Pyx_INCREF(__pyx_t_4);
13232  __Pyx_INCREF(function);
13233  __Pyx_DECREF_SET(__pyx_t_3, function);
13234  }
13235  }
13236  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
13237  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13238  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13239  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
13240  __Pyx_GOTREF(__pyx_t_1);
13241  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13242  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13243 
13244  /* "dtocean.pyx":298
13245  * sys.exit()
13246  *
13247  * def write(self): # <<<<<<<<<<<<<<
13248  * print ("Writing to file: " + self.ofile)
13249  * self.ds.to_netcdf(self.ofile)
13250  */
13251 
13252  /* function exit code */
13253  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13254  goto __pyx_L0;
13255  __pyx_L1_error:;
13256  __Pyx_XDECREF(__pyx_t_1);
13257  __Pyx_XDECREF(__pyx_t_2);
13258  __Pyx_XDECREF(__pyx_t_3);
13259  __Pyx_XDECREF(__pyx_t_4);
13260  __Pyx_AddTraceback("dtocean.output.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
13261  __pyx_r = NULL;
13262  __pyx_L0:;
13263  __Pyx_XGIVEREF(__pyx_r);
13264  __Pyx_RefNannyFinishContext();
13265  return __pyx_r;
13266 }
13267 
13268 /* "dtocean.pyx":302
13269  * self.ds.to_netcdf(self.ofile)
13270  *
13271  * def main(): # <<<<<<<<<<<<<<
13272  *
13273  * parser = argparse.ArgumentParser()
13274  */
13275 
13276 /* Python wrapper */
13277 static PyObject *__pyx_pw_7dtocean_1main(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
13278 static PyMethodDef __pyx_mdef_7dtocean_1main = {"main", (PyCFunction)__pyx_pw_7dtocean_1main, METH_NOARGS, 0};
13279 static PyObject *__pyx_pw_7dtocean_1main(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
13280  PyObject *__pyx_r = 0;
13281  __Pyx_RefNannyDeclarations
13282  __Pyx_RefNannySetupContext("main (wrapper)", 0);
13283  __pyx_r = __pyx_pf_7dtocean_main(__pyx_self);
13284 
13285  /* function exit code */
13286  __Pyx_RefNannyFinishContext();
13287  return __pyx_r;
13288 }
13289 
13290 static PyObject *__pyx_pf_7dtocean_main(CYTHON_UNUSED PyObject *__pyx_self) {
13291  PyObject *__pyx_v_parser = NULL;
13292  PyObject *__pyx_v_args = NULL;
13293  PyObject *__pyx_v_vin = NULL;
13294  PyObject *__pyx_v_vout = NULL;
13295  PyObject *__pyx_v_dto = NULL;
13296  PyObject *__pyx_v_iy = NULL;
13297  PyObject *__pyx_v_ix = NULL;
13298  PyObject *__pyx_v_fmf = NULL;
13299  PyObject *__pyx_v_aot = NULL;
13300  PyObject *__pyx_v_sse = NULL;
13301  PyObject *__pyx_v_type = NULL;
13302  PyObject *__pyx_r = NULL;
13303  __Pyx_RefNannyDeclarations
13304  PyObject *__pyx_t_1 = NULL;
13305  PyObject *__pyx_t_2 = NULL;
13306  PyObject *__pyx_t_3 = NULL;
13307  PyObject *__pyx_t_4 = NULL;
13308  PyObject *__pyx_t_5 = NULL;
13309  PyObject *__pyx_t_6 = NULL;
13310  int __pyx_t_7;
13311  PyObject *__pyx_t_8 = NULL;
13312  Py_ssize_t __pyx_t_9;
13313  PyObject *(*__pyx_t_10)(PyObject *);
13314  Py_ssize_t __pyx_t_11;
13315  PyObject *(*__pyx_t_12)(PyObject *);
13316  int __pyx_t_13;
13317  PyObject *__pyx_t_14 = NULL;
13318  PyObject *__pyx_t_15 = NULL;
13319  PyObject *__pyx_t_16 = NULL;
13320  PyObject *__pyx_t_17 = NULL;
13321  PyObject *(*__pyx_t_18)(PyObject *);
13322  int __pyx_lineno = 0;
13323  const char *__pyx_filename = NULL;
13324  int __pyx_clineno = 0;
13325  __Pyx_RefNannySetupContext("main", 0);
13326 
13327  /* "dtocean.pyx":304
13328  * def main():
13329  *
13330  * parser = argparse.ArgumentParser() # <<<<<<<<<<<<<<
13331  * parser.add_argument("-i", "--ifile", type=argparse.FileType('r'),
13332  * help="input file", required=True)
13333  */
13334  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_argparse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 304, __pyx_L1_error)
13335  __Pyx_GOTREF(__pyx_t_2);
13336  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ArgumentParser); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 304, __pyx_L1_error)
13337  __Pyx_GOTREF(__pyx_t_3);
13338  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13339  __pyx_t_2 = NULL;
13340  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
13341  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
13342  if (likely(__pyx_t_2)) {
13343  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13344  __Pyx_INCREF(__pyx_t_2);
13345  __Pyx_INCREF(function);
13346  __Pyx_DECREF_SET(__pyx_t_3, function);
13347  }
13348  }
13349  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
13350  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
13351  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error)
13352  __Pyx_GOTREF(__pyx_t_1);
13353  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13354  __pyx_v_parser = __pyx_t_1;
13355  __pyx_t_1 = 0;
13356 
13357  /* "dtocean.pyx":305
13358  *
13359  * parser = argparse.ArgumentParser()
13360  * parser.add_argument("-i", "--ifile", type=argparse.FileType('r'), # <<<<<<<<<<<<<<
13361  * help="input file", required=True)
13362  * parser.add_argument("-o", "--ofile", type=argparse.FileType('w'),
13363  */
13364  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_add_argument); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error)
13365  __Pyx_GOTREF(__pyx_t_1);
13366  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 305, __pyx_L1_error)
13367  __Pyx_GOTREF(__pyx_t_3);
13368  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_argparse); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 305, __pyx_L1_error)
13369  __Pyx_GOTREF(__pyx_t_4);
13370  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_FileType); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 305, __pyx_L1_error)
13371  __Pyx_GOTREF(__pyx_t_5);
13372  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13373  __pyx_t_4 = NULL;
13374  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
13375  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
13376  if (likely(__pyx_t_4)) {
13377  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
13378  __Pyx_INCREF(__pyx_t_4);
13379  __Pyx_INCREF(function);
13380  __Pyx_DECREF_SET(__pyx_t_5, function);
13381  }
13382  }
13383  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_n_u_r) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_u_r);
13384  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13385  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 305, __pyx_L1_error)
13386  __Pyx_GOTREF(__pyx_t_2);
13387  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13388  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_t_2) < 0) __PYX_ERR(0, 305, __pyx_L1_error)
13389  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13390  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_help, __pyx_kp_u_input_file) < 0) __PYX_ERR(0, 305, __pyx_L1_error)
13391 
13392  /* "dtocean.pyx":306
13393  * parser = argparse.ArgumentParser()
13394  * parser.add_argument("-i", "--ifile", type=argparse.FileType('r'),
13395  * help="input file", required=True) # <<<<<<<<<<<<<<
13396  * parser.add_argument("-o", "--ofile", type=argparse.FileType('w'),
13397  * help="output file", required=False)
13398  */
13399  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_required, Py_True) < 0) __PYX_ERR(0, 305, __pyx_L1_error)
13400 
13401  /* "dtocean.pyx":305
13402  *
13403  * parser = argparse.ArgumentParser()
13404  * parser.add_argument("-i", "--ifile", type=argparse.FileType('r'), # <<<<<<<<<<<<<<
13405  * help="input file", required=True)
13406  * parser.add_argument("-o", "--ofile", type=argparse.FileType('w'),
13407  */
13408  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__21, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 305, __pyx_L1_error)
13409  __Pyx_GOTREF(__pyx_t_2);
13410  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13411  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13412  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13413 
13414  /* "dtocean.pyx":307
13415  * parser.add_argument("-i", "--ifile", type=argparse.FileType('r'),
13416  * help="input file", required=True)
13417  * parser.add_argument("-o", "--ofile", type=argparse.FileType('w'), # <<<<<<<<<<<<<<
13418  * help="output file", required=False)
13419  * parser.add_argument("-l", "--lut", type=argparse.FileType('r'),
13420  */
13421  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_add_argument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error)
13422  __Pyx_GOTREF(__pyx_t_2);
13423  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error)
13424  __Pyx_GOTREF(__pyx_t_3);
13425  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_argparse); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 307, __pyx_L1_error)
13426  __Pyx_GOTREF(__pyx_t_5);
13427  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_FileType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 307, __pyx_L1_error)
13428  __Pyx_GOTREF(__pyx_t_4);
13429  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13430  __pyx_t_5 = NULL;
13431  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
13432  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
13433  if (likely(__pyx_t_5)) {
13434  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
13435  __Pyx_INCREF(__pyx_t_5);
13436  __Pyx_INCREF(function);
13437  __Pyx_DECREF_SET(__pyx_t_4, function);
13438  }
13439  }
13440  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_n_u_w) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_n_u_w);
13441  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13442  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
13443  __Pyx_GOTREF(__pyx_t_1);
13444  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13445  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_t_1) < 0) __PYX_ERR(0, 307, __pyx_L1_error)
13446  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13447  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_help, __pyx_kp_u_output_file) < 0) __PYX_ERR(0, 307, __pyx_L1_error)
13448 
13449  /* "dtocean.pyx":308
13450  * help="input file", required=True)
13451  * parser.add_argument("-o", "--ofile", type=argparse.FileType('w'),
13452  * help="output file", required=False) # <<<<<<<<<<<<<<
13453  * parser.add_argument("-l", "--lut", type=argparse.FileType('r'),
13454  * help="lookup table file", required=True)
13455  */
13456  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 307, __pyx_L1_error)
13457 
13458  /* "dtocean.pyx":307
13459  * parser.add_argument("-i", "--ifile", type=argparse.FileType('r'),
13460  * help="input file", required=True)
13461  * parser.add_argument("-o", "--ofile", type=argparse.FileType('w'), # <<<<<<<<<<<<<<
13462  * help="output file", required=False)
13463  * parser.add_argument("-l", "--lut", type=argparse.FileType('r'),
13464  */
13465  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__22, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
13466  __Pyx_GOTREF(__pyx_t_1);
13467  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13468  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13469  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13470 
13471  /* "dtocean.pyx":309
13472  * parser.add_argument("-o", "--ofile", type=argparse.FileType('w'),
13473  * help="output file", required=False)
13474  * parser.add_argument("-l", "--lut", type=argparse.FileType('r'), # <<<<<<<<<<<<<<
13475  * help="lookup table file", required=True)
13476  * parser.add_argument("-p", "--plot", type=bool, default=False,
13477  */
13478  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_add_argument); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
13479  __Pyx_GOTREF(__pyx_t_1);
13480  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 309, __pyx_L1_error)
13481  __Pyx_GOTREF(__pyx_t_3);
13482  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_argparse); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 309, __pyx_L1_error)
13483  __Pyx_GOTREF(__pyx_t_4);
13484  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_FileType); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 309, __pyx_L1_error)
13485  __Pyx_GOTREF(__pyx_t_5);
13486  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13487  __pyx_t_4 = NULL;
13488  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
13489  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
13490  if (likely(__pyx_t_4)) {
13491  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
13492  __Pyx_INCREF(__pyx_t_4);
13493  __Pyx_INCREF(function);
13494  __Pyx_DECREF_SET(__pyx_t_5, function);
13495  }
13496  }
13497  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_n_u_r) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_u_r);
13498  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13499  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 309, __pyx_L1_error)
13500  __Pyx_GOTREF(__pyx_t_2);
13501  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13502  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_t_2) < 0) __PYX_ERR(0, 309, __pyx_L1_error)
13503  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13504  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_help, __pyx_kp_u_lookup_table_file) < 0) __PYX_ERR(0, 309, __pyx_L1_error)
13505 
13506  /* "dtocean.pyx":310
13507  * help="output file", required=False)
13508  * parser.add_argument("-l", "--lut", type=argparse.FileType('r'),
13509  * help="lookup table file", required=True) # <<<<<<<<<<<<<<
13510  * parser.add_argument("-p", "--plot", type=bool, default=False,
13511  * help="plot pixel data", required=False)
13512  */
13513  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_required, Py_True) < 0) __PYX_ERR(0, 309, __pyx_L1_error)
13514 
13515  /* "dtocean.pyx":309
13516  * parser.add_argument("-o", "--ofile", type=argparse.FileType('w'),
13517  * help="output file", required=False)
13518  * parser.add_argument("-l", "--lut", type=argparse.FileType('r'), # <<<<<<<<<<<<<<
13519  * help="lookup table file", required=True)
13520  * parser.add_argument("-p", "--plot", type=bool, default=False,
13521  */
13522  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__23, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 309, __pyx_L1_error)
13523  __Pyx_GOTREF(__pyx_t_2);
13524  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13525  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13526  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13527 
13528  /* "dtocean.pyx":311
13529  * parser.add_argument("-l", "--lut", type=argparse.FileType('r'),
13530  * help="lookup table file", required=True)
13531  * parser.add_argument("-p", "--plot", type=bool, default=False, # <<<<<<<<<<<<<<
13532  * help="plot pixel data", required=False)
13533  * parser.add_argument("-m", "--mode", type=int, default=0,
13534  */
13535  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_add_argument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 311, __pyx_L1_error)
13536  __Pyx_GOTREF(__pyx_t_2);
13537  __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 311, __pyx_L1_error)
13538  __Pyx_GOTREF(__pyx_t_3);
13539  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, ((PyObject*)&PyBool_Type)) < 0) __PYX_ERR(0, 311, __pyx_L1_error)
13540  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_default, Py_False) < 0) __PYX_ERR(0, 311, __pyx_L1_error)
13541  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_help, __pyx_kp_u_plot_pixel_data) < 0) __PYX_ERR(0, 311, __pyx_L1_error)
13542 
13543  /* "dtocean.pyx":312
13544  * help="lookup table file", required=True)
13545  * parser.add_argument("-p", "--plot", type=bool, default=False,
13546  * help="plot pixel data", required=False) # <<<<<<<<<<<<<<
13547  * parser.add_argument("-m", "--mode", type=int, default=0,
13548  * help="mode option", required=False)
13549  */
13550  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 311, __pyx_L1_error)
13551 
13552  /* "dtocean.pyx":311
13553  * parser.add_argument("-l", "--lut", type=argparse.FileType('r'),
13554  * help="lookup table file", required=True)
13555  * parser.add_argument("-p", "--plot", type=bool, default=False, # <<<<<<<<<<<<<<
13556  * help="plot pixel data", required=False)
13557  * parser.add_argument("-m", "--mode", type=int, default=0,
13558  */
13559  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__24, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error)
13560  __Pyx_GOTREF(__pyx_t_1);
13561  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13562  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13563  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13564 
13565  /* "dtocean.pyx":313
13566  * parser.add_argument("-p", "--plot", type=bool, default=False,
13567  * help="plot pixel data", required=False)
13568  * parser.add_argument("-m", "--mode", type=int, default=0, # <<<<<<<<<<<<<<
13569  * help="mode option", required=False)
13570  * parser.add_argument("y", type=int, help="start line")
13571  */
13572  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_add_argument); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error)
13573  __Pyx_GOTREF(__pyx_t_1);
13574  __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 313, __pyx_L1_error)
13575  __Pyx_GOTREF(__pyx_t_3);
13576  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 313, __pyx_L1_error)
13577  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_default, __pyx_int_0) < 0) __PYX_ERR(0, 313, __pyx_L1_error)
13578  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_help, __pyx_kp_u_mode_option) < 0) __PYX_ERR(0, 313, __pyx_L1_error)
13579 
13580  /* "dtocean.pyx":314
13581  * help="plot pixel data", required=False)
13582  * parser.add_argument("-m", "--mode", type=int, default=0,
13583  * help="mode option", required=False) # <<<<<<<<<<<<<<
13584  * parser.add_argument("y", type=int, help="start line")
13585  * parser.add_argument("x", type=int, help="start pixel")
13586  */
13587  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 313, __pyx_L1_error)
13588 
13589  /* "dtocean.pyx":313
13590  * parser.add_argument("-p", "--plot", type=bool, default=False,
13591  * help="plot pixel data", required=False)
13592  * parser.add_argument("-m", "--mode", type=int, default=0, # <<<<<<<<<<<<<<
13593  * help="mode option", required=False)
13594  * parser.add_argument("y", type=int, help="start line")
13595  */
13596  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__25, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __pyx_L1_error)
13597  __Pyx_GOTREF(__pyx_t_2);
13598  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13599  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13600  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13601 
13602  /* "dtocean.pyx":315
13603  * parser.add_argument("-m", "--mode", type=int, default=0,
13604  * help="mode option", required=False)
13605  * parser.add_argument("y", type=int, help="start line") # <<<<<<<<<<<<<<
13606  * parser.add_argument("x", type=int, help="start pixel")
13607  * parser.add_argument("z", type=int, help="square side ")
13608  */
13609  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_add_argument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L1_error)
13610  __Pyx_GOTREF(__pyx_t_2);
13611  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 315, __pyx_L1_error)
13612  __Pyx_GOTREF(__pyx_t_3);
13613  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 315, __pyx_L1_error)
13614  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_help, __pyx_kp_u_start_line) < 0) __PYX_ERR(0, 315, __pyx_L1_error)
13615  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__26, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 315, __pyx_L1_error)
13616  __Pyx_GOTREF(__pyx_t_1);
13617  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13618  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13619  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13620 
13621  /* "dtocean.pyx":316
13622  * help="mode option", required=False)
13623  * parser.add_argument("y", type=int, help="start line")
13624  * parser.add_argument("x", type=int, help="start pixel") # <<<<<<<<<<<<<<
13625  * parser.add_argument("z", type=int, help="square side ")
13626  *
13627  */
13628  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_add_argument); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 316, __pyx_L1_error)
13629  __Pyx_GOTREF(__pyx_t_1);
13630  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 316, __pyx_L1_error)
13631  __Pyx_GOTREF(__pyx_t_3);
13632  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 316, __pyx_L1_error)
13633  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_help, __pyx_kp_u_start_pixel) < 0) __PYX_ERR(0, 316, __pyx_L1_error)
13634  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__27, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L1_error)
13635  __Pyx_GOTREF(__pyx_t_2);
13636  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13637  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13638  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13639 
13640  /* "dtocean.pyx":317
13641  * parser.add_argument("y", type=int, help="start line")
13642  * parser.add_argument("x", type=int, help="start pixel")
13643  * parser.add_argument("z", type=int, help="square side ") # <<<<<<<<<<<<<<
13644  *
13645  * args = parser.parse_args()
13646  */
13647  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_add_argument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __pyx_L1_error)
13648  __Pyx_GOTREF(__pyx_t_2);
13649  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L1_error)
13650  __Pyx_GOTREF(__pyx_t_3);
13651  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 317, __pyx_L1_error)
13652  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_help, __pyx_kp_u_square_side) < 0) __PYX_ERR(0, 317, __pyx_L1_error)
13653  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__28, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __pyx_L1_error)
13654  __Pyx_GOTREF(__pyx_t_1);
13655  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13656  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13657  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13658 
13659  /* "dtocean.pyx":319
13660  * parser.add_argument("z", type=int, help="square side ")
13661  *
13662  * args = parser.parse_args() # <<<<<<<<<<<<<<
13663  * vin = input(args.ifile.name)
13664  * vout = output(args.ofile.name, args.z, args.z)
13665  */
13666  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_parse_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 319, __pyx_L1_error)
13667  __Pyx_GOTREF(__pyx_t_3);
13668  __pyx_t_2 = NULL;
13669  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
13670  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
13671  if (likely(__pyx_t_2)) {
13672  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13673  __Pyx_INCREF(__pyx_t_2);
13674  __Pyx_INCREF(function);
13675  __Pyx_DECREF_SET(__pyx_t_3, function);
13676  }
13677  }
13678  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
13679  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
13680  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
13681  __Pyx_GOTREF(__pyx_t_1);
13682  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13683  __pyx_v_args = __pyx_t_1;
13684  __pyx_t_1 = 0;
13685 
13686  /* "dtocean.pyx":320
13687  *
13688  * args = parser.parse_args()
13689  * vin = input(args.ifile.name) # <<<<<<<<<<<<<<
13690  * vout = output(args.ofile.name, args.z, args.z)
13691  * dto = dtocean(args.lut.name, args.mode)
13692  */
13693  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_input); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 320, __pyx_L1_error)
13694  __Pyx_GOTREF(__pyx_t_3);
13695  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_ifile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error)
13696  __Pyx_GOTREF(__pyx_t_2);
13697  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 320, __pyx_L1_error)
13698  __Pyx_GOTREF(__pyx_t_5);
13699  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13700  __pyx_t_2 = NULL;
13701  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
13702  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
13703  if (likely(__pyx_t_2)) {
13704  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13705  __Pyx_INCREF(__pyx_t_2);
13706  __Pyx_INCREF(function);
13707  __Pyx_DECREF_SET(__pyx_t_3, function);
13708  }
13709  }
13710  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
13711  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
13712  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13713  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
13714  __Pyx_GOTREF(__pyx_t_1);
13715  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13716  __pyx_v_vin = __pyx_t_1;
13717  __pyx_t_1 = 0;
13718 
13719  /* "dtocean.pyx":321
13720  * args = parser.parse_args()
13721  * vin = input(args.ifile.name)
13722  * vout = output(args.ofile.name, args.z, args.z) # <<<<<<<<<<<<<<
13723  * dto = dtocean(args.lut.name, args.mode)
13724  *
13725  */
13726  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_output); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 321, __pyx_L1_error)
13727  __Pyx_GOTREF(__pyx_t_3);
13728  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_ofile); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 321, __pyx_L1_error)
13729  __Pyx_GOTREF(__pyx_t_5);
13730  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L1_error)
13731  __Pyx_GOTREF(__pyx_t_2);
13732  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13733  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_z); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 321, __pyx_L1_error)
13734  __Pyx_GOTREF(__pyx_t_5);
13735  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 321, __pyx_L1_error)
13736  __Pyx_GOTREF(__pyx_t_4);
13737  __pyx_t_6 = NULL;
13738  __pyx_t_7 = 0;
13739  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
13740  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
13741  if (likely(__pyx_t_6)) {
13742  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13743  __Pyx_INCREF(__pyx_t_6);
13744  __Pyx_INCREF(function);
13745  __Pyx_DECREF_SET(__pyx_t_3, function);
13746  __pyx_t_7 = 1;
13747  }
13748  }
13749  #if CYTHON_FAST_PYCALL
13750  if (PyFunction_Check(__pyx_t_3)) {
13751  PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_2, __pyx_t_5, __pyx_t_4};
13752  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error)
13753  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13754  __Pyx_GOTREF(__pyx_t_1);
13755  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13756  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13757  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13758  } else
13759  #endif
13760  #if CYTHON_FAST_PYCCALL
13761  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
13762  PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_2, __pyx_t_5, __pyx_t_4};
13763  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error)
13764  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13765  __Pyx_GOTREF(__pyx_t_1);
13766  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13767  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13768  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13769  } else
13770  #endif
13771  {
13772  __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 321, __pyx_L1_error)
13773  __Pyx_GOTREF(__pyx_t_8);
13774  if (__pyx_t_6) {
13775  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
13776  }
13777  __Pyx_GIVEREF(__pyx_t_2);
13778  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_2);
13779  __Pyx_GIVEREF(__pyx_t_5);
13780  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5);
13781  __Pyx_GIVEREF(__pyx_t_4);
13782  PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_4);
13783  __pyx_t_2 = 0;
13784  __pyx_t_5 = 0;
13785  __pyx_t_4 = 0;
13786  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error)
13787  __Pyx_GOTREF(__pyx_t_1);
13788  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13789  }
13790  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13791  __pyx_v_vout = __pyx_t_1;
13792  __pyx_t_1 = 0;
13793 
13794  /* "dtocean.pyx":322
13795  * vin = input(args.ifile.name)
13796  * vout = output(args.ofile.name, args.z, args.z)
13797  * dto = dtocean(args.lut.name, args.mode) # <<<<<<<<<<<<<<
13798  *
13799  * print ("Processing mode {0}".format(args.mode))
13800  */
13801  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_dtocean); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error)
13802  __Pyx_GOTREF(__pyx_t_3);
13803  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_lut_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 322, __pyx_L1_error)
13804  __Pyx_GOTREF(__pyx_t_8);
13805  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error)
13806  __Pyx_GOTREF(__pyx_t_4);
13807  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13808  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_mode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 322, __pyx_L1_error)
13809  __Pyx_GOTREF(__pyx_t_8);
13810  __pyx_t_5 = NULL;
13811  __pyx_t_7 = 0;
13812  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
13813  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
13814  if (likely(__pyx_t_5)) {
13815  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13816  __Pyx_INCREF(__pyx_t_5);
13817  __Pyx_INCREF(function);
13818  __Pyx_DECREF_SET(__pyx_t_3, function);
13819  __pyx_t_7 = 1;
13820  }
13821  }
13822  #if CYTHON_FAST_PYCALL
13823  if (PyFunction_Check(__pyx_t_3)) {
13824  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, __pyx_t_8};
13825  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
13826  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13827  __Pyx_GOTREF(__pyx_t_1);
13828  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13829  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13830  } else
13831  #endif
13832  #if CYTHON_FAST_PYCCALL
13833  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
13834  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, __pyx_t_8};
13835  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
13836  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13837  __Pyx_GOTREF(__pyx_t_1);
13838  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13839  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13840  } else
13841  #endif
13842  {
13843  __pyx_t_2 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error)
13844  __Pyx_GOTREF(__pyx_t_2);
13845  if (__pyx_t_5) {
13846  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = NULL;
13847  }
13848  __Pyx_GIVEREF(__pyx_t_4);
13849  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_7, __pyx_t_4);
13850  __Pyx_GIVEREF(__pyx_t_8);
13851  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_7, __pyx_t_8);
13852  __pyx_t_4 = 0;
13853  __pyx_t_8 = 0;
13854  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
13855  __Pyx_GOTREF(__pyx_t_1);
13856  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13857  }
13858  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13859  __pyx_v_dto = __pyx_t_1;
13860  __pyx_t_1 = 0;
13861 
13862  /* "dtocean.pyx":324
13863  * dto = dtocean(args.lut.name, args.mode)
13864  *
13865  * print ("Processing mode {0}".format(args.mode)) # <<<<<<<<<<<<<<
13866  * for iy in range(args.y, args.y+args.z):
13867  * for ix in range(args.x, args.x+args.z):
13868  */
13869  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Processing_mode_0, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 324, __pyx_L1_error)
13870  __Pyx_GOTREF(__pyx_t_3);
13871  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __pyx_L1_error)
13872  __Pyx_GOTREF(__pyx_t_2);
13873  __pyx_t_8 = NULL;
13874  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
13875  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
13876  if (likely(__pyx_t_8)) {
13877  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13878  __Pyx_INCREF(__pyx_t_8);
13879  __Pyx_INCREF(function);
13880  __Pyx_DECREF_SET(__pyx_t_3, function);
13881  }
13882  }
13883  __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
13884  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
13885  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13886  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 324, __pyx_L1_error)
13887  __Pyx_GOTREF(__pyx_t_1);
13888  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13889  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 324, __pyx_L1_error)
13890  __Pyx_GOTREF(__pyx_t_3);
13891  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13892  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13893 
13894  /* "dtocean.pyx":325
13895  *
13896  * print ("Processing mode {0}".format(args.mode))
13897  * for iy in range(args.y, args.y+args.z): # <<<<<<<<<<<<<<
13898  * for ix in range(args.x, args.x+args.z):
13899  *
13900  */
13901  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 325, __pyx_L1_error)
13902  __Pyx_GOTREF(__pyx_t_3);
13903  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error)
13904  __Pyx_GOTREF(__pyx_t_1);
13905  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 325, __pyx_L1_error)
13906  __Pyx_GOTREF(__pyx_t_2);
13907  __pyx_t_8 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 325, __pyx_L1_error)
13908  __Pyx_GOTREF(__pyx_t_8);
13909  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13910  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13911  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 325, __pyx_L1_error)
13912  __Pyx_GOTREF(__pyx_t_2);
13913  __Pyx_GIVEREF(__pyx_t_3);
13914  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
13915  __Pyx_GIVEREF(__pyx_t_8);
13916  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_8);
13917  __pyx_t_3 = 0;
13918  __pyx_t_8 = 0;
13919  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 325, __pyx_L1_error)
13920  __Pyx_GOTREF(__pyx_t_8);
13921  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13922  if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
13923  __pyx_t_2 = __pyx_t_8; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
13924  __pyx_t_10 = NULL;
13925  } else {
13926  __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 325, __pyx_L1_error)
13927  __Pyx_GOTREF(__pyx_t_2);
13928  __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 325, __pyx_L1_error)
13929  }
13930  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13931  for (;;) {
13932  if (likely(!__pyx_t_10)) {
13933  if (likely(PyList_CheckExact(__pyx_t_2))) {
13934  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
13935  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13936  __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 325, __pyx_L1_error)
13937  #else
13938  __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 325, __pyx_L1_error)
13939  __Pyx_GOTREF(__pyx_t_8);
13940  #endif
13941  } else {
13942  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
13943  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13944  __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 325, __pyx_L1_error)
13945  #else
13946  __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 325, __pyx_L1_error)
13947  __Pyx_GOTREF(__pyx_t_8);
13948  #endif
13949  }
13950  } else {
13951  __pyx_t_8 = __pyx_t_10(__pyx_t_2);
13952  if (unlikely(!__pyx_t_8)) {
13953  PyObject* exc_type = PyErr_Occurred();
13954  if (exc_type) {
13955  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
13956  else __PYX_ERR(0, 325, __pyx_L1_error)
13957  }
13958  break;
13959  }
13960  __Pyx_GOTREF(__pyx_t_8);
13961  }
13962  __Pyx_XDECREF_SET(__pyx_v_iy, __pyx_t_8);
13963  __pyx_t_8 = 0;
13964 
13965  /* "dtocean.pyx":326
13966  * print ("Processing mode {0}".format(args.mode))
13967  * for iy in range(args.y, args.y+args.z):
13968  * for ix in range(args.x, args.x+args.z): # <<<<<<<<<<<<<<
13969  *
13970  * if(vin.cld[iy,ix]):
13971  */
13972  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 326, __pyx_L1_error)
13973  __Pyx_GOTREF(__pyx_t_8);
13974  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 326, __pyx_L1_error)
13975  __Pyx_GOTREF(__pyx_t_3);
13976  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
13977  __Pyx_GOTREF(__pyx_t_1);
13978  __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error)
13979  __Pyx_GOTREF(__pyx_t_4);
13980  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13981  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13982  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
13983  __Pyx_GOTREF(__pyx_t_1);
13984  __Pyx_GIVEREF(__pyx_t_8);
13985  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8);
13986  __Pyx_GIVEREF(__pyx_t_4);
13987  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
13988  __pyx_t_8 = 0;
13989  __pyx_t_4 = 0;
13990  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error)
13991  __Pyx_GOTREF(__pyx_t_4);
13992  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13993  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
13994  __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_11 = 0;
13995  __pyx_t_12 = NULL;
13996  } else {
13997  __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
13998  __Pyx_GOTREF(__pyx_t_1);
13999  __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 326, __pyx_L1_error)
14000  }
14001  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14002  for (;;) {
14003  if (likely(!__pyx_t_12)) {
14004  if (likely(PyList_CheckExact(__pyx_t_1))) {
14005  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_1)) break;
14006  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14007  __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 326, __pyx_L1_error)
14008  #else
14009  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error)
14010  __Pyx_GOTREF(__pyx_t_4);
14011  #endif
14012  } else {
14013  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
14014  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14015  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 326, __pyx_L1_error)
14016  #else
14017  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error)
14018  __Pyx_GOTREF(__pyx_t_4);
14019  #endif
14020  }
14021  } else {
14022  __pyx_t_4 = __pyx_t_12(__pyx_t_1);
14023  if (unlikely(!__pyx_t_4)) {
14024  PyObject* exc_type = PyErr_Occurred();
14025  if (exc_type) {
14026  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
14027  else __PYX_ERR(0, 326, __pyx_L1_error)
14028  }
14029  break;
14030  }
14031  __Pyx_GOTREF(__pyx_t_4);
14032  }
14033  __Pyx_XDECREF_SET(__pyx_v_ix, __pyx_t_4);
14034  __pyx_t_4 = 0;
14035 
14036  /* "dtocean.pyx":328
14037  * for ix in range(args.x, args.x+args.z):
14038  *
14039  * if(vin.cld[iy,ix]): # <<<<<<<<<<<<<<
14040  * fmf,aot,sse,type = -999.9, -999.9, -999.9, -999
14041  * else:
14042  */
14043  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_cld); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 328, __pyx_L1_error)
14044  __Pyx_GOTREF(__pyx_t_4);
14045  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 328, __pyx_L1_error)
14046  __Pyx_GOTREF(__pyx_t_8);
14047  __Pyx_INCREF(__pyx_v_iy);
14048  __Pyx_GIVEREF(__pyx_v_iy);
14049  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_iy);
14050  __Pyx_INCREF(__pyx_v_ix);
14051  __Pyx_GIVEREF(__pyx_v_ix);
14052  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ix);
14053  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 328, __pyx_L1_error)
14054  __Pyx_GOTREF(__pyx_t_3);
14055  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14056  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14057  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 328, __pyx_L1_error)
14058  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14059  if (__pyx_t_13) {
14060 
14061  /* "dtocean.pyx":329
14062  *
14063  * if(vin.cld[iy,ix]):
14064  * fmf,aot,sse,type = -999.9, -999.9, -999.9, -999 # <<<<<<<<<<<<<<
14065  * else:
14066  * fmf,aot,sse,type = dto.process(vin.rfl[iy,ix,:],vin.sza[iy,ix],
14067  */
14068  __pyx_t_3 = __pyx_float_neg_999_9;
14069  __Pyx_INCREF(__pyx_t_3);
14070  __pyx_t_8 = __pyx_float_neg_999_9;
14071  __Pyx_INCREF(__pyx_t_8);
14072  __pyx_t_4 = __pyx_float_neg_999_9;
14073  __Pyx_INCREF(__pyx_t_4);
14074  __pyx_t_5 = __pyx_int_neg_999;
14075  __Pyx_INCREF(__pyx_t_5);
14076  __Pyx_XDECREF_SET(__pyx_v_fmf, __pyx_t_3);
14077  __pyx_t_3 = 0;
14078  __Pyx_XDECREF_SET(__pyx_v_aot, __pyx_t_8);
14079  __pyx_t_8 = 0;
14080  __Pyx_XDECREF_SET(__pyx_v_sse, __pyx_t_4);
14081  __pyx_t_4 = 0;
14082  __Pyx_XDECREF_SET(__pyx_v_type, __pyx_t_5);
14083  __pyx_t_5 = 0;
14084 
14085  /* "dtocean.pyx":328
14086  * for ix in range(args.x, args.x+args.z):
14087  *
14088  * if(vin.cld[iy,ix]): # <<<<<<<<<<<<<<
14089  * fmf,aot,sse,type = -999.9, -999.9, -999.9, -999
14090  * else:
14091  */
14092  goto __pyx_L7;
14093  }
14094 
14095  /* "dtocean.pyx":331
14096  * fmf,aot,sse,type = -999.9, -999.9, -999.9, -999
14097  * else:
14098  * fmf,aot,sse,type = dto.process(vin.rfl[iy,ix,:],vin.sza[iy,ix], # <<<<<<<<<<<<<<
14099  * vin.vza[iy,ix],vin.raa[iy,ix],
14100  * vin.wnd[iy,ix])
14101  */
14102  /*else*/ {
14103  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dto, __pyx_n_s_process); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 331, __pyx_L1_error)
14104  __Pyx_GOTREF(__pyx_t_4);
14105  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_rfl); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 331, __pyx_L1_error)
14106  __Pyx_GOTREF(__pyx_t_8);
14107  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error)
14108  __Pyx_GOTREF(__pyx_t_3);
14109  __Pyx_INCREF(__pyx_v_iy);
14110  __Pyx_GIVEREF(__pyx_v_iy);
14111  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_iy);
14112  __Pyx_INCREF(__pyx_v_ix);
14113  __Pyx_GIVEREF(__pyx_v_ix);
14114  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_ix);
14115  __Pyx_INCREF(__pyx_slice__4);
14116  __Pyx_GIVEREF(__pyx_slice__4);
14117  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_slice__4);
14118  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 331, __pyx_L1_error)
14119  __Pyx_GOTREF(__pyx_t_6);
14120  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14121  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14122  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_sza); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error)
14123  __Pyx_GOTREF(__pyx_t_3);
14124  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 331, __pyx_L1_error)
14125  __Pyx_GOTREF(__pyx_t_8);
14126  __Pyx_INCREF(__pyx_v_iy);
14127  __Pyx_GIVEREF(__pyx_v_iy);
14128  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_iy);
14129  __Pyx_INCREF(__pyx_v_ix);
14130  __Pyx_GIVEREF(__pyx_v_ix);
14131  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ix);
14132  __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 331, __pyx_L1_error)
14133  __Pyx_GOTREF(__pyx_t_14);
14134  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14135  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14136 
14137  /* "dtocean.pyx":332
14138  * else:
14139  * fmf,aot,sse,type = dto.process(vin.rfl[iy,ix,:],vin.sza[iy,ix],
14140  * vin.vza[iy,ix],vin.raa[iy,ix], # <<<<<<<<<<<<<<
14141  * vin.wnd[iy,ix])
14142  * if(args.plot):
14143  */
14144  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_vza); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
14145  __Pyx_GOTREF(__pyx_t_8);
14146  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error)
14147  __Pyx_GOTREF(__pyx_t_3);
14148  __Pyx_INCREF(__pyx_v_iy);
14149  __Pyx_GIVEREF(__pyx_v_iy);
14150  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_iy);
14151  __Pyx_INCREF(__pyx_v_ix);
14152  __Pyx_GIVEREF(__pyx_v_ix);
14153  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_ix);
14154  __pyx_t_15 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 332, __pyx_L1_error)
14155  __Pyx_GOTREF(__pyx_t_15);
14156  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14157  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14158  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_raa); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error)
14159  __Pyx_GOTREF(__pyx_t_3);
14160  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
14161  __Pyx_GOTREF(__pyx_t_8);
14162  __Pyx_INCREF(__pyx_v_iy);
14163  __Pyx_GIVEREF(__pyx_v_iy);
14164  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_iy);
14165  __Pyx_INCREF(__pyx_v_ix);
14166  __Pyx_GIVEREF(__pyx_v_ix);
14167  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ix);
14168  __pyx_t_16 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 332, __pyx_L1_error)
14169  __Pyx_GOTREF(__pyx_t_16);
14170  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14171  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14172 
14173  /* "dtocean.pyx":333
14174  * fmf,aot,sse,type = dto.process(vin.rfl[iy,ix,:],vin.sza[iy,ix],
14175  * vin.vza[iy,ix],vin.raa[iy,ix],
14176  * vin.wnd[iy,ix]) # <<<<<<<<<<<<<<
14177  * if(args.plot):
14178  * dto.plot(iy,ix)
14179  */
14180  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_wnd); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 333, __pyx_L1_error)
14181  __Pyx_GOTREF(__pyx_t_8);
14182  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 333, __pyx_L1_error)
14183  __Pyx_GOTREF(__pyx_t_3);
14184  __Pyx_INCREF(__pyx_v_iy);
14185  __Pyx_GIVEREF(__pyx_v_iy);
14186  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_iy);
14187  __Pyx_INCREF(__pyx_v_ix);
14188  __Pyx_GIVEREF(__pyx_v_ix);
14189  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_ix);
14190  __pyx_t_17 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 333, __pyx_L1_error)
14191  __Pyx_GOTREF(__pyx_t_17);
14192  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14193  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14194  __pyx_t_3 = NULL;
14195  __pyx_t_7 = 0;
14196  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
14197  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
14198  if (likely(__pyx_t_3)) {
14199  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
14200  __Pyx_INCREF(__pyx_t_3);
14201  __Pyx_INCREF(function);
14202  __Pyx_DECREF_SET(__pyx_t_4, function);
14203  __pyx_t_7 = 1;
14204  }
14205  }
14206  #if CYTHON_FAST_PYCALL
14207  if (PyFunction_Check(__pyx_t_4)) {
14208  PyObject *__pyx_temp[6] = {__pyx_t_3, __pyx_t_6, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
14209  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 331, __pyx_L1_error)
14210  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14211  __Pyx_GOTREF(__pyx_t_5);
14212  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14213  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
14214  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14215  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14216  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
14217  } else
14218  #endif
14219  #if CYTHON_FAST_PYCCALL
14220  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
14221  PyObject *__pyx_temp[6] = {__pyx_t_3, __pyx_t_6, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
14222  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 331, __pyx_L1_error)
14223  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14224  __Pyx_GOTREF(__pyx_t_5);
14225  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14226  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
14227  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14228  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14229  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
14230  } else
14231  #endif
14232  {
14233  __pyx_t_8 = PyTuple_New(5+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 331, __pyx_L1_error)
14234  __Pyx_GOTREF(__pyx_t_8);
14235  if (__pyx_t_3) {
14236  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL;
14237  }
14238  __Pyx_GIVEREF(__pyx_t_6);
14239  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_6);
14240  __Pyx_GIVEREF(__pyx_t_14);
14241  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_14);
14242  __Pyx_GIVEREF(__pyx_t_15);
14243  PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_15);
14244  __Pyx_GIVEREF(__pyx_t_16);
14245  PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_7, __pyx_t_16);
14246  __Pyx_GIVEREF(__pyx_t_17);
14247  PyTuple_SET_ITEM(__pyx_t_8, 4+__pyx_t_7, __pyx_t_17);
14248  __pyx_t_6 = 0;
14249  __pyx_t_14 = 0;
14250  __pyx_t_15 = 0;
14251  __pyx_t_16 = 0;
14252  __pyx_t_17 = 0;
14253  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 331, __pyx_L1_error)
14254  __Pyx_GOTREF(__pyx_t_5);
14255  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14256  }
14257  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14258  if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
14259  PyObject* sequence = __pyx_t_5;
14260  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
14261  if (unlikely(size != 4)) {
14262  if (size > 4) __Pyx_RaiseTooManyValuesError(4);
14263  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
14264  __PYX_ERR(0, 331, __pyx_L1_error)
14265  }
14266  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14267  if (likely(PyTuple_CheckExact(sequence))) {
14268  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
14269  __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1);
14270  __pyx_t_17 = PyTuple_GET_ITEM(sequence, 2);
14271  __pyx_t_16 = PyTuple_GET_ITEM(sequence, 3);
14272  } else {
14273  __pyx_t_4 = PyList_GET_ITEM(sequence, 0);
14274  __pyx_t_8 = PyList_GET_ITEM(sequence, 1);
14275  __pyx_t_17 = PyList_GET_ITEM(sequence, 2);
14276  __pyx_t_16 = PyList_GET_ITEM(sequence, 3);
14277  }
14278  __Pyx_INCREF(__pyx_t_4);
14279  __Pyx_INCREF(__pyx_t_8);
14280  __Pyx_INCREF(__pyx_t_17);
14281  __Pyx_INCREF(__pyx_t_16);
14282  #else
14283  {
14284  Py_ssize_t i;
14285  PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_8,&__pyx_t_17,&__pyx_t_16};
14286  for (i=0; i < 4; i++) {
14287  PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 331, __pyx_L1_error)
14288  __Pyx_GOTREF(item);
14289  *(temps[i]) = item;
14290  }
14291  }
14292  #endif
14293  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14294  } else {
14295  Py_ssize_t index = -1;
14296  PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_8,&__pyx_t_17,&__pyx_t_16};
14297  __pyx_t_15 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 331, __pyx_L1_error)
14298  __Pyx_GOTREF(__pyx_t_15);
14299  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14300  __pyx_t_18 = Py_TYPE(__pyx_t_15)->tp_iternext;
14301  for (index=0; index < 4; index++) {
14302  PyObject* item = __pyx_t_18(__pyx_t_15); if (unlikely(!item)) goto __pyx_L8_unpacking_failed;
14303  __Pyx_GOTREF(item);
14304  *(temps[index]) = item;
14305  }
14306  if (__Pyx_IternextUnpackEndCheck(__pyx_t_18(__pyx_t_15), 4) < 0) __PYX_ERR(0, 331, __pyx_L1_error)
14307  __pyx_t_18 = NULL;
14308  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14309  goto __pyx_L9_unpacking_done;
14310  __pyx_L8_unpacking_failed:;
14311  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14312  __pyx_t_18 = NULL;
14313  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
14314  __PYX_ERR(0, 331, __pyx_L1_error)
14315  __pyx_L9_unpacking_done:;
14316  }
14317 
14318  /* "dtocean.pyx":331
14319  * fmf,aot,sse,type = -999.9, -999.9, -999.9, -999
14320  * else:
14321  * fmf,aot,sse,type = dto.process(vin.rfl[iy,ix,:],vin.sza[iy,ix], # <<<<<<<<<<<<<<
14322  * vin.vza[iy,ix],vin.raa[iy,ix],
14323  * vin.wnd[iy,ix])
14324  */
14325  __Pyx_XDECREF_SET(__pyx_v_fmf, __pyx_t_4);
14326  __pyx_t_4 = 0;
14327  __Pyx_XDECREF_SET(__pyx_v_aot, __pyx_t_8);
14328  __pyx_t_8 = 0;
14329  __Pyx_XDECREF_SET(__pyx_v_sse, __pyx_t_17);
14330  __pyx_t_17 = 0;
14331  __Pyx_XDECREF_SET(__pyx_v_type, __pyx_t_16);
14332  __pyx_t_16 = 0;
14333 
14334  /* "dtocean.pyx":334
14335  * vin.vza[iy,ix],vin.raa[iy,ix],
14336  * vin.wnd[iy,ix])
14337  * if(args.plot): # <<<<<<<<<<<<<<
14338  * dto.plot(iy,ix)
14339  *
14340  */
14341  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_plot); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 334, __pyx_L1_error)
14342  __Pyx_GOTREF(__pyx_t_5);
14343  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 334, __pyx_L1_error)
14344  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14345  if (__pyx_t_13) {
14346 
14347  /* "dtocean.pyx":335
14348  * vin.wnd[iy,ix])
14349  * if(args.plot):
14350  * dto.plot(iy,ix) # <<<<<<<<<<<<<<
14351  *
14352  * vout.ds.rfl[:,iy-args.y,ix-args.x] = vin.rfl[iy,ix]
14353  */
14354  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_dto, __pyx_n_s_plot); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 335, __pyx_L1_error)
14355  __Pyx_GOTREF(__pyx_t_16);
14356  __pyx_t_17 = NULL;
14357  __pyx_t_7 = 0;
14358  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
14359  __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16);
14360  if (likely(__pyx_t_17)) {
14361  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
14362  __Pyx_INCREF(__pyx_t_17);
14363  __Pyx_INCREF(function);
14364  __Pyx_DECREF_SET(__pyx_t_16, function);
14365  __pyx_t_7 = 1;
14366  }
14367  }
14368  #if CYTHON_FAST_PYCALL
14369  if (PyFunction_Check(__pyx_t_16)) {
14370  PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_v_iy, __pyx_v_ix};
14371  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 335, __pyx_L1_error)
14372  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
14373  __Pyx_GOTREF(__pyx_t_5);
14374  } else
14375  #endif
14376  #if CYTHON_FAST_PYCCALL
14377  if (__Pyx_PyFastCFunction_Check(__pyx_t_16)) {
14378  PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_v_iy, __pyx_v_ix};
14379  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 335, __pyx_L1_error)
14380  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
14381  __Pyx_GOTREF(__pyx_t_5);
14382  } else
14383  #endif
14384  {
14385  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 335, __pyx_L1_error)
14386  __Pyx_GOTREF(__pyx_t_8);
14387  if (__pyx_t_17) {
14388  __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_17); __pyx_t_17 = NULL;
14389  }
14390  __Pyx_INCREF(__pyx_v_iy);
14391  __Pyx_GIVEREF(__pyx_v_iy);
14392  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_iy);
14393  __Pyx_INCREF(__pyx_v_ix);
14394  __Pyx_GIVEREF(__pyx_v_ix);
14395  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_ix);
14396  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 335, __pyx_L1_error)
14397  __Pyx_GOTREF(__pyx_t_5);
14398  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14399  }
14400  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14401  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14402 
14403  /* "dtocean.pyx":334
14404  * vin.vza[iy,ix],vin.raa[iy,ix],
14405  * vin.wnd[iy,ix])
14406  * if(args.plot): # <<<<<<<<<<<<<<
14407  * dto.plot(iy,ix)
14408  *
14409  */
14410  }
14411  }
14412  __pyx_L7:;
14413 
14414  /* "dtocean.pyx":337
14415  * dto.plot(iy,ix)
14416  *
14417  * vout.ds.rfl[:,iy-args.y,ix-args.x] = vin.rfl[iy,ix] # <<<<<<<<<<<<<<
14418  * vout.ds.lat[iy-args.y,ix-args.x] = vin.lat[iy,ix]
14419  * vout.ds.lon[iy-args.y,ix-args.x] = vin.lon[iy,ix]
14420  */
14421  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_rfl); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error)
14422  __Pyx_GOTREF(__pyx_t_5);
14423  __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 337, __pyx_L1_error)
14424  __Pyx_GOTREF(__pyx_t_16);
14425  __Pyx_INCREF(__pyx_v_iy);
14426  __Pyx_GIVEREF(__pyx_v_iy);
14427  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_iy);
14428  __Pyx_INCREF(__pyx_v_ix);
14429  __Pyx_GIVEREF(__pyx_v_ix);
14430  PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_v_ix);
14431  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 337, __pyx_L1_error)
14432  __Pyx_GOTREF(__pyx_t_8);
14433  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14434  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14435  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_ds); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 337, __pyx_L1_error)
14436  __Pyx_GOTREF(__pyx_t_16);
14437  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_rfl); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error)
14438  __Pyx_GOTREF(__pyx_t_5);
14439  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14440  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 337, __pyx_L1_error)
14441  __Pyx_GOTREF(__pyx_t_16);
14442  __pyx_t_17 = PyNumber_Subtract(__pyx_v_iy, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 337, __pyx_L1_error)
14443  __Pyx_GOTREF(__pyx_t_17);
14444  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14445  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 337, __pyx_L1_error)
14446  __Pyx_GOTREF(__pyx_t_16);
14447  __pyx_t_4 = PyNumber_Subtract(__pyx_v_ix, __pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error)
14448  __Pyx_GOTREF(__pyx_t_4);
14449  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14450  __pyx_t_16 = PyTuple_New(3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 337, __pyx_L1_error)
14451  __Pyx_GOTREF(__pyx_t_16);
14452  __Pyx_INCREF(__pyx_slice__4);
14453  __Pyx_GIVEREF(__pyx_slice__4);
14454  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_slice__4);
14455  __Pyx_GIVEREF(__pyx_t_17);
14456  PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_17);
14457  __Pyx_GIVEREF(__pyx_t_4);
14458  PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_4);
14459  __pyx_t_17 = 0;
14460  __pyx_t_4 = 0;
14461  if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_t_16, __pyx_t_8) < 0)) __PYX_ERR(0, 337, __pyx_L1_error)
14462  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14463  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14464  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14465 
14466  /* "dtocean.pyx":338
14467  *
14468  * vout.ds.rfl[:,iy-args.y,ix-args.x] = vin.rfl[iy,ix]
14469  * vout.ds.lat[iy-args.y,ix-args.x] = vin.lat[iy,ix] # <<<<<<<<<<<<<<
14470  * vout.ds.lon[iy-args.y,ix-args.x] = vin.lon[iy,ix]
14471  * vout.ds.sza[iy-args.y,ix-args.x] = vin.sza[iy,ix]
14472  */
14473  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_lat); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 338, __pyx_L1_error)
14474  __Pyx_GOTREF(__pyx_t_8);
14475  __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 338, __pyx_L1_error)
14476  __Pyx_GOTREF(__pyx_t_16);
14477  __Pyx_INCREF(__pyx_v_iy);
14478  __Pyx_GIVEREF(__pyx_v_iy);
14479  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_iy);
14480  __Pyx_INCREF(__pyx_v_ix);
14481  __Pyx_GIVEREF(__pyx_v_ix);
14482  PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_v_ix);
14483  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_t_16); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 338, __pyx_L1_error)
14484  __Pyx_GOTREF(__pyx_t_5);
14485  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14486  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14487  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_ds); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 338, __pyx_L1_error)
14488  __Pyx_GOTREF(__pyx_t_16);
14489  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_lat); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 338, __pyx_L1_error)
14490  __Pyx_GOTREF(__pyx_t_8);
14491  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14492  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 338, __pyx_L1_error)
14493  __Pyx_GOTREF(__pyx_t_16);
14494  __pyx_t_4 = PyNumber_Subtract(__pyx_v_iy, __pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
14495  __Pyx_GOTREF(__pyx_t_4);
14496  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14497  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 338, __pyx_L1_error)
14498  __Pyx_GOTREF(__pyx_t_16);
14499  __pyx_t_17 = PyNumber_Subtract(__pyx_v_ix, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 338, __pyx_L1_error)
14500  __Pyx_GOTREF(__pyx_t_17);
14501  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14502  __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 338, __pyx_L1_error)
14503  __Pyx_GOTREF(__pyx_t_16);
14504  __Pyx_GIVEREF(__pyx_t_4);
14505  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_4);
14506  __Pyx_GIVEREF(__pyx_t_17);
14507  PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_17);
14508  __pyx_t_4 = 0;
14509  __pyx_t_17 = 0;
14510  if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_t_16, __pyx_t_5) < 0)) __PYX_ERR(0, 338, __pyx_L1_error)
14511  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14512  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14513  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14514 
14515  /* "dtocean.pyx":339
14516  * vout.ds.rfl[:,iy-args.y,ix-args.x] = vin.rfl[iy,ix]
14517  * vout.ds.lat[iy-args.y,ix-args.x] = vin.lat[iy,ix]
14518  * vout.ds.lon[iy-args.y,ix-args.x] = vin.lon[iy,ix] # <<<<<<<<<<<<<<
14519  * vout.ds.sza[iy-args.y,ix-args.x] = vin.sza[iy,ix]
14520  * vout.ds.vza[iy-args.y,ix-args.x] = vin.vza[iy,ix]
14521  */
14522  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_lon); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 339, __pyx_L1_error)
14523  __Pyx_GOTREF(__pyx_t_5);
14524  __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 339, __pyx_L1_error)
14525  __Pyx_GOTREF(__pyx_t_16);
14526  __Pyx_INCREF(__pyx_v_iy);
14527  __Pyx_GIVEREF(__pyx_v_iy);
14528  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_iy);
14529  __Pyx_INCREF(__pyx_v_ix);
14530  __Pyx_GIVEREF(__pyx_v_ix);
14531  PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_v_ix);
14532  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 339, __pyx_L1_error)
14533  __Pyx_GOTREF(__pyx_t_8);
14534  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14535  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14536  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_ds); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 339, __pyx_L1_error)
14537  __Pyx_GOTREF(__pyx_t_16);
14538  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_lon); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 339, __pyx_L1_error)
14539  __Pyx_GOTREF(__pyx_t_5);
14540  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14541  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 339, __pyx_L1_error)
14542  __Pyx_GOTREF(__pyx_t_16);
14543  __pyx_t_17 = PyNumber_Subtract(__pyx_v_iy, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 339, __pyx_L1_error)
14544  __Pyx_GOTREF(__pyx_t_17);
14545  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14546  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 339, __pyx_L1_error)
14547  __Pyx_GOTREF(__pyx_t_16);
14548  __pyx_t_4 = PyNumber_Subtract(__pyx_v_ix, __pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 339, __pyx_L1_error)
14549  __Pyx_GOTREF(__pyx_t_4);
14550  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14551  __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 339, __pyx_L1_error)
14552  __Pyx_GOTREF(__pyx_t_16);
14553  __Pyx_GIVEREF(__pyx_t_17);
14554  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_17);
14555  __Pyx_GIVEREF(__pyx_t_4);
14556  PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_4);
14557  __pyx_t_17 = 0;
14558  __pyx_t_4 = 0;
14559  if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_t_16, __pyx_t_8) < 0)) __PYX_ERR(0, 339, __pyx_L1_error)
14560  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14561  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14562  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14563 
14564  /* "dtocean.pyx":340
14565  * vout.ds.lat[iy-args.y,ix-args.x] = vin.lat[iy,ix]
14566  * vout.ds.lon[iy-args.y,ix-args.x] = vin.lon[iy,ix]
14567  * vout.ds.sza[iy-args.y,ix-args.x] = vin.sza[iy,ix] # <<<<<<<<<<<<<<
14568  * vout.ds.vza[iy-args.y,ix-args.x] = vin.vza[iy,ix]
14569  * vout.ds.raa[iy-args.y,ix-args.x] = vin.raa[iy,ix]
14570  */
14571  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_sza); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 340, __pyx_L1_error)
14572  __Pyx_GOTREF(__pyx_t_8);
14573  __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 340, __pyx_L1_error)
14574  __Pyx_GOTREF(__pyx_t_16);
14575  __Pyx_INCREF(__pyx_v_iy);
14576  __Pyx_GIVEREF(__pyx_v_iy);
14577  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_iy);
14578  __Pyx_INCREF(__pyx_v_ix);
14579  __Pyx_GIVEREF(__pyx_v_ix);
14580  PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_v_ix);
14581  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_t_16); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 340, __pyx_L1_error)
14582  __Pyx_GOTREF(__pyx_t_5);
14583  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14584  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14585  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_ds); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 340, __pyx_L1_error)
14586  __Pyx_GOTREF(__pyx_t_16);
14587  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_sza); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 340, __pyx_L1_error)
14588  __Pyx_GOTREF(__pyx_t_8);
14589  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14590  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 340, __pyx_L1_error)
14591  __Pyx_GOTREF(__pyx_t_16);
14592  __pyx_t_4 = PyNumber_Subtract(__pyx_v_iy, __pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
14593  __Pyx_GOTREF(__pyx_t_4);
14594  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14595  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 340, __pyx_L1_error)
14596  __Pyx_GOTREF(__pyx_t_16);
14597  __pyx_t_17 = PyNumber_Subtract(__pyx_v_ix, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 340, __pyx_L1_error)
14598  __Pyx_GOTREF(__pyx_t_17);
14599  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14600  __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 340, __pyx_L1_error)
14601  __Pyx_GOTREF(__pyx_t_16);
14602  __Pyx_GIVEREF(__pyx_t_4);
14603  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_4);
14604  __Pyx_GIVEREF(__pyx_t_17);
14605  PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_17);
14606  __pyx_t_4 = 0;
14607  __pyx_t_17 = 0;
14608  if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_t_16, __pyx_t_5) < 0)) __PYX_ERR(0, 340, __pyx_L1_error)
14609  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14610  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14611  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14612 
14613  /* "dtocean.pyx":341
14614  * vout.ds.lon[iy-args.y,ix-args.x] = vin.lon[iy,ix]
14615  * vout.ds.sza[iy-args.y,ix-args.x] = vin.sza[iy,ix]
14616  * vout.ds.vza[iy-args.y,ix-args.x] = vin.vza[iy,ix] # <<<<<<<<<<<<<<
14617  * vout.ds.raa[iy-args.y,ix-args.x] = vin.raa[iy,ix]
14618  * vout.ds.wnd[iy-args.y,ix-args.x] = vin.wnd[iy,ix]
14619  */
14620  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_vza); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 341, __pyx_L1_error)
14621  __Pyx_GOTREF(__pyx_t_5);
14622  __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 341, __pyx_L1_error)
14623  __Pyx_GOTREF(__pyx_t_16);
14624  __Pyx_INCREF(__pyx_v_iy);
14625  __Pyx_GIVEREF(__pyx_v_iy);
14626  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_iy);
14627  __Pyx_INCREF(__pyx_v_ix);
14628  __Pyx_GIVEREF(__pyx_v_ix);
14629  PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_v_ix);
14630  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 341, __pyx_L1_error)
14631  __Pyx_GOTREF(__pyx_t_8);
14632  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14633  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14634  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_ds); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 341, __pyx_L1_error)
14635  __Pyx_GOTREF(__pyx_t_16);
14636  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_vza); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 341, __pyx_L1_error)
14637  __Pyx_GOTREF(__pyx_t_5);
14638  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14639  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 341, __pyx_L1_error)
14640  __Pyx_GOTREF(__pyx_t_16);
14641  __pyx_t_17 = PyNumber_Subtract(__pyx_v_iy, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 341, __pyx_L1_error)
14642  __Pyx_GOTREF(__pyx_t_17);
14643  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14644  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 341, __pyx_L1_error)
14645  __Pyx_GOTREF(__pyx_t_16);
14646  __pyx_t_4 = PyNumber_Subtract(__pyx_v_ix, __pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 341, __pyx_L1_error)
14647  __Pyx_GOTREF(__pyx_t_4);
14648  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14649  __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 341, __pyx_L1_error)
14650  __Pyx_GOTREF(__pyx_t_16);
14651  __Pyx_GIVEREF(__pyx_t_17);
14652  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_17);
14653  __Pyx_GIVEREF(__pyx_t_4);
14654  PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_4);
14655  __pyx_t_17 = 0;
14656  __pyx_t_4 = 0;
14657  if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_t_16, __pyx_t_8) < 0)) __PYX_ERR(0, 341, __pyx_L1_error)
14658  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14659  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14660  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14661 
14662  /* "dtocean.pyx":342
14663  * vout.ds.sza[iy-args.y,ix-args.x] = vin.sza[iy,ix]
14664  * vout.ds.vza[iy-args.y,ix-args.x] = vin.vza[iy,ix]
14665  * vout.ds.raa[iy-args.y,ix-args.x] = vin.raa[iy,ix] # <<<<<<<<<<<<<<
14666  * vout.ds.wnd[iy-args.y,ix-args.x] = vin.wnd[iy,ix]
14667  * vout.ds.aot[iy-args.y,ix-args.x] = aot
14668  */
14669  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_raa); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 342, __pyx_L1_error)
14670  __Pyx_GOTREF(__pyx_t_8);
14671  __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 342, __pyx_L1_error)
14672  __Pyx_GOTREF(__pyx_t_16);
14673  __Pyx_INCREF(__pyx_v_iy);
14674  __Pyx_GIVEREF(__pyx_v_iy);
14675  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_iy);
14676  __Pyx_INCREF(__pyx_v_ix);
14677  __Pyx_GIVEREF(__pyx_v_ix);
14678  PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_v_ix);
14679  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_t_16); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 342, __pyx_L1_error)
14680  __Pyx_GOTREF(__pyx_t_5);
14681  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14682  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14683  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_ds); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 342, __pyx_L1_error)
14684  __Pyx_GOTREF(__pyx_t_16);
14685  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_raa); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 342, __pyx_L1_error)
14686  __Pyx_GOTREF(__pyx_t_8);
14687  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14688  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 342, __pyx_L1_error)
14689  __Pyx_GOTREF(__pyx_t_16);
14690  __pyx_t_4 = PyNumber_Subtract(__pyx_v_iy, __pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 342, __pyx_L1_error)
14691  __Pyx_GOTREF(__pyx_t_4);
14692  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14693  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 342, __pyx_L1_error)
14694  __Pyx_GOTREF(__pyx_t_16);
14695  __pyx_t_17 = PyNumber_Subtract(__pyx_v_ix, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 342, __pyx_L1_error)
14696  __Pyx_GOTREF(__pyx_t_17);
14697  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14698  __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 342, __pyx_L1_error)
14699  __Pyx_GOTREF(__pyx_t_16);
14700  __Pyx_GIVEREF(__pyx_t_4);
14701  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_4);
14702  __Pyx_GIVEREF(__pyx_t_17);
14703  PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_17);
14704  __pyx_t_4 = 0;
14705  __pyx_t_17 = 0;
14706  if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_t_16, __pyx_t_5) < 0)) __PYX_ERR(0, 342, __pyx_L1_error)
14707  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14708  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14709  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14710 
14711  /* "dtocean.pyx":343
14712  * vout.ds.vza[iy-args.y,ix-args.x] = vin.vza[iy,ix]
14713  * vout.ds.raa[iy-args.y,ix-args.x] = vin.raa[iy,ix]
14714  * vout.ds.wnd[iy-args.y,ix-args.x] = vin.wnd[iy,ix] # <<<<<<<<<<<<<<
14715  * vout.ds.aot[iy-args.y,ix-args.x] = aot
14716  * vout.ds.fmf[iy-args.y,ix-args.x] = fmf
14717  */
14718  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_wnd); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 343, __pyx_L1_error)
14719  __Pyx_GOTREF(__pyx_t_5);
14720  __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 343, __pyx_L1_error)
14721  __Pyx_GOTREF(__pyx_t_16);
14722  __Pyx_INCREF(__pyx_v_iy);
14723  __Pyx_GIVEREF(__pyx_v_iy);
14724  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_iy);
14725  __Pyx_INCREF(__pyx_v_ix);
14726  __Pyx_GIVEREF(__pyx_v_ix);
14727  PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_v_ix);
14728  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 343, __pyx_L1_error)
14729  __Pyx_GOTREF(__pyx_t_8);
14730  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14731  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14732  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_ds); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 343, __pyx_L1_error)
14733  __Pyx_GOTREF(__pyx_t_16);
14734  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_wnd); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 343, __pyx_L1_error)
14735  __Pyx_GOTREF(__pyx_t_5);
14736  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14737  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 343, __pyx_L1_error)
14738  __Pyx_GOTREF(__pyx_t_16);
14739  __pyx_t_17 = PyNumber_Subtract(__pyx_v_iy, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 343, __pyx_L1_error)
14740  __Pyx_GOTREF(__pyx_t_17);
14741  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14742  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 343, __pyx_L1_error)
14743  __Pyx_GOTREF(__pyx_t_16);
14744  __pyx_t_4 = PyNumber_Subtract(__pyx_v_ix, __pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 343, __pyx_L1_error)
14745  __Pyx_GOTREF(__pyx_t_4);
14746  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14747  __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 343, __pyx_L1_error)
14748  __Pyx_GOTREF(__pyx_t_16);
14749  __Pyx_GIVEREF(__pyx_t_17);
14750  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_17);
14751  __Pyx_GIVEREF(__pyx_t_4);
14752  PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_4);
14753  __pyx_t_17 = 0;
14754  __pyx_t_4 = 0;
14755  if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_t_16, __pyx_t_8) < 0)) __PYX_ERR(0, 343, __pyx_L1_error)
14756  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14757  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14758  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14759 
14760  /* "dtocean.pyx":344
14761  * vout.ds.raa[iy-args.y,ix-args.x] = vin.raa[iy,ix]
14762  * vout.ds.wnd[iy-args.y,ix-args.x] = vin.wnd[iy,ix]
14763  * vout.ds.aot[iy-args.y,ix-args.x] = aot # <<<<<<<<<<<<<<
14764  * vout.ds.fmf[iy-args.y,ix-args.x] = fmf
14765  * vout.ds.sse[iy-args.y,ix-args.x] = sse
14766  */
14767  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_ds); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 344, __pyx_L1_error)
14768  __Pyx_GOTREF(__pyx_t_8);
14769  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_aot); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 344, __pyx_L1_error)
14770  __Pyx_GOTREF(__pyx_t_16);
14771  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14772  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 344, __pyx_L1_error)
14773  __Pyx_GOTREF(__pyx_t_8);
14774  __pyx_t_5 = PyNumber_Subtract(__pyx_v_iy, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 344, __pyx_L1_error)
14775  __Pyx_GOTREF(__pyx_t_5);
14776  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14777  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 344, __pyx_L1_error)
14778  __Pyx_GOTREF(__pyx_t_8);
14779  __pyx_t_4 = PyNumber_Subtract(__pyx_v_ix, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 344, __pyx_L1_error)
14780  __Pyx_GOTREF(__pyx_t_4);
14781  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14782  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 344, __pyx_L1_error)
14783  __Pyx_GOTREF(__pyx_t_8);
14784  __Pyx_GIVEREF(__pyx_t_5);
14785  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
14786  __Pyx_GIVEREF(__pyx_t_4);
14787  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_4);
14788  __pyx_t_5 = 0;
14789  __pyx_t_4 = 0;
14790  if (unlikely(PyObject_SetItem(__pyx_t_16, __pyx_t_8, __pyx_v_aot) < 0)) __PYX_ERR(0, 344, __pyx_L1_error)
14791  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14792  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14793 
14794  /* "dtocean.pyx":345
14795  * vout.ds.wnd[iy-args.y,ix-args.x] = vin.wnd[iy,ix]
14796  * vout.ds.aot[iy-args.y,ix-args.x] = aot
14797  * vout.ds.fmf[iy-args.y,ix-args.x] = fmf # <<<<<<<<<<<<<<
14798  * vout.ds.sse[iy-args.y,ix-args.x] = sse
14799  * vout.ds.type[iy-args.y,ix-args.x] = type
14800  */
14801  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_ds); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 345, __pyx_L1_error)
14802  __Pyx_GOTREF(__pyx_t_8);
14803  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_fmf); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 345, __pyx_L1_error)
14804  __Pyx_GOTREF(__pyx_t_16);
14805  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14806  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 345, __pyx_L1_error)
14807  __Pyx_GOTREF(__pyx_t_8);
14808  __pyx_t_4 = PyNumber_Subtract(__pyx_v_iy, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 345, __pyx_L1_error)
14809  __Pyx_GOTREF(__pyx_t_4);
14810  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14811  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 345, __pyx_L1_error)
14812  __Pyx_GOTREF(__pyx_t_8);
14813  __pyx_t_5 = PyNumber_Subtract(__pyx_v_ix, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 345, __pyx_L1_error)
14814  __Pyx_GOTREF(__pyx_t_5);
14815  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14816  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 345, __pyx_L1_error)
14817  __Pyx_GOTREF(__pyx_t_8);
14818  __Pyx_GIVEREF(__pyx_t_4);
14819  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4);
14820  __Pyx_GIVEREF(__pyx_t_5);
14821  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5);
14822  __pyx_t_4 = 0;
14823  __pyx_t_5 = 0;
14824  if (unlikely(PyObject_SetItem(__pyx_t_16, __pyx_t_8, __pyx_v_fmf) < 0)) __PYX_ERR(0, 345, __pyx_L1_error)
14825  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14826  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14827 
14828  /* "dtocean.pyx":346
14829  * vout.ds.aot[iy-args.y,ix-args.x] = aot
14830  * vout.ds.fmf[iy-args.y,ix-args.x] = fmf
14831  * vout.ds.sse[iy-args.y,ix-args.x] = sse # <<<<<<<<<<<<<<
14832  * vout.ds.type[iy-args.y,ix-args.x] = type
14833  *
14834  */
14835  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_ds); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 346, __pyx_L1_error)
14836  __Pyx_GOTREF(__pyx_t_8);
14837  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_sse); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 346, __pyx_L1_error)
14838  __Pyx_GOTREF(__pyx_t_16);
14839  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14840  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 346, __pyx_L1_error)
14841  __Pyx_GOTREF(__pyx_t_8);
14842  __pyx_t_5 = PyNumber_Subtract(__pyx_v_iy, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 346, __pyx_L1_error)
14843  __Pyx_GOTREF(__pyx_t_5);
14844  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14845  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 346, __pyx_L1_error)
14846  __Pyx_GOTREF(__pyx_t_8);
14847  __pyx_t_4 = PyNumber_Subtract(__pyx_v_ix, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error)
14848  __Pyx_GOTREF(__pyx_t_4);
14849  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14850  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 346, __pyx_L1_error)
14851  __Pyx_GOTREF(__pyx_t_8);
14852  __Pyx_GIVEREF(__pyx_t_5);
14853  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
14854  __Pyx_GIVEREF(__pyx_t_4);
14855  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_4);
14856  __pyx_t_5 = 0;
14857  __pyx_t_4 = 0;
14858  if (unlikely(PyObject_SetItem(__pyx_t_16, __pyx_t_8, __pyx_v_sse) < 0)) __PYX_ERR(0, 346, __pyx_L1_error)
14859  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14860  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14861 
14862  /* "dtocean.pyx":347
14863  * vout.ds.fmf[iy-args.y,ix-args.x] = fmf
14864  * vout.ds.sse[iy-args.y,ix-args.x] = sse
14865  * vout.ds.type[iy-args.y,ix-args.x] = type # <<<<<<<<<<<<<<
14866  *
14867  * print('.', end = '')
14868  */
14869  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_ds); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 347, __pyx_L1_error)
14870  __Pyx_GOTREF(__pyx_t_8);
14871  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_type); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 347, __pyx_L1_error)
14872  __Pyx_GOTREF(__pyx_t_16);
14873  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14874  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 347, __pyx_L1_error)
14875  __Pyx_GOTREF(__pyx_t_8);
14876  __pyx_t_4 = PyNumber_Subtract(__pyx_v_iy, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error)
14877  __Pyx_GOTREF(__pyx_t_4);
14878  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14879  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 347, __pyx_L1_error)
14880  __Pyx_GOTREF(__pyx_t_8);
14881  __pyx_t_5 = PyNumber_Subtract(__pyx_v_ix, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 347, __pyx_L1_error)
14882  __Pyx_GOTREF(__pyx_t_5);
14883  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14884  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 347, __pyx_L1_error)
14885  __Pyx_GOTREF(__pyx_t_8);
14886  __Pyx_GIVEREF(__pyx_t_4);
14887  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4);
14888  __Pyx_GIVEREF(__pyx_t_5);
14889  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5);
14890  __pyx_t_4 = 0;
14891  __pyx_t_5 = 0;
14892  if (unlikely(PyObject_SetItem(__pyx_t_16, __pyx_t_8, __pyx_v_type) < 0)) __PYX_ERR(0, 347, __pyx_L1_error)
14893  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
14894  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14895 
14896  /* "dtocean.pyx":326
14897  * print ("Processing mode {0}".format(args.mode))
14898  * for iy in range(args.y, args.y+args.z):
14899  * for ix in range(args.x, args.x+args.z): # <<<<<<<<<<<<<<
14900  *
14901  * if(vin.cld[iy,ix]):
14902  */
14903  }
14904  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14905 
14906  /* "dtocean.pyx":349
14907  * vout.ds.type[iy-args.y,ix-args.x] = type
14908  *
14909  * print('.', end = '') # <<<<<<<<<<<<<<
14910  * print(' Done!')
14911  * vout.write()
14912  */
14913  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error)
14914  __Pyx_GOTREF(__pyx_t_1);
14915  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_end, __pyx_kp_u__30) < 0) __PYX_ERR(0, 349, __pyx_L1_error)
14916  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__29, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 349, __pyx_L1_error)
14917  __Pyx_GOTREF(__pyx_t_8);
14918  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14919  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14920 
14921  /* "dtocean.pyx":325
14922  *
14923  * print ("Processing mode {0}".format(args.mode))
14924  * for iy in range(args.y, args.y+args.z): # <<<<<<<<<<<<<<
14925  * for ix in range(args.x, args.x+args.z):
14926  *
14927  */
14928  }
14929  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14930 
14931  /* "dtocean.pyx":350
14932  *
14933  * print('.', end = '')
14934  * print(' Done!') # <<<<<<<<<<<<<<
14935  * vout.write()
14936  *
14937  */
14938  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 350, __pyx_L1_error)
14939  __Pyx_GOTREF(__pyx_t_2);
14940  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14941 
14942  /* "dtocean.pyx":351
14943  * print('.', end = '')
14944  * print(' Done!')
14945  * vout.write() # <<<<<<<<<<<<<<
14946  *
14947  * if __name__ == "__main__":
14948  */
14949  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_write); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 351, __pyx_L1_error)
14950  __Pyx_GOTREF(__pyx_t_8);
14951  __pyx_t_1 = NULL;
14952  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
14953  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
14954  if (likely(__pyx_t_1)) {
14955  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
14956  __Pyx_INCREF(__pyx_t_1);
14957  __Pyx_INCREF(function);
14958  __Pyx_DECREF_SET(__pyx_t_8, function);
14959  }
14960  }
14961  __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
14962  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
14963  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error)
14964  __Pyx_GOTREF(__pyx_t_2);
14965  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14966  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14967 
14968  /* "dtocean.pyx":302
14969  * self.ds.to_netcdf(self.ofile)
14970  *
14971  * def main(): # <<<<<<<<<<<<<<
14972  *
14973  * parser = argparse.ArgumentParser()
14974  */
14975 
14976  /* function exit code */
14977  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14978  goto __pyx_L0;
14979  __pyx_L1_error:;
14980  __Pyx_XDECREF(__pyx_t_1);
14981  __Pyx_XDECREF(__pyx_t_2);
14982  __Pyx_XDECREF(__pyx_t_3);
14983  __Pyx_XDECREF(__pyx_t_4);
14984  __Pyx_XDECREF(__pyx_t_5);
14985  __Pyx_XDECREF(__pyx_t_6);
14986  __Pyx_XDECREF(__pyx_t_8);
14987  __Pyx_XDECREF(__pyx_t_14);
14988  __Pyx_XDECREF(__pyx_t_15);
14989  __Pyx_XDECREF(__pyx_t_16);
14990  __Pyx_XDECREF(__pyx_t_17);
14991  __Pyx_AddTraceback("dtocean.main", __pyx_clineno, __pyx_lineno, __pyx_filename);
14992  __pyx_r = NULL;
14993  __pyx_L0:;
14994  __Pyx_XDECREF(__pyx_v_parser);
14995  __Pyx_XDECREF(__pyx_v_args);
14996  __Pyx_XDECREF(__pyx_v_vin);
14997  __Pyx_XDECREF(__pyx_v_vout);
14998  __Pyx_XDECREF(__pyx_v_dto);
14999  __Pyx_XDECREF(__pyx_v_iy);
15000  __Pyx_XDECREF(__pyx_v_ix);
15001  __Pyx_XDECREF(__pyx_v_fmf);
15002  __Pyx_XDECREF(__pyx_v_aot);
15003  __Pyx_XDECREF(__pyx_v_sse);
15004  __Pyx_XDECREF(__pyx_v_type);
15005  __Pyx_XGIVEREF(__pyx_r);
15006  __Pyx_RefNannyFinishContext();
15007  return __pyx_r;
15008 }
15009 
15010 static PyMethodDef __pyx_methods[] = {
15011  {0, 0, 0, 0}
15012 };
15013 
15014 static int __pyx_import_star_set(PyObject *o, PyObject* py_name, char *name) {
15015  static const char* internal_type_names[] = {
15016  "__pyx_ctuple_4f4f2__long__and_long__and_long__and_long__and_long__and_long__and_long__etc",
15017  "__pyx_ctuple_4f4f2__long__and_long__and_long__and_long__and_long__and_long__and_long__etc_struct",
15018  "__pyx_ctuple_int",
15019  "__pyx_ctuple_int_struct",
15020  "__pyx_ctuple_long",
15021  "__pyx_ctuple_long__and_long__and_long",
15022  "__pyx_ctuple_long__and_long__and_long__and_long__and_long",
15023  "__pyx_ctuple_long__and_long__and_long__and_long__and_long_struct",
15024  "__pyx_ctuple_long__and_long__and_long_struct",
15025  "__pyx_ctuple_long_struct",
15026  0
15027  };
15028  const char** type_name = internal_type_names;
15029  while (*type_name) {
15030  if (__Pyx_StrEq(name, *type_name)) {
15031  PyErr_Format(PyExc_TypeError, "Cannot overwrite C type %s", name);
15032  goto bad;
15033  }
15034  type_name++;
15035  }
15036  if (0);
15037  else {
15038  if (PyObject_SetAttr(__pyx_m, py_name, o) < 0) goto bad;
15039  }
15040  return 0;
15041  bad:
15042  return -1;
15043 }
15044 
15045 static int
15046 __Pyx_import_all_from(PyObject *locals, PyObject *v)
15047 {
15048  PyObject *all = PyObject_GetAttrString(v, "__all__");
15049  PyObject *dict, *name, *value;
15050  int skip_leading_underscores = 0;
15051  int pos, err;
15052  if (all == NULL) {
15053  if (!PyErr_ExceptionMatches(PyExc_AttributeError))
15054  return -1;
15055  PyErr_Clear();
15056  dict = PyObject_GetAttrString(v, "__dict__");
15057  if (dict == NULL) {
15058  if (!PyErr_ExceptionMatches(PyExc_AttributeError))
15059  return -1;
15060  PyErr_SetString(PyExc_ImportError,
15061  "from-import-* object has no __dict__ and no __all__");
15062  return -1;
15063  }
15064 #if PY_MAJOR_VERSION < 3
15065  all = PyObject_CallMethod(dict, (char *)"keys", NULL);
15066 #else
15067  all = PyMapping_Keys(dict);
15068 #endif
15069  Py_DECREF(dict);
15070  if (all == NULL)
15071  return -1;
15072  skip_leading_underscores = 1;
15073  }
15074  for (pos = 0, err = 0; ; pos++) {
15075  name = PySequence_GetItem(all, pos);
15076  if (name == NULL) {
15077  if (!PyErr_ExceptionMatches(PyExc_IndexError))
15078  err = -1;
15079  else
15080  PyErr_Clear();
15081  break;
15082  }
15083  if (skip_leading_underscores &&
15084 #if PY_MAJOR_VERSION < 3
15085  likely(PyString_Check(name)) &&
15086  PyString_AS_STRING(name)[0] == '_')
15087 #else
15088  likely(PyUnicode_Check(name)) &&
15089  likely(__Pyx_PyUnicode_GET_LENGTH(name)) &&
15090  __Pyx_PyUnicode_READ_CHAR(name, 0) == '_')
15091 #endif
15092  {
15093  Py_DECREF(name);
15094  continue;
15095  }
15096  value = PyObject_GetAttr(v, name);
15097  if (value == NULL)
15098  err = -1;
15099  else if (PyDict_CheckExact(locals))
15100  err = PyDict_SetItem(locals, name, value);
15101  else
15102  err = PyObject_SetItem(locals, name, value);
15103  Py_DECREF(name);
15104  Py_XDECREF(value);
15105  if (err != 0)
15106  break;
15107  }
15108  Py_DECREF(all);
15109  return err;
15110 }
15111 static int __pyx_import_star(PyObject* m) {
15112  int i;
15113  int ret = -1;
15114  char* s;
15115  PyObject *locals = 0;
15116  PyObject *list = 0;
15117 #if PY_MAJOR_VERSION >= 3
15118  PyObject *utf8_name = 0;
15119 #endif
15120  PyObject *name;
15121  PyObject *item;
15122  locals = PyDict_New(); if (!locals) goto bad;
15123  if (__Pyx_import_all_from(locals, m) < 0) goto bad;
15124  list = PyDict_Items(locals); if (!list) goto bad;
15125  for(i=0; i<PyList_GET_SIZE(list); i++) {
15126  name = PyTuple_GET_ITEM(PyList_GET_ITEM(list, i), 0);
15127  item = PyTuple_GET_ITEM(PyList_GET_ITEM(list, i), 1);
15128 #if PY_MAJOR_VERSION >= 3
15129  utf8_name = PyUnicode_AsUTF8String(name);
15130  if (!utf8_name) goto bad;
15131  s = PyBytes_AS_STRING(utf8_name);
15132  if (__pyx_import_star_set(item, name, s) < 0) goto bad;
15133  Py_DECREF(utf8_name); utf8_name = 0;
15134 #else
15135  s = PyString_AsString(name);
15136  if (!s) goto bad;
15137  if (__pyx_import_star_set(item, name, s) < 0) goto bad;
15138 #endif
15139  }
15140  ret = 0;
15141 bad:
15142  Py_XDECREF(locals);
15143  Py_XDECREF(list);
15144 #if PY_MAJOR_VERSION >= 3
15145  Py_XDECREF(utf8_name);
15146 #endif
15147  return ret;
15148 }
15149 
15150 
15151 
15152 #if PY_MAJOR_VERSION >= 3
15153 #if CYTHON_PEP489_MULTI_PHASE_INIT
15154 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
15155 static int __pyx_pymod_exec_dtocean(PyObject* module); /*proto*/
15156 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
15157  {Py_mod_create, (void*)__pyx_pymod_create},
15158  {Py_mod_exec, (void*)__pyx_pymod_exec_dtocean},
15159  {0, NULL}
15160 };
15161 #endif
15162 
15163 static struct PyModuleDef __pyx_moduledef = {
15164  PyModuleDef_HEAD_INIT,
15165  "dtocean",
15166  0, /* m_doc */
15167  #if CYTHON_PEP489_MULTI_PHASE_INIT
15168  0, /* m_size */
15169  #else
15170  -1, /* m_size */
15171  #endif
15172  __pyx_methods /* m_methods */,
15173  #if CYTHON_PEP489_MULTI_PHASE_INIT
15174  __pyx_moduledef_slots, /* m_slots */
15175  #else
15176  NULL, /* m_reload */
15177  #endif
15178  NULL, /* m_traverse */
15179  NULL, /* m_clear */
15180  NULL /* m_free */
15181 };
15182 #endif
15183 #ifndef CYTHON_SMALL_CODE
15184 #if defined(__clang__)
15185  #define CYTHON_SMALL_CODE
15186 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
15187  #define CYTHON_SMALL_CODE __attribute__((cold))
15188 #else
15189  #define CYTHON_SMALL_CODE
15190 #endif
15191 #endif
15192 
15193 static __Pyx_StringTabEntry __pyx_string_tab[] = {
15194  {&__pyx_kp_u_3d, __pyx_k_3d, sizeof(__pyx_k_3d), 0, 1, 0, 0},
15195  {&__pyx_n_u_AINTB, __pyx_k_AINTB, sizeof(__pyx_k_AINTB), 0, 1, 0, 1},
15196  {&__pyx_n_u_AINTS, __pyx_k_AINTS, sizeof(__pyx_k_AINTS), 0, 1, 0, 1},
15197  {&__pyx_n_s_ArgumentParser, __pyx_k_ArgumentParser, sizeof(__pyx_k_ArgumentParser), 0, 0, 1, 1},
15198  {&__pyx_n_s_Axes3D, __pyx_k_Axes3D, sizeof(__pyx_k_Axes3D), 0, 0, 1, 1},
15199  {&__pyx_n_s_D2R, __pyx_k_D2R, sizeof(__pyx_k_D2R), 0, 0, 1, 1},
15200  {&__pyx_n_s_DataArray, __pyx_k_DataArray, sizeof(__pyx_k_DataArray), 0, 0, 1, 1},
15201  {&__pyx_n_s_Dataset, __pyx_k_Dataset, sizeof(__pyx_k_Dataset), 0, 0, 1, 1},
15202  {&__pyx_kp_u_Done, __pyx_k_Done, sizeof(__pyx_k_Done), 0, 1, 0, 0},
15203  {&__pyx_n_s_FileType, __pyx_k_FileType, sizeof(__pyx_k_FileType), 0, 0, 1, 1},
15204  {&__pyx_n_s_MaxNLocator, __pyx_k_MaxNLocator, sizeof(__pyx_k_MaxNLocator), 0, 0, 1, 1},
15205  {&__pyx_n_s_NAOT, __pyx_k_NAOT, sizeof(__pyx_k_NAOT), 0, 0, 1, 1},
15206  {&__pyx_n_s_NBIG, __pyx_k_NBIG, sizeof(__pyx_k_NBIG), 0, 0, 1, 1},
15207  {&__pyx_n_s_NRAA, __pyx_k_NRAA, sizeof(__pyx_k_NRAA), 0, 0, 1, 1},
15208  {&__pyx_n_s_NSMALL, __pyx_k_NSMALL, sizeof(__pyx_k_NSMALL), 0, 0, 1, 1},
15209  {&__pyx_n_s_NSZA, __pyx_k_NSZA, sizeof(__pyx_k_NSZA), 0, 0, 1, 1},
15210  {&__pyx_n_s_NVZA, __pyx_k_NVZA, sizeof(__pyx_k_NVZA), 0, 0, 1, 1},
15211  {&__pyx_n_s_NWL, __pyx_k_NWL, sizeof(__pyx_k_NWL), 0, 0, 1, 1},
15212  {&__pyx_n_s_NWS, __pyx_k_NWS, sizeof(__pyx_k_NWS), 0, 0, 1, 1},
15213  {&__pyx_kp_u_OCEAN_AEROSOL, __pyx_k_OCEAN_AEROSOL, sizeof(__pyx_k_OCEAN_AEROSOL), 0, 1, 0, 0},
15214  {&__pyx_n_u_PHC, __pyx_k_PHC, sizeof(__pyx_k_PHC), 0, 1, 0, 1},
15215  {&__pyx_kp_u_Processing_mode_0, __pyx_k_Processing_mode_0, sizeof(__pyx_k_Processing_mode_0), 0, 1, 0, 0},
15216  {&__pyx_n_u_REF_RAYALL, __pyx_k_REF_RAYALL, sizeof(__pyx_k_REF_RAYALL), 0, 1, 0, 1},
15217  {&__pyx_kp_u_Reading_Darktarget_LUT, __pyx_k_Reading_Darktarget_LUT, sizeof(__pyx_k_Reading_Darktarget_LUT), 0, 1, 0, 0},
15218  {&__pyx_kp_u_Reading_VIIRS_Data, __pyx_k_Reading_VIIRS_Data, sizeof(__pyx_k_Reading_VIIRS_Data), 0, 1, 0, 0},
15219  {&__pyx_n_u_TAUAB, __pyx_k_TAUAB, sizeof(__pyx_k_TAUAB), 0, 1, 0, 1},
15220  {&__pyx_n_u_TAUAS, __pyx_k_TAUAS, sizeof(__pyx_k_TAUAS), 0, 1, 0, 1},
15221  {&__pyx_n_u_THET, __pyx_k_THET, sizeof(__pyx_k_THET), 0, 1, 0, 1},
15222  {&__pyx_n_u_THET0, __pyx_k_THET0, sizeof(__pyx_k_THET0), 0, 1, 0, 1},
15223  {&__pyx_kp_u_Unable_to_initialize_output_file, __pyx_k_Unable_to_initialize_output_file, sizeof(__pyx_k_Unable_to_initialize_output_file), 0, 1, 0, 0},
15224  {&__pyx_kp_u_Unable_to_read_LUT_file_exiting, __pyx_k_Unable_to_read_LUT_file_exiting, sizeof(__pyx_k_Unable_to_read_LUT_file_exiting), 0, 1, 0, 0},
15225  {&__pyx_kp_u_Unable_to_read_from_input_file_e, __pyx_k_Unable_to_read_from_input_file_e, sizeof(__pyx_k_Unable_to_read_from_input_file_e), 0, 1, 0, 0},
15226  {&__pyx_n_s_W124, __pyx_k_W124, sizeof(__pyx_k_W124), 0, 0, 1, 1},
15227  {&__pyx_n_s_W164, __pyx_k_W164, sizeof(__pyx_k_W164), 0, 0, 1, 1},
15228  {&__pyx_n_s_W213, __pyx_k_W213, sizeof(__pyx_k_W213), 0, 0, 1, 1},
15229  {&__pyx_n_s_W470, __pyx_k_W470, sizeof(__pyx_k_W470), 0, 0, 1, 1},
15230  {&__pyx_n_s_W550, __pyx_k_W550, sizeof(__pyx_k_W550), 0, 0, 1, 1},
15231  {&__pyx_n_u_W550, __pyx_k_W550, sizeof(__pyx_k_W550), 0, 1, 0, 1},
15232  {&__pyx_n_s_W659, __pyx_k_W659, sizeof(__pyx_k_W659), 0, 0, 1, 1},
15233  {&__pyx_n_u_W659, __pyx_k_W659, sizeof(__pyx_k_W659), 0, 1, 0, 1},
15234  {&__pyx_n_s_W860, __pyx_k_W860, sizeof(__pyx_k_W860), 0, 0, 1, 1},
15235  {&__pyx_n_u_W860, __pyx_k_W860, sizeof(__pyx_k_W860), 0, 1, 0, 1},
15236  {&__pyx_n_u_WAVE, __pyx_k_WAVE, sizeof(__pyx_k_WAVE), 0, 1, 0, 1},
15237  {&__pyx_kp_u_Writing_to_file, __pyx_k_Writing_to_file, sizeof(__pyx_k_Writing_to_file), 0, 1, 0, 0},
15238  {&__pyx_kp_u__30, __pyx_k__30, sizeof(__pyx_k__30), 0, 1, 0, 0},
15239  {&__pyx_n_s__32, __pyx_k__32, sizeof(__pyx_k__32), 0, 0, 1, 1},
15240  {&__pyx_kp_u__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 1, 0, 0},
15241  {&__pyx_n_s_add_argument, __pyx_k_add_argument, sizeof(__pyx_k_add_argument), 0, 0, 1, 1},
15242  {&__pyx_n_s_add_subplot, __pyx_k_add_subplot, sizeof(__pyx_k_add_subplot), 0, 0, 1, 1},
15243  {&__pyx_kp_u_ancillary, __pyx_k_ancillary, sizeof(__pyx_k_ancillary), 0, 1, 0, 0},
15244  {&__pyx_n_s_aot, __pyx_k_aot, sizeof(__pyx_k_aot), 0, 0, 1, 1},
15245  {&__pyx_n_u_aot, __pyx_k_aot, sizeof(__pyx_k_aot), 0, 1, 0, 1},
15246  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
15247  {&__pyx_n_s_arange, __pyx_k_arange, sizeof(__pyx_k_arange), 0, 0, 1, 1},
15248  {&__pyx_n_s_argmin, __pyx_k_argmin, sizeof(__pyx_k_argmin), 0, 0, 1, 1},
15249  {&__pyx_n_s_argparse, __pyx_k_argparse, sizeof(__pyx_k_argparse), 0, 0, 1, 1},
15250  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
15251  {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
15252  {&__pyx_n_s_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 0, 0, 1, 1},
15253  {&__pyx_n_s_ax, __pyx_k_ax, sizeof(__pyx_k_ax), 0, 0, 1, 1},
15254  {&__pyx_n_s_axis, __pyx_k_axis, sizeof(__pyx_k_axis), 0, 0, 1, 1},
15255  {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
15256  {&__pyx_n_u_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 1, 0, 1},
15257  {&__pyx_n_s_big, __pyx_k_big, sizeof(__pyx_k_big), 0, 0, 1, 1},
15258  {&__pyx_kp_u_big_model, __pyx_k_big_model, sizeof(__pyx_k_big_model), 0, 1, 0, 0},
15259  {&__pyx_kp_u_big_small_continuum, __pyx_k_big_small_continuum, sizeof(__pyx_k_big_small_continuum), 0, 1, 0, 0},
15260  {&__pyx_n_s_bspair, __pyx_k_bspair, sizeof(__pyx_k_bspair), 0, 0, 1, 1},
15261  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
15262  {&__pyx_n_s_cld, __pyx_k_cld, sizeof(__pyx_k_cld), 0, 0, 1, 1},
15263  {&__pyx_n_s_clf, __pyx_k_clf, sizeof(__pyx_k_clf), 0, 0, 1, 1},
15264  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
15265  {&__pyx_n_s_clip, __pyx_k_clip, sizeof(__pyx_k_clip), 0, 0, 1, 1},
15266  {&__pyx_n_u_cloud_mask, __pyx_k_cloud_mask, sizeof(__pyx_k_cloud_mask), 0, 1, 0, 1},
15267  {&__pyx_n_s_col, __pyx_k_col, sizeof(__pyx_k_col), 0, 0, 1, 1},
15268  {&__pyx_n_s_color, __pyx_k_color, sizeof(__pyx_k_color), 0, 0, 1, 1},
15269  {&__pyx_n_s_cos, __pyx_k_cos, sizeof(__pyx_k_cos), 0, 0, 1, 1},
15270  {&__pyx_n_s_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1},
15271  {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
15272  {&__pyx_n_s_denom, __pyx_k_denom, sizeof(__pyx_k_denom), 0, 0, 1, 1},
15273  {&__pyx_n_s_dims, __pyx_k_dims, sizeof(__pyx_k_dims), 0, 0, 1, 1},
15274  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
15275  {&__pyx_n_s_dot, __pyx_k_dot, sizeof(__pyx_k_dot), 0, 0, 1, 1},
15276  {&__pyx_n_s_double, __pyx_k_double, sizeof(__pyx_k_double), 0, 0, 1, 1},
15277  {&__pyx_n_s_ds, __pyx_k_ds, sizeof(__pyx_k_ds), 0, 0, 1, 1},
15278  {&__pyx_n_s_dto, __pyx_k_dto, sizeof(__pyx_k_dto), 0, 0, 1, 1},
15279  {&__pyx_n_s_dtocean, __pyx_k_dtocean, sizeof(__pyx_k_dtocean), 0, 0, 1, 1},
15280  {&__pyx_n_s_dtocean___init, __pyx_k_dtocean___init, sizeof(__pyx_k_dtocean___init), 0, 0, 1, 1},
15281  {&__pyx_n_s_dtocean_interp_extrap, __pyx_k_dtocean_interp_extrap, sizeof(__pyx_k_dtocean_interp_extrap), 0, 0, 1, 1},
15282  {&__pyx_n_s_dtocean_plot, __pyx_k_dtocean_plot, sizeof(__pyx_k_dtocean_plot), 0, 0, 1, 1},
15283  {&__pyx_n_s_dtocean_plot_points, __pyx_k_dtocean_plot_points, sizeof(__pyx_k_dtocean_plot_points), 0, 0, 1, 1},
15284  {&__pyx_n_s_dtocean_proc_gran, __pyx_k_dtocean_proc_gran, sizeof(__pyx_k_dtocean_proc_gran), 0, 0, 1, 1},
15285  {&__pyx_n_s_dtocean_process, __pyx_k_dtocean_process, sizeof(__pyx_k_dtocean_process), 0, 0, 1, 1},
15286  {&__pyx_kp_s_dtocean_pyx, __pyx_k_dtocean_pyx, sizeof(__pyx_k_dtocean_pyx), 0, 0, 1, 0},
15287  {&__pyx_kp_u_dtocean_y_3_x_4_aot_0_3f_fmf_1_3, __pyx_k_dtocean_y_3_x_4_aot_0_3f_fmf_1_3, sizeof(__pyx_k_dtocean_y_3_x_4_aot_0_3f_fmf_1_3), 0, 1, 0, 0},
15288  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
15289  {&__pyx_n_s_err, __pyx_k_err, sizeof(__pyx_k_err), 0, 0, 1, 1},
15290  {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
15291  {&__pyx_n_s_fig, __pyx_k_fig, sizeof(__pyx_k_fig), 0, 0, 1, 1},
15292  {&__pyx_n_s_figure, __pyx_k_figure, sizeof(__pyx_k_figure), 0, 0, 1, 1},
15293  {&__pyx_n_s_fmf, __pyx_k_fmf, sizeof(__pyx_k_fmf), 0, 0, 1, 1},
15294  {&__pyx_n_u_fmf, __pyx_k_fmf, sizeof(__pyx_k_fmf), 0, 1, 0, 1},
15295  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
15296  {&__pyx_n_u_g, __pyx_k_g, sizeof(__pyx_k_g), 0, 1, 0, 1},
15297  {&__pyx_kp_u_geolocation, __pyx_k_geolocation, sizeof(__pyx_k_geolocation), 0, 1, 0, 0},
15298  {&__pyx_n_s_grid, __pyx_k_grid, sizeof(__pyx_k_grid), 0, 0, 1, 1},
15299  {&__pyx_n_s_group, __pyx_k_group, sizeof(__pyx_k_group), 0, 0, 1, 1},
15300  {&__pyx_n_s_help, __pyx_k_help, sizeof(__pyx_k_help), 0, 0, 1, 1},
15301  {&__pyx_kp_u_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 1, 0, 0},
15302  {&__pyx_n_s_i_2, __pyx_k_i_2, sizeof(__pyx_k_i_2), 0, 0, 1, 1},
15303  {&__pyx_n_s_ibm, __pyx_k_ibm, sizeof(__pyx_k_ibm), 0, 0, 1, 1},
15304  {&__pyx_n_s_ifile, __pyx_k_ifile, sizeof(__pyx_k_ifile), 0, 0, 1, 1},
15305  {&__pyx_kp_u_ifile_2, __pyx_k_ifile_2, sizeof(__pyx_k_ifile_2), 0, 1, 0, 0},
15306  {&__pyx_n_s_im, __pyx_k_im, sizeof(__pyx_k_im), 0, 0, 1, 1},
15307  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
15308  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
15309  {&__pyx_n_s_input, __pyx_k_input, sizeof(__pyx_k_input), 0, 0, 1, 1},
15310  {&__pyx_n_s_input___init, __pyx_k_input___init, sizeof(__pyx_k_input___init), 0, 0, 1, 1},
15311  {&__pyx_kp_u_input_file, __pyx_k_input_file, sizeof(__pyx_k_input_file), 0, 1, 0, 0},
15312  {&__pyx_n_s_inst, __pyx_k_inst, sizeof(__pyx_k_inst), 0, 0, 1, 1},
15313  {&__pyx_n_s_interp, __pyx_k_interp, sizeof(__pyx_k_interp), 0, 0, 1, 1},
15314  {&__pyx_n_s_interp_extrap, __pyx_k_interp_extrap, sizeof(__pyx_k_interp_extrap), 0, 0, 1, 1},
15315  {&__pyx_n_s_interpn, __pyx_k_interpn, sizeof(__pyx_k_interpn), 0, 0, 1, 1},
15316  {&__pyx_kp_u_interpolate_to_reflectance_for_e, __pyx_k_interpolate_to_reflectance_for_e, sizeof(__pyx_k_interpolate_to_reflectance_for_e), 0, 1, 0, 0},
15317  {&__pyx_n_s_iph, __pyx_k_iph, sizeof(__pyx_k_iph), 0, 0, 1, 1},
15318  {&__pyx_n_s_ism, __pyx_k_ism, sizeof(__pyx_k_ism), 0, 0, 1, 1},
15319  {&__pyx_n_s_isz, __pyx_k_isz, sizeof(__pyx_k_isz), 0, 0, 1, 1},
15320  {&__pyx_n_s_itau, __pyx_k_itau, sizeof(__pyx_k_itau), 0, 0, 1, 1},
15321  {&__pyx_n_s_ith, __pyx_k_ith, sizeof(__pyx_k_ith), 0, 0, 1, 1},
15322  {&__pyx_n_s_iwl, __pyx_k_iwl, sizeof(__pyx_k_iwl), 0, 0, 1, 1},
15323  {&__pyx_n_s_iwn, __pyx_k_iwn, sizeof(__pyx_k_iwn), 0, 0, 1, 1},
15324  {&__pyx_n_s_ix, __pyx_k_ix, sizeof(__pyx_k_ix), 0, 0, 1, 1},
15325  {&__pyx_n_s_iy, __pyx_k_iy, sizeof(__pyx_k_iy), 0, 0, 1, 1},
15326  {&__pyx_n_u_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 1, 0, 1},
15327  {&__pyx_kp_u_l, __pyx_k_l, sizeof(__pyx_k_l), 0, 1, 0, 0},
15328  {&__pyx_n_s_l1b_filepath, __pyx_k_l1b_filepath, sizeof(__pyx_k_l1b_filepath), 0, 0, 1, 1},
15329  {&__pyx_n_s_label, __pyx_k_label, sizeof(__pyx_k_label), 0, 0, 1, 1},
15330  {&__pyx_n_s_lat, __pyx_k_lat, sizeof(__pyx_k_lat), 0, 0, 1, 1},
15331  {&__pyx_n_u_lat, __pyx_k_lat, sizeof(__pyx_k_lat), 0, 1, 0, 1},
15332  {&__pyx_n_u_latitude, __pyx_k_latitude, sizeof(__pyx_k_latitude), 0, 1, 0, 1},
15333  {&__pyx_n_s_lb, __pyx_k_lb, sizeof(__pyx_k_lb), 0, 0, 1, 1},
15334  {&__pyx_n_s_legend, __pyx_k_legend, sizeof(__pyx_k_legend), 0, 0, 1, 1},
15335  {&__pyx_n_s_linspace, __pyx_k_linspace, sizeof(__pyx_k_linspace), 0, 0, 1, 1},
15336  {&__pyx_n_s_load_dataset, __pyx_k_load_dataset, sizeof(__pyx_k_load_dataset), 0, 0, 1, 1},
15337  {&__pyx_n_s_loc, __pyx_k_loc, sizeof(__pyx_k_loc), 0, 0, 1, 1},
15338  {&__pyx_n_s_lon, __pyx_k_lon, sizeof(__pyx_k_lon), 0, 0, 1, 1},
15339  {&__pyx_n_u_lon, __pyx_k_lon, sizeof(__pyx_k_lon), 0, 1, 0, 1},
15340  {&__pyx_n_u_longitude, __pyx_k_longitude, sizeof(__pyx_k_longitude), 0, 1, 0, 1},
15341  {&__pyx_kp_u_lookup_table_file, __pyx_k_lookup_table_file, sizeof(__pyx_k_lookup_table_file), 0, 1, 0, 0},
15342  {&__pyx_n_s_ls, __pyx_k_ls, sizeof(__pyx_k_ls), 0, 0, 1, 1},
15343  {&__pyx_kp_u_lut, __pyx_k_lut, sizeof(__pyx_k_lut), 0, 1, 0, 0},
15344  {&__pyx_n_s_lut_2, __pyx_k_lut_2, sizeof(__pyx_k_lut_2), 0, 0, 1, 1},
15345  {&__pyx_n_s_lut_filepath, __pyx_k_lut_filepath, sizeof(__pyx_k_lut_filepath), 0, 0, 1, 1},
15346  {&__pyx_kp_u_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 1, 0, 0},
15347  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
15348  {&__pyx_n_u_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 1, 0, 1},
15349  {&__pyx_n_s_main_2, __pyx_k_main_2, sizeof(__pyx_k_main_2), 0, 0, 1, 1},
15350  {&__pyx_n_s_marker, __pyx_k_marker, sizeof(__pyx_k_marker), 0, 0, 1, 1},
15351  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
15352  {&__pyx_n_s_matplotlib, __pyx_k_matplotlib, sizeof(__pyx_k_matplotlib), 0, 0, 1, 1},
15353  {&__pyx_n_s_matplotlib_pyplot, __pyx_k_matplotlib_pyplot, sizeof(__pyx_k_matplotlib_pyplot), 0, 0, 1, 1},
15354  {&__pyx_n_s_matplotlib_ticker, __pyx_k_matplotlib_ticker, sizeof(__pyx_k_matplotlib_ticker), 0, 0, 1, 1},
15355  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
15356  {&__pyx_n_s_max_rfl, __pyx_k_max_rfl, sizeof(__pyx_k_max_rfl), 0, 0, 1, 1},
15357  {&__pyx_n_u_measured, __pyx_k_measured, sizeof(__pyx_k_measured), 0, 1, 0, 1},
15358  {&__pyx_n_s_meshgrid, __pyx_k_meshgrid, sizeof(__pyx_k_meshgrid), 0, 0, 1, 1},
15359  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
15360  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
15361  {&__pyx_n_s_min_rfl, __pyx_k_min_rfl, sizeof(__pyx_k_min_rfl), 0, 0, 1, 1},
15362  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
15363  {&__pyx_kp_u_mode_2, __pyx_k_mode_2, sizeof(__pyx_k_mode_2), 0, 1, 0, 0},
15364  {&__pyx_kp_u_mode_option, __pyx_k_mode_option, sizeof(__pyx_k_mode_option), 0, 1, 0, 0},
15365  {&__pyx_n_u_modeled, __pyx_k_modeled, sizeof(__pyx_k_modeled), 0, 1, 0, 1},
15366  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
15367  {&__pyx_n_s_mpl_toolkits_mplot3d, __pyx_k_mpl_toolkits_mplot3d, sizeof(__pyx_k_mpl_toolkits_mplot3d), 0, 0, 1, 1},
15368  {&__pyx_n_s_mrfl, __pyx_k_mrfl, sizeof(__pyx_k_mrfl), 0, 0, 1, 1},
15369  {&__pyx_n_s_mrflb, __pyx_k_mrflb, sizeof(__pyx_k_mrflb), 0, 0, 1, 1},
15370  {&__pyx_n_s_mrflr, __pyx_k_mrflr, sizeof(__pyx_k_mrflr), 0, 0, 1, 1},
15371  {&__pyx_n_s_mrfls, __pyx_k_mrfls, sizeof(__pyx_k_mrfls), 0, 0, 1, 1},
15372  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
15373  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
15374  {&__pyx_kp_u_navigation_data, __pyx_k_navigation_data, sizeof(__pyx_k_navigation_data), 0, 1, 0, 0},
15375  {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
15376  {&__pyx_n_s_num, __pyx_k_num, sizeof(__pyx_k_num), 0, 0, 1, 1},
15377  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
15378  {&__pyx_n_u_o, __pyx_k_o, sizeof(__pyx_k_o), 0, 1, 0, 1},
15379  {&__pyx_kp_u_o_2, __pyx_k_o_2, sizeof(__pyx_k_o_2), 0, 1, 0, 0},
15380  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
15381  {&__pyx_n_s_ofile, __pyx_k_ofile, sizeof(__pyx_k_ofile), 0, 0, 1, 1},
15382  {&__pyx_kp_u_ofile_2, __pyx_k_ofile_2, sizeof(__pyx_k_ofile_2), 0, 1, 0, 0},
15383  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
15384  {&__pyx_n_s_out_filepath, __pyx_k_out_filepath, sizeof(__pyx_k_out_filepath), 0, 0, 1, 1},
15385  {&__pyx_n_s_output, __pyx_k_output, sizeof(__pyx_k_output), 0, 0, 1, 1},
15386  {&__pyx_n_s_output___init, __pyx_k_output___init, sizeof(__pyx_k_output___init), 0, 0, 1, 1},
15387  {&__pyx_kp_u_output_file, __pyx_k_output_file, sizeof(__pyx_k_output_file), 0, 1, 0, 0},
15388  {&__pyx_n_s_output_write, __pyx_k_output_write, sizeof(__pyx_k_output_write), 0, 0, 1, 1},
15389  {&__pyx_kp_u_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 1, 0, 0},
15390  {&__pyx_n_s_parse_args, __pyx_k_parse_args, sizeof(__pyx_k_parse_args), 0, 0, 1, 1},
15391  {&__pyx_n_s_parser, __pyx_k_parser, sizeof(__pyx_k_parser), 0, 0, 1, 1},
15392  {&__pyx_n_s_pi, __pyx_k_pi, sizeof(__pyx_k_pi), 0, 0, 1, 1},
15393  {&__pyx_n_s_plot, __pyx_k_plot, sizeof(__pyx_k_plot), 0, 0, 1, 1},
15394  {&__pyx_kp_u_plot_2, __pyx_k_plot_2, sizeof(__pyx_k_plot_2), 0, 1, 0, 0},
15395  {&__pyx_kp_u_plot_pixel_data, __pyx_k_plot_pixel_data, sizeof(__pyx_k_plot_pixel_data), 0, 1, 0, 0},
15396  {&__pyx_n_s_plot_points, __pyx_k_plot_points, sizeof(__pyx_k_plot_points), 0, 0, 1, 1},
15397  {&__pyx_n_s_plot_wireframe, __pyx_k_plot_wireframe, sizeof(__pyx_k_plot_wireframe), 0, 0, 1, 1},
15398  {&__pyx_n_s_plt, __pyx_k_plt, sizeof(__pyx_k_plt), 0, 0, 1, 1},
15399  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
15400  {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
15401  {&__pyx_n_s_proc_gran, __pyx_k_proc_gran, sizeof(__pyx_k_proc_gran), 0, 0, 1, 1},
15402  {&__pyx_n_s_process, __pyx_k_process, sizeof(__pyx_k_process), 0, 0, 1, 1},
15403  {&__pyx_n_s_projection, __pyx_k_projection, sizeof(__pyx_k_projection), 0, 0, 1, 1},
15404  {&__pyx_n_s_pts, __pyx_k_pts, sizeof(__pyx_k_pts), 0, 0, 1, 1},
15405  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
15406  {&__pyx_n_u_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 1, 0, 1},
15407  {&__pyx_n_s_r_pts, __pyx_k_r_pts, sizeof(__pyx_k_r_pts), 0, 0, 1, 1},
15408  {&__pyx_n_s_raa, __pyx_k_raa, sizeof(__pyx_k_raa), 0, 0, 1, 1},
15409  {&__pyx_n_u_raa, __pyx_k_raa, sizeof(__pyx_k_raa), 0, 1, 0, 1},
15410  {&__pyx_n_s_raa_pts, __pyx_k_raa_pts, sizeof(__pyx_k_raa_pts), 0, 0, 1, 1},
15411  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
15412  {&__pyx_n_s_rayl, __pyx_k_rayl, sizeof(__pyx_k_rayl), 0, 0, 1, 1},
15413  {&__pyx_n_s_rbdif, __pyx_k_rbdif, sizeof(__pyx_k_rbdif), 0, 0, 1, 1},
15414  {&__pyx_n_s_rbsb, __pyx_k_rbsb, sizeof(__pyx_k_rbsb), 0, 0, 1, 1},
15415  {&__pyx_n_u_reflectance, __pyx_k_reflectance, sizeof(__pyx_k_reflectance), 0, 1, 0, 1},
15416  {&__pyx_kp_u_reflectance_2, __pyx_k_reflectance_2, sizeof(__pyx_k_reflectance_2), 0, 1, 0, 0},
15417  {&__pyx_n_u_relative_azimuth, __pyx_k_relative_azimuth, sizeof(__pyx_k_relative_azimuth), 0, 1, 0, 1},
15418  {&__pyx_n_s_required, __pyx_k_required, sizeof(__pyx_k_required), 0, 0, 1, 1},
15419  {&__pyx_n_u_residual, __pyx_k_residual, sizeof(__pyx_k_residual), 0, 1, 0, 1},
15420  {&__pyx_n_s_rfl, __pyx_k_rfl, sizeof(__pyx_k_rfl), 0, 0, 1, 1},
15421  {&__pyx_n_u_rfl, __pyx_k_rfl, sizeof(__pyx_k_rfl), 0, 1, 0, 1},
15422  {&__pyx_n_s_rfl_pts, __pyx_k_rfl_pts, sizeof(__pyx_k_rfl_pts), 0, 0, 1, 1},
15423  {&__pyx_n_s_row, __pyx_k_row, sizeof(__pyx_k_row), 0, 0, 1, 1},
15424  {&__pyx_n_s_rsd, __pyx_k_rsd, sizeof(__pyx_k_rsd), 0, 0, 1, 1},
15425  {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
15426  {&__pyx_n_s_sb2, __pyx_k_sb2, sizeof(__pyx_k_sb2), 0, 0, 1, 1},
15427  {&__pyx_n_s_sbdif, __pyx_k_sbdif, sizeof(__pyx_k_sbdif), 0, 0, 1, 1},
15428  {&__pyx_n_s_scatter, __pyx_k_scatter, sizeof(__pyx_k_scatter), 0, 0, 1, 1},
15429  {&__pyx_n_s_scipy_interpolate, __pyx_k_scipy_interpolate, sizeof(__pyx_k_scipy_interpolate), 0, 0, 1, 1},
15430  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
15431  {&__pyx_n_u_sensor_zenith, __pyx_k_sensor_zenith, sizeof(__pyx_k_sensor_zenith), 0, 1, 0, 1},
15432  {&__pyx_n_s_set_xlabel, __pyx_k_set_xlabel, sizeof(__pyx_k_set_xlabel), 0, 0, 1, 1},
15433  {&__pyx_n_s_set_ylabel, __pyx_k_set_ylabel, sizeof(__pyx_k_set_ylabel), 0, 0, 1, 1},
15434  {&__pyx_n_s_set_zlabel, __pyx_k_set_zlabel, sizeof(__pyx_k_set_zlabel), 0, 0, 1, 1},
15435  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
15436  {&__pyx_n_s_show, __pyx_k_show, sizeof(__pyx_k_show), 0, 0, 1, 1},
15437  {&__pyx_n_s_shpb, __pyx_k_shpb, sizeof(__pyx_k_shpb), 0, 0, 1, 1},
15438  {&__pyx_n_s_shps, __pyx_k_shps, sizeof(__pyx_k_shps), 0, 0, 1, 1},
15439  {&__pyx_n_s_small, __pyx_k_small, sizeof(__pyx_k_small), 0, 0, 1, 1},
15440  {&__pyx_kp_u_small_model, __pyx_k_small_model, sizeof(__pyx_k_small_model), 0, 1, 0, 0},
15441  {&__pyx_n_u_solar_zenith, __pyx_k_solar_zenith, sizeof(__pyx_k_solar_zenith), 0, 1, 0, 1},
15442  {&__pyx_kp_u_square_side, __pyx_k_square_side, sizeof(__pyx_k_square_side), 0, 1, 0, 0},
15443  {&__pyx_n_s_sse, __pyx_k_sse, sizeof(__pyx_k_sse), 0, 0, 1, 1},
15444  {&__pyx_n_u_sse, __pyx_k_sse, sizeof(__pyx_k_sse), 0, 1, 0, 1},
15445  {&__pyx_n_s_stack, __pyx_k_stack, sizeof(__pyx_k_stack), 0, 0, 1, 1},
15446  {&__pyx_kp_u_start_line, __pyx_k_start_line, sizeof(__pyx_k_start_line), 0, 1, 0, 0},
15447  {&__pyx_kp_u_start_pixel, __pyx_k_start_pixel, sizeof(__pyx_k_start_pixel), 0, 1, 0, 0},
15448  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
15449  {&__pyx_n_s_sza, __pyx_k_sza, sizeof(__pyx_k_sza), 0, 0, 1, 1},
15450  {&__pyx_n_u_sza, __pyx_k_sza, sizeof(__pyx_k_sza), 0, 1, 0, 1},
15451  {&__pyx_n_s_sza_pts, __pyx_k_sza_pts, sizeof(__pyx_k_sza_pts), 0, 0, 1, 1},
15452  {&__pyx_n_s_tau_pts, __pyx_k_tau_pts, sizeof(__pyx_k_tau_pts), 0, 0, 1, 1},
15453  {&__pyx_n_s_taub, __pyx_k_taub, sizeof(__pyx_k_taub), 0, 0, 1, 1},
15454  {&__pyx_n_s_taus, __pyx_k_taus, sizeof(__pyx_k_taus), 0, 0, 1, 1},
15455  {&__pyx_n_s_tauxb, __pyx_k_tauxb, sizeof(__pyx_k_tauxb), 0, 0, 1, 1},
15456  {&__pyx_n_s_tauxs, __pyx_k_tauxs, sizeof(__pyx_k_tauxs), 0, 0, 1, 1},
15457  {&__pyx_n_s_tblut, __pyx_k_tblut, sizeof(__pyx_k_tblut), 0, 0, 1, 1},
15458  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
15459  {&__pyx_n_s_title, __pyx_k_title, sizeof(__pyx_k_title), 0, 0, 1, 1},
15460  {&__pyx_n_s_to_netcdf, __pyx_k_to_netcdf, sizeof(__pyx_k_to_netcdf), 0, 0, 1, 1},
15461  {&__pyx_n_u_toa_reflectance, __pyx_k_toa_reflectance, sizeof(__pyx_k_toa_reflectance), 0, 1, 0, 1},
15462  {&__pyx_n_s_toab, __pyx_k_toab, sizeof(__pyx_k_toab), 0, 0, 1, 1},
15463  {&__pyx_n_s_toabt, __pyx_k_toabt, sizeof(__pyx_k_toabt), 0, 0, 1, 1},
15464  {&__pyx_n_s_toar, __pyx_k_toar, sizeof(__pyx_k_toar), 0, 0, 1, 1},
15465  {&__pyx_n_s_toas, __pyx_k_toas, sizeof(__pyx_k_toas), 0, 0, 1, 1},
15466  {&__pyx_n_s_toast, __pyx_k_toast, sizeof(__pyx_k_toast), 0, 0, 1, 1},
15467  {&__pyx_n_s_transpose, __pyx_k_transpose, sizeof(__pyx_k_transpose), 0, 0, 1, 1},
15468  {&__pyx_n_s_trflb, __pyx_k_trflb, sizeof(__pyx_k_trflb), 0, 0, 1, 1},
15469  {&__pyx_n_s_trfls, __pyx_k_trfls, sizeof(__pyx_k_trfls), 0, 0, 1, 1},
15470  {&__pyx_n_s_ts, __pyx_k_ts, sizeof(__pyx_k_ts), 0, 0, 1, 1},
15471  {&__pyx_n_s_tslut, __pyx_k_tslut, sizeof(__pyx_k_tslut), 0, 0, 1, 1},
15472  {&__pyx_n_s_tstr, __pyx_k_tstr, sizeof(__pyx_k_tstr), 0, 0, 1, 1},
15473  {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
15474  {&__pyx_n_u_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 1, 0, 1},
15475  {&__pyx_n_s_units, __pyx_k_units, sizeof(__pyx_k_units), 0, 0, 1, 1},
15476  {&__pyx_kp_u_upper_right, __pyx_k_upper_right, sizeof(__pyx_k_upper_right), 0, 1, 0, 0},
15477  {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
15478  {&__pyx_n_s_vin, __pyx_k_vin, sizeof(__pyx_k_vin), 0, 0, 1, 1},
15479  {&__pyx_n_s_vout, __pyx_k_vout, sizeof(__pyx_k_vout), 0, 0, 1, 1},
15480  {&__pyx_n_s_vza, __pyx_k_vza, sizeof(__pyx_k_vza), 0, 0, 1, 1},
15481  {&__pyx_n_u_vza, __pyx_k_vza, sizeof(__pyx_k_vza), 0, 1, 0, 1},
15482  {&__pyx_n_s_vza_pts, __pyx_k_vza_pts, sizeof(__pyx_k_vza_pts), 0, 0, 1, 1},
15483  {&__pyx_n_u_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 1, 0, 1},
15484  {&__pyx_kp_u_wavelength_nm, __pyx_k_wavelength_nm, sizeof(__pyx_k_wavelength_nm), 0, 1, 0, 0},
15485  {&__pyx_n_u_wind_speed, __pyx_k_wind_speed, sizeof(__pyx_k_wind_speed), 0, 1, 0, 1},
15486  {&__pyx_n_u_wl, __pyx_k_wl, sizeof(__pyx_k_wl), 0, 1, 0, 1},
15487  {&__pyx_n_s_wl_pts, __pyx_k_wl_pts, sizeof(__pyx_k_wl_pts), 0, 0, 1, 1},
15488  {&__pyx_n_s_wnd, __pyx_k_wnd, sizeof(__pyx_k_wnd), 0, 0, 1, 1},
15489  {&__pyx_n_u_wnd, __pyx_k_wnd, sizeof(__pyx_k_wnd), 0, 1, 0, 1},
15490  {&__pyx_n_s_wnd_pts, __pyx_k_wnd_pts, sizeof(__pyx_k_wnd_pts), 0, 0, 1, 1},
15491  {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
15492  {&__pyx_n_s_ws, __pyx_k_ws, sizeof(__pyx_k_ws), 0, 0, 1, 1},
15493  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
15494  {&__pyx_n_u_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 1, 0, 1},
15495  {&__pyx_n_s_xarray, __pyx_k_xarray, sizeof(__pyx_k_xarray), 0, 0, 1, 1},
15496  {&__pyx_n_s_xb, __pyx_k_xb, sizeof(__pyx_k_xb), 0, 0, 1, 1},
15497  {&__pyx_n_s_xdim, __pyx_k_xdim, sizeof(__pyx_k_xdim), 0, 0, 1, 1},
15498  {&__pyx_n_s_xin, __pyx_k_xin, sizeof(__pyx_k_xin), 0, 0, 1, 1},
15499  {&__pyx_n_s_xit, __pyx_k_xit, sizeof(__pyx_k_xit), 0, 0, 1, 1},
15500  {&__pyx_n_s_xlabel, __pyx_k_xlabel, sizeof(__pyx_k_xlabel), 0, 0, 1, 1},
15501  {&__pyx_n_s_xm, __pyx_k_xm, sizeof(__pyx_k_xm), 0, 0, 1, 1},
15502  {&__pyx_n_s_xp, __pyx_k_xp, sizeof(__pyx_k_xp), 0, 0, 1, 1},
15503  {&__pyx_n_s_xr, __pyx_k_xr, sizeof(__pyx_k_xr), 0, 0, 1, 1},
15504  {&__pyx_n_s_xs, __pyx_k_xs, sizeof(__pyx_k_xs), 0, 0, 1, 1},
15505  {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1},
15506  {&__pyx_n_u_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 1, 0, 1},
15507  {&__pyx_n_s_yb, __pyx_k_yb, sizeof(__pyx_k_yb), 0, 0, 1, 1},
15508  {&__pyx_n_s_ydim, __pyx_k_ydim, sizeof(__pyx_k_ydim), 0, 0, 1, 1},
15509  {&__pyx_n_s_ylabel, __pyx_k_ylabel, sizeof(__pyx_k_ylabel), 0, 0, 1, 1},
15510  {&__pyx_n_s_ym, __pyx_k_ym, sizeof(__pyx_k_ym), 0, 0, 1, 1},
15511  {&__pyx_n_s_yout, __pyx_k_yout, sizeof(__pyx_k_yout), 0, 0, 1, 1},
15512  {&__pyx_n_s_yp, __pyx_k_yp, sizeof(__pyx_k_yp), 0, 0, 1, 1},
15513  {&__pyx_n_s_ys, __pyx_k_ys, sizeof(__pyx_k_ys), 0, 0, 1, 1},
15514  {&__pyx_n_s_z, __pyx_k_z, sizeof(__pyx_k_z), 0, 0, 1, 1},
15515  {&__pyx_n_u_z, __pyx_k_z, sizeof(__pyx_k_z), 0, 1, 0, 1},
15516  {&__pyx_n_s_zb, __pyx_k_zb, sizeof(__pyx_k_zb), 0, 0, 1, 1},
15517  {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
15518  {&__pyx_n_s_zeros_like, __pyx_k_zeros_like, sizeof(__pyx_k_zeros_like), 0, 0, 1, 1},
15519  {&__pyx_n_s_zm, __pyx_k_zm, sizeof(__pyx_k_zm), 0, 0, 1, 1},
15520  {&__pyx_n_s_zp, __pyx_k_zp, sizeof(__pyx_k_zp), 0, 0, 1, 1},
15521  {&__pyx_n_s_zs, __pyx_k_zs, sizeof(__pyx_k_zs), 0, 0, 1, 1},
15522  {0, 0, 0, 0, 0, 0, 0}
15523 };
15524 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
15525  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 33, __pyx_L1_error)
15526  __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 36, __pyx_L1_error)
15527  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 73, __pyx_L1_error)
15528  return 0;
15529  __pyx_L1_error:;
15530  return -1;
15531 }
15532 
15533 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
15534  __Pyx_RefNannyDeclarations
15535  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
15536 
15537  /* "dtocean.pyx":52
15538  * self.vza_pts=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['THET'].values
15539  * self.sza_pts=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL')['THET0'].values
15540  * self.taus = np.transpose(self.taus,(0,1,2)) # <<<<<<<<<<<<<<
15541  * self.taub = np.transpose(self.taub,(0,1,2))
15542  * self.toas = np.transpose(self.toas,(3,4,5,6,0,1,2))
15543  */
15544  __pyx_tuple_ = PyTuple_Pack(3, __pyx_int_0, __pyx_int_1, __pyx_int_2); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 52, __pyx_L1_error)
15545  __Pyx_GOTREF(__pyx_tuple_);
15546  __Pyx_GIVEREF(__pyx_tuple_);
15547 
15548  /* "dtocean.pyx":54
15549  * self.taus = np.transpose(self.taus,(0,1,2))
15550  * self.taub = np.transpose(self.taub,(0,1,2))
15551  * self.toas = np.transpose(self.toas,(3,4,5,6,0,1,2)) # <<<<<<<<<<<<<<
15552  * self.toab = np.transpose(self.toab,(3,4,5,6,0,1,2))
15553  * self.toar = np.transpose(self.toar,(1,2,3,4,0))
15554  */
15555  __pyx_tuple__2 = PyTuple_Pack(7, __pyx_int_3, __pyx_int_4, __pyx_int_5, __pyx_int_6, __pyx_int_0, __pyx_int_1, __pyx_int_2); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 54, __pyx_L1_error)
15556  __Pyx_GOTREF(__pyx_tuple__2);
15557  __Pyx_GIVEREF(__pyx_tuple__2);
15558 
15559  /* "dtocean.pyx":56
15560  * self.toas = np.transpose(self.toas,(3,4,5,6,0,1,2))
15561  * self.toab = np.transpose(self.toab,(3,4,5,6,0,1,2))
15562  * self.toar = np.transpose(self.toar,(1,2,3,4,0)) # <<<<<<<<<<<<<<
15563  * self.wnd_pts = np.array([0.0, 6.0, 10.0, 16.0])
15564  * self.tau_pts = (self.taus[W550,0,:])
15565  */
15566  __pyx_tuple__3 = PyTuple_Pack(5, __pyx_int_1, __pyx_int_2, __pyx_int_3, __pyx_int_4, __pyx_int_0); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 56, __pyx_L1_error)
15567  __Pyx_GOTREF(__pyx_tuple__3);
15568  __Pyx_GIVEREF(__pyx_tuple__3);
15569 
15570  /* "dtocean.pyx":58
15571  * self.toar = np.transpose(self.toar,(1,2,3,4,0))
15572  * self.wnd_pts = np.array([0.0, 6.0, 10.0, 16.0])
15573  * self.tau_pts = (self.taus[W550,0,:]) # <<<<<<<<<<<<<<
15574  * self.pts = (self.wnd_pts, self.sza_pts, self.vza_pts, self.raa_pts)
15575  * except Exception as inst:
15576  */
15577  __pyx_slice__4 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__4)) __PYX_ERR(0, 58, __pyx_L1_error)
15578  __Pyx_GOTREF(__pyx_slice__4);
15579  __Pyx_GIVEREF(__pyx_slice__4);
15580 
15581  /* "dtocean.pyx":63
15582  * print(type(inst))
15583  * print(inst)
15584  * print ("Unable to read LUT file ... exiting") # <<<<<<<<<<<<<<
15585  * sys.exit()
15586  *
15587  */
15588  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Unable_to_read_LUT_file_exiting); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 63, __pyx_L1_error)
15589  __Pyx_GOTREF(__pyx_tuple__5);
15590  __Pyx_GIVEREF(__pyx_tuple__5);
15591 
15592  /* "dtocean.pyx":112
15593  * np.interp(self.rfl_pts,self.toab[iwl,ism,:,iwn,isz,ith,iph],self.tau_pts)
15594  *
15595  * print("interpolate to reflectance for each wavelength and model") # <<<<<<<<<<<<<<
15596  * for iwl in range(NWL):
15597  * for itau in range(NAOT):
15598  */
15599  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_interpolate_to_reflectance_for_e); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 112, __pyx_L1_error)
15600  __Pyx_GOTREF(__pyx_tuple__6);
15601  __Pyx_GIVEREF(__pyx_tuple__6);
15602 
15603  /* "dtocean.pyx":157
15604  * rbdif = rfl - trflb[:,ibm]
15605  * sbdif = trfls[:,ism] - trflb[:,ibm]
15606  * sb2 = np.dot(sbdif[1:]/denom[1:],sbdif[1:]/denom[1:]) # <<<<<<<<<<<<<<
15607  * rbsb = np.dot(rbdif[1:]/denom[1:],sbdif[1:]/denom[1:])
15608  * xm = rbsb/sb2
15609  */
15610  __pyx_slice__7 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__7)) __PYX_ERR(0, 157, __pyx_L1_error)
15611  __Pyx_GOTREF(__pyx_slice__7);
15612  __Pyx_GIVEREF(__pyx_slice__7);
15613 
15614  /* "dtocean.pyx":195
15615  * def plot_points(self):
15616  * fig = plt.figure()
15617  * ax = fig.add_subplot(111, projection='3d') # <<<<<<<<<<<<<<
15618  * for s in small:
15619  * xs = toast[W550,s,:]
15620  */
15621  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_int_111); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 195, __pyx_L1_error)
15622  __Pyx_GOTREF(__pyx_tuple__9);
15623  __Pyx_GIVEREF(__pyx_tuple__9);
15624 
15625  /* "dtocean.pyx":239
15626  * ls = np.zeros((NWL,NAOT+1))
15627  * lb = np.zeros((NWL,NAOT+1))
15628  * ls[:,:-1] = toast[:,s,:] # <<<<<<<<<<<<<<
15629  * ls[:,NAOT] = ls[:,NAOT-1]
15630  * ax.plot_wireframe(ws, ts, ls, color='b', label="small model")
15631  */
15632  __pyx_slice__10 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__10)) __PYX_ERR(0, 239, __pyx_L1_error)
15633  __Pyx_GOTREF(__pyx_slice__10);
15634  __Pyx_GIVEREF(__pyx_slice__10);
15635  __pyx_tuple__11 = PyTuple_Pack(2, __pyx_slice__4, __pyx_slice__10); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 239, __pyx_L1_error)
15636  __Pyx_GOTREF(__pyx_tuple__11);
15637  __Pyx_GIVEREF(__pyx_tuple__11);
15638 
15639  /* "dtocean.pyx":253
15640  * print ("Reading VIIRS Data: " + self.ifile)
15641  * try:
15642  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:].values, # <<<<<<<<<<<<<<
15643  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:].values,axis=0)
15644  * self.sza = xr.load_dataset(l1b_filepath,group='/geolocation')['solar_zenith'].values
15645  */
15646  __pyx_slice__12 = PySlice_New(__pyx_int_2, __pyx_int_7, Py_None); if (unlikely(!__pyx_slice__12)) __PYX_ERR(0, 253, __pyx_L1_error)
15647  __Pyx_GOTREF(__pyx_slice__12);
15648  __Pyx_GIVEREF(__pyx_slice__12);
15649  __pyx_tuple__13 = PyTuple_Pack(3, __pyx_slice__12, __pyx_slice__4, __pyx_slice__4); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 253, __pyx_L1_error)
15650  __Pyx_GOTREF(__pyx_tuple__13);
15651  __Pyx_GIVEREF(__pyx_tuple__13);
15652 
15653  /* "dtocean.pyx":254
15654  * try:
15655  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:].values,
15656  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:].values,axis=0) # <<<<<<<<<<<<<<
15657  * self.sza = xr.load_dataset(l1b_filepath,group='/geolocation')['solar_zenith'].values
15658  * self.vza = xr.load_dataset(l1b_filepath,group='/geolocation')['sensor_zenith'].values
15659  */
15660  __pyx_slice__14 = PySlice_New(__pyx_int_8, Py_None, Py_None); if (unlikely(!__pyx_slice__14)) __PYX_ERR(0, 254, __pyx_L1_error)
15661  __Pyx_GOTREF(__pyx_slice__14);
15662  __Pyx_GIVEREF(__pyx_slice__14);
15663  __pyx_tuple__15 = PyTuple_Pack(3, __pyx_slice__14, __pyx_slice__4, __pyx_slice__4); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 254, __pyx_L1_error)
15664  __Pyx_GOTREF(__pyx_tuple__15);
15665  __Pyx_GIVEREF(__pyx_tuple__15);
15666 
15667  /* "dtocean.pyx":262
15668  * self.cld = xr.load_dataset(l1b_filepath,group='/ancillary')['cloud_mask'].values
15669  * self.wnd = xr.load_dataset(l1b_filepath,group='/ancillary')['wind_speed'].values
15670  * self.rfl = np.transpose(self.rfl, (1,2,0)) # <<<<<<<<<<<<<<
15671  * except Exception as inst:
15672  * print(type(inst))
15673  */
15674  __pyx_tuple__16 = PyTuple_Pack(3, __pyx_int_1, __pyx_int_2, __pyx_int_0); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 262, __pyx_L1_error)
15675  __Pyx_GOTREF(__pyx_tuple__16);
15676  __Pyx_GIVEREF(__pyx_tuple__16);
15677 
15678  /* "dtocean.pyx":266
15679  * print(type(inst))
15680  * print(inst)
15681  * print ("Unable to read from input file ... exiting") # <<<<<<<<<<<<<<
15682  * sys.exit()
15683  *
15684  */
15685  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_u_Unable_to_read_from_input_file_e); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 266, __pyx_L1_error)
15686  __Pyx_GOTREF(__pyx_tuple__17);
15687  __Pyx_GIVEREF(__pyx_tuple__17);
15688 
15689  /* "dtocean.pyx":277
15690  * self.xdim = xdim
15691  * try:
15692  * self.rfl = xr.DataArray(np.zeros((NWL,ydim,xdim)),dims=('wl','y', 'x')) # <<<<<<<<<<<<<<
15693  * self.lat = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
15694  * self.lon = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
15695  */
15696  __pyx_tuple__18 = PyTuple_Pack(3, __pyx_n_u_wl, __pyx_n_u_y, __pyx_n_u_x); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 277, __pyx_L1_error)
15697  __Pyx_GOTREF(__pyx_tuple__18);
15698  __Pyx_GIVEREF(__pyx_tuple__18);
15699 
15700  /* "dtocean.pyx":278
15701  * try:
15702  * self.rfl = xr.DataArray(np.zeros((NWL,ydim,xdim)),dims=('wl','y', 'x'))
15703  * self.lat = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x')) # <<<<<<<<<<<<<<
15704  * self.lon = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
15705  * self.sza = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
15706  */
15707  __pyx_tuple__19 = PyTuple_Pack(2, __pyx_n_u_y, __pyx_n_u_x); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 278, __pyx_L1_error)
15708  __Pyx_GOTREF(__pyx_tuple__19);
15709  __Pyx_GIVEREF(__pyx_tuple__19);
15710 
15711  /* "dtocean.pyx":295
15712  * print(type(inst))
15713  * print(inst)
15714  * print ("Unable to initialize output file ... exiting") # <<<<<<<<<<<<<<
15715  * sys.exit()
15716  *
15717  */
15718  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_u_Unable_to_initialize_output_file); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 295, __pyx_L1_error)
15719  __Pyx_GOTREF(__pyx_tuple__20);
15720  __Pyx_GIVEREF(__pyx_tuple__20);
15721 
15722  /* "dtocean.pyx":305
15723  *
15724  * parser = argparse.ArgumentParser()
15725  * parser.add_argument("-i", "--ifile", type=argparse.FileType('r'), # <<<<<<<<<<<<<<
15726  * help="input file", required=True)
15727  * parser.add_argument("-o", "--ofile", type=argparse.FileType('w'),
15728  */
15729  __pyx_tuple__21 = PyTuple_Pack(2, __pyx_kp_u_i, __pyx_kp_u_ifile_2); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 305, __pyx_L1_error)
15730  __Pyx_GOTREF(__pyx_tuple__21);
15731  __Pyx_GIVEREF(__pyx_tuple__21);
15732 
15733  /* "dtocean.pyx":307
15734  * parser.add_argument("-i", "--ifile", type=argparse.FileType('r'),
15735  * help="input file", required=True)
15736  * parser.add_argument("-o", "--ofile", type=argparse.FileType('w'), # <<<<<<<<<<<<<<
15737  * help="output file", required=False)
15738  * parser.add_argument("-l", "--lut", type=argparse.FileType('r'),
15739  */
15740  __pyx_tuple__22 = PyTuple_Pack(2, __pyx_kp_u_o_2, __pyx_kp_u_ofile_2); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 307, __pyx_L1_error)
15741  __Pyx_GOTREF(__pyx_tuple__22);
15742  __Pyx_GIVEREF(__pyx_tuple__22);
15743 
15744  /* "dtocean.pyx":309
15745  * parser.add_argument("-o", "--ofile", type=argparse.FileType('w'),
15746  * help="output file", required=False)
15747  * parser.add_argument("-l", "--lut", type=argparse.FileType('r'), # <<<<<<<<<<<<<<
15748  * help="lookup table file", required=True)
15749  * parser.add_argument("-p", "--plot", type=bool, default=False,
15750  */
15751  __pyx_tuple__23 = PyTuple_Pack(2, __pyx_kp_u_l, __pyx_kp_u_lut); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 309, __pyx_L1_error)
15752  __Pyx_GOTREF(__pyx_tuple__23);
15753  __Pyx_GIVEREF(__pyx_tuple__23);
15754 
15755  /* "dtocean.pyx":311
15756  * parser.add_argument("-l", "--lut", type=argparse.FileType('r'),
15757  * help="lookup table file", required=True)
15758  * parser.add_argument("-p", "--plot", type=bool, default=False, # <<<<<<<<<<<<<<
15759  * help="plot pixel data", required=False)
15760  * parser.add_argument("-m", "--mode", type=int, default=0,
15761  */
15762  __pyx_tuple__24 = PyTuple_Pack(2, __pyx_kp_u_p, __pyx_kp_u_plot_2); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 311, __pyx_L1_error)
15763  __Pyx_GOTREF(__pyx_tuple__24);
15764  __Pyx_GIVEREF(__pyx_tuple__24);
15765 
15766  /* "dtocean.pyx":313
15767  * parser.add_argument("-p", "--plot", type=bool, default=False,
15768  * help="plot pixel data", required=False)
15769  * parser.add_argument("-m", "--mode", type=int, default=0, # <<<<<<<<<<<<<<
15770  * help="mode option", required=False)
15771  * parser.add_argument("y", type=int, help="start line")
15772  */
15773  __pyx_tuple__25 = PyTuple_Pack(2, __pyx_kp_u_m, __pyx_kp_u_mode_2); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 313, __pyx_L1_error)
15774  __Pyx_GOTREF(__pyx_tuple__25);
15775  __Pyx_GIVEREF(__pyx_tuple__25);
15776 
15777  /* "dtocean.pyx":315
15778  * parser.add_argument("-m", "--mode", type=int, default=0,
15779  * help="mode option", required=False)
15780  * parser.add_argument("y", type=int, help="start line") # <<<<<<<<<<<<<<
15781  * parser.add_argument("x", type=int, help="start pixel")
15782  * parser.add_argument("z", type=int, help="square side ")
15783  */
15784  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_n_u_y); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 315, __pyx_L1_error)
15785  __Pyx_GOTREF(__pyx_tuple__26);
15786  __Pyx_GIVEREF(__pyx_tuple__26);
15787 
15788  /* "dtocean.pyx":316
15789  * help="mode option", required=False)
15790  * parser.add_argument("y", type=int, help="start line")
15791  * parser.add_argument("x", type=int, help="start pixel") # <<<<<<<<<<<<<<
15792  * parser.add_argument("z", type=int, help="square side ")
15793  *
15794  */
15795  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_n_u_x); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 316, __pyx_L1_error)
15796  __Pyx_GOTREF(__pyx_tuple__27);
15797  __Pyx_GIVEREF(__pyx_tuple__27);
15798 
15799  /* "dtocean.pyx":317
15800  * parser.add_argument("y", type=int, help="start line")
15801  * parser.add_argument("x", type=int, help="start pixel")
15802  * parser.add_argument("z", type=int, help="square side ") # <<<<<<<<<<<<<<
15803  *
15804  * args = parser.parse_args()
15805  */
15806  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_n_u_z); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 317, __pyx_L1_error)
15807  __Pyx_GOTREF(__pyx_tuple__28);
15808  __Pyx_GIVEREF(__pyx_tuple__28);
15809 
15810  /* "dtocean.pyx":349
15811  * vout.ds.type[iy-args.y,ix-args.x] = type
15812  *
15813  * print('.', end = '') # <<<<<<<<<<<<<<
15814  * print(' Done!')
15815  * vout.write()
15816  */
15817  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_u__8); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 349, __pyx_L1_error)
15818  __Pyx_GOTREF(__pyx_tuple__29);
15819  __Pyx_GIVEREF(__pyx_tuple__29);
15820 
15821  /* "dtocean.pyx":350
15822  *
15823  * print('.', end = '')
15824  * print(' Done!') # <<<<<<<<<<<<<<
15825  * vout.write()
15826  *
15827  */
15828  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_u_Done); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 350, __pyx_L1_error)
15829  __Pyx_GOTREF(__pyx_tuple__31);
15830  __Pyx_GIVEREF(__pyx_tuple__31);
15831 
15832  /* "dtocean.pyx":33
15833  * D2R = np.pi/180.0
15834  *
15835  * class dtocean(object): # <<<<<<<<<<<<<<
15836  *
15837  * def __init__(self, lut_filepath, mode):
15838  */
15839  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 33, __pyx_L1_error)
15840  __Pyx_GOTREF(__pyx_tuple__33);
15841  __Pyx_GIVEREF(__pyx_tuple__33);
15842 
15843  /* "dtocean.pyx":35
15844  * class dtocean(object):
15845  *
15846  * def __init__(self, lut_filepath, mode): # <<<<<<<<<<<<<<
15847  * print ("Reading Darktarget LUT: " + lut_filepath)
15848  * self.toas = np.zeros((NWL,NSMALL,NAOT,NWS,NSZA,NVZA,NRAA))
15849  */
15850  __pyx_tuple__34 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_lut_filepath, __pyx_n_s_mode, __pyx_n_s_inst); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 35, __pyx_L1_error)
15851  __Pyx_GOTREF(__pyx_tuple__34);
15852  __Pyx_GIVEREF(__pyx_tuple__34);
15853  __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dtocean_pyx, __pyx_n_s_init, 35, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 35, __pyx_L1_error)
15854 
15855  /* "dtocean.pyx":67
15856  *
15857  *
15858  * def interp_extrap( self, num, xin, x, y ): # <<<<<<<<<<<<<<
15859  * if (xin <= x[0]):
15860  * yout = y[0]+(xin-x[0])*(y[1]-y[0])/(x[1]-x[0])
15861  */
15862  __pyx_tuple__36 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_num, __pyx_n_s_xin, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_yout, __pyx_n_s_i_2); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 67, __pyx_L1_error)
15863  __Pyx_GOTREF(__pyx_tuple__36);
15864  __Pyx_GIVEREF(__pyx_tuple__36);
15865  __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dtocean_pyx, __pyx_n_s_interp_extrap, 67, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 67, __pyx_L1_error)
15866 
15867  /* "dtocean.pyx":79
15868  * return yout;
15869  *
15870  * def proc_gran(self,rfl,sza,vza,raa,wnd): # <<<<<<<<<<<<<<
15871  * xit = np.stack((wnd, sza, vza, raa), axis=2)
15872  * mrfls = np.zeros((NSMALL, NWL))
15873  */
15874  __pyx_tuple__38 = PyTuple_Pack(23, __pyx_n_s_self, __pyx_n_s_rfl, __pyx_n_s_sza, __pyx_n_s_vza, __pyx_n_s_raa, __pyx_n_s_wnd, __pyx_n_s_xit, __pyx_n_s_mrfls, __pyx_n_s_mrflb, __pyx_n_s_mrflr, __pyx_n_s_units, __pyx_n_s_max_rfl, __pyx_n_s_min_rfl, __pyx_n_s_shps, __pyx_n_s_shpb, __pyx_n_s_iwl, __pyx_n_s_ism, __pyx_n_s_iwn, __pyx_n_s_isz, __pyx_n_s_ith, __pyx_n_s_iph, __pyx_n_s_itau, __pyx_n_s_ibm); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 79, __pyx_L1_error)
15875  __Pyx_GOTREF(__pyx_tuple__38);
15876  __Pyx_GIVEREF(__pyx_tuple__38);
15877  __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(6, 0, 23, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dtocean_pyx, __pyx_n_s_proc_gran, 79, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 79, __pyx_L1_error)
15878 
15879  /* "dtocean.pyx":124
15880  * return
15881  *
15882  * def process(self,rfl,sza,vza,raa,wnd): # <<<<<<<<<<<<<<
15883  * xit = np.stack((wnd, sza, vza, raa))
15884  * units = np.pi/np.cos(sza*D2R)
15885  */
15886  __pyx_tuple__40 = PyTuple_Pack(30, __pyx_n_s_self, __pyx_n_s_rfl, __pyx_n_s_sza, __pyx_n_s_vza, __pyx_n_s_raa, __pyx_n_s_wnd, __pyx_n_s_xit, __pyx_n_s_units, __pyx_n_s_mrfls, __pyx_n_s_mrflb, __pyx_n_s_mrflr, __pyx_n_s_tauxs, __pyx_n_s_tauxb, __pyx_n_s_ism, __pyx_n_s_ibm, __pyx_n_s_trfls, __pyx_n_s_trflb, __pyx_n_s_iwl, __pyx_n_s_aot, __pyx_n_s_fmf, __pyx_n_s_sse, __pyx_n_s_denom, __pyx_n_s_rbdif, __pyx_n_s_sbdif, __pyx_n_s_sb2, __pyx_n_s_rbsb, __pyx_n_s_xm, __pyx_n_s_mrfl, __pyx_n_s_err, __pyx_n_s_im); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 124, __pyx_L1_error)
15887  __Pyx_GOTREF(__pyx_tuple__40);
15888  __Pyx_GIVEREF(__pyx_tuple__40);
15889  __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(6, 0, 30, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dtocean_pyx, __pyx_n_s_process, 124, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 124, __pyx_L1_error)
15890 
15891  /* "dtocean.pyx":180
15892  * return self.fmf, self.aot, self.sse, self.type
15893  *
15894  * def plot(self, iy, ix): # <<<<<<<<<<<<<<
15895  * plt.clf()
15896  * plt.grid(True)
15897  */
15898  __pyx_tuple__42 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_iy, __pyx_n_s_ix, __pyx_n_s_tstr); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 180, __pyx_L1_error)
15899  __Pyx_GOTREF(__pyx_tuple__42);
15900  __Pyx_GIVEREF(__pyx_tuple__42);
15901  __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dtocean_pyx, __pyx_n_s_plot, 180, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 180, __pyx_L1_error)
15902 
15903  /* "dtocean.pyx":193
15904  * plt.show()
15905  *
15906  * def plot_points(self): # <<<<<<<<<<<<<<
15907  * fig = plt.figure()
15908  * ax = fig.add_subplot(111, projection='3d')
15909  */
15910  __pyx_tuple__44 = PyTuple_Pack(21, __pyx_n_s_self, __pyx_n_s_fig, __pyx_n_s_ax, __pyx_n_s_s, __pyx_n_s_xs, __pyx_n_s_ys, __pyx_n_s_zs, __pyx_n_s_b, __pyx_n_s_xb, __pyx_n_s_yb, __pyx_n_s_zb, __pyx_n_s_xp, __pyx_n_s_yp, __pyx_n_s_zp, __pyx_n_s_xm, __pyx_n_s_ym, __pyx_n_s_zm, __pyx_n_s_ws, __pyx_n_s_ts, __pyx_n_s_ls, __pyx_n_s_lb); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 193, __pyx_L1_error)
15911  __Pyx_GOTREF(__pyx_tuple__44);
15912  __Pyx_GIVEREF(__pyx_tuple__44);
15913  __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(1, 0, 21, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dtocean_pyx, __pyx_n_s_plot_points, 193, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 193, __pyx_L1_error)
15914 
15915  /* "dtocean.pyx":247
15916  * plt.show()
15917  *
15918  * class input(object): # <<<<<<<<<<<<<<
15919  *
15920  * def __init__(self, l1b_filepath):
15921  */
15922  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 247, __pyx_L1_error)
15923  __Pyx_GOTREF(__pyx_tuple__46);
15924  __Pyx_GIVEREF(__pyx_tuple__46);
15925 
15926  /* "dtocean.pyx":249
15927  * class input(object):
15928  *
15929  * def __init__(self, l1b_filepath): # <<<<<<<<<<<<<<
15930  * self.ifile = l1b_filepath
15931  * print ("Reading VIIRS Data: " + self.ifile)
15932  */
15933  __pyx_tuple__47 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_l1b_filepath, __pyx_n_s_inst); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 249, __pyx_L1_error)
15934  __Pyx_GOTREF(__pyx_tuple__47);
15935  __Pyx_GIVEREF(__pyx_tuple__47);
15936  __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dtocean_pyx, __pyx_n_s_init, 249, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 249, __pyx_L1_error)
15937 
15938  /* "dtocean.pyx":270
15939  *
15940  *
15941  * class output(object): # <<<<<<<<<<<<<<
15942  *
15943  * def __init__(self, out_filepath, ydim, xdim):
15944  */
15945  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 270, __pyx_L1_error)
15946  __Pyx_GOTREF(__pyx_tuple__49);
15947  __Pyx_GIVEREF(__pyx_tuple__49);
15948 
15949  /* "dtocean.pyx":272
15950  * class output(object):
15951  *
15952  * def __init__(self, out_filepath, ydim, xdim): # <<<<<<<<<<<<<<
15953  * self.ofile = out_filepath
15954  * self.ydim = ydim
15955  */
15956  __pyx_tuple__50 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_out_filepath, __pyx_n_s_ydim, __pyx_n_s_xdim, __pyx_n_s_inst); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 272, __pyx_L1_error)
15957  __Pyx_GOTREF(__pyx_tuple__50);
15958  __Pyx_GIVEREF(__pyx_tuple__50);
15959  __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dtocean_pyx, __pyx_n_s_init, 272, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 272, __pyx_L1_error)
15960 
15961  /* "dtocean.pyx":298
15962  * sys.exit()
15963  *
15964  * def write(self): # <<<<<<<<<<<<<<
15965  * print ("Writing to file: " + self.ofile)
15966  * self.ds.to_netcdf(self.ofile)
15967  */
15968  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 298, __pyx_L1_error)
15969  __Pyx_GOTREF(__pyx_tuple__52);
15970  __Pyx_GIVEREF(__pyx_tuple__52);
15971  __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dtocean_pyx, __pyx_n_s_write, 298, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 298, __pyx_L1_error)
15972 
15973  /* "dtocean.pyx":302
15974  * self.ds.to_netcdf(self.ofile)
15975  *
15976  * def main(): # <<<<<<<<<<<<<<
15977  *
15978  * parser = argparse.ArgumentParser()
15979  */
15980  __pyx_tuple__54 = PyTuple_Pack(11, __pyx_n_s_parser, __pyx_n_s_args, __pyx_n_s_vin, __pyx_n_s_vout, __pyx_n_s_dto, __pyx_n_s_iy, __pyx_n_s_ix, __pyx_n_s_fmf, __pyx_n_s_aot, __pyx_n_s_sse, __pyx_n_s_type); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 302, __pyx_L1_error)
15981  __Pyx_GOTREF(__pyx_tuple__54);
15982  __Pyx_GIVEREF(__pyx_tuple__54);
15983  __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dtocean_pyx, __pyx_n_s_main_2, 302, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 302, __pyx_L1_error)
15984  __Pyx_RefNannyFinishContext();
15985  return 0;
15986  __pyx_L1_error:;
15987  __Pyx_RefNannyFinishContext();
15988  return -1;
15989 }
15990 
15991 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
15992  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
15993  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
15994  __pyx_float_0_5 = PyFloat_FromDouble(0.5); if (unlikely(!__pyx_float_0_5)) __PYX_ERR(0, 1, __pyx_L1_error)
15995  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
15996  __pyx_float_1_2 = PyFloat_FromDouble(1.2); if (unlikely(!__pyx_float_1_2)) __PYX_ERR(0, 1, __pyx_L1_error)
15997  __pyx_float_6_0 = PyFloat_FromDouble(6.0); if (unlikely(!__pyx_float_6_0)) __PYX_ERR(0, 1, __pyx_L1_error)
15998  __pyx_float_0_01 = PyFloat_FromDouble(0.01); if (unlikely(!__pyx_float_0_01)) __PYX_ERR(0, 1, __pyx_L1_error)
15999  __pyx_float_10_0 = PyFloat_FromDouble(10.0); if (unlikely(!__pyx_float_10_0)) __PYX_ERR(0, 1, __pyx_L1_error)
16000  __pyx_float_16_0 = PyFloat_FromDouble(16.0); if (unlikely(!__pyx_float_16_0)) __PYX_ERR(0, 1, __pyx_L1_error)
16001  __pyx_float_180_0 = PyFloat_FromDouble(180.0); if (unlikely(!__pyx_float_180_0)) __PYX_ERR(0, 1, __pyx_L1_error)
16002  __pyx_float_neg_999_9 = PyFloat_FromDouble(-999.9); if (unlikely(!__pyx_float_neg_999_9)) __PYX_ERR(0, 1, __pyx_L1_error)
16003  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
16004  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
16005  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
16006  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
16007  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
16008  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
16009  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(0, 1, __pyx_L1_error)
16010  __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) __PYX_ERR(0, 1, __pyx_L1_error)
16011  __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) __PYX_ERR(0, 1, __pyx_L1_error)
16012  __pyx_int_11 = PyInt_FromLong(11); if (unlikely(!__pyx_int_11)) __PYX_ERR(0, 1, __pyx_L1_error)
16013  __pyx_int_16 = PyInt_FromLong(16); if (unlikely(!__pyx_int_16)) __PYX_ERR(0, 1, __pyx_L1_error)
16014  __pyx_int_50 = PyInt_FromLong(50); if (unlikely(!__pyx_int_50)) __PYX_ERR(0, 1, __pyx_L1_error)
16015  __pyx_int_111 = PyInt_FromLong(111); if (unlikely(!__pyx_int_111)) __PYX_ERR(0, 1, __pyx_L1_error)
16016  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
16017  __pyx_int_neg_999 = PyInt_FromLong(-999); if (unlikely(!__pyx_int_neg_999)) __PYX_ERR(0, 1, __pyx_L1_error)
16018  return 0;
16019  __pyx_L1_error:;
16020  return -1;
16021 }
16022 
16023 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
16024 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
16025 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
16026 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
16027 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
16028 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
16029 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
16030 
16031 static int __Pyx_modinit_global_init_code(void) {
16032  __Pyx_RefNannyDeclarations
16033  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
16034  /*--- Global init code ---*/
16035  __Pyx_RefNannyFinishContext();
16036  return 0;
16037 }
16038 
16039 static int __Pyx_modinit_variable_export_code(void) {
16040  __Pyx_RefNannyDeclarations
16041  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
16042  /*--- Variable export code ---*/
16043  __Pyx_RefNannyFinishContext();
16044  return 0;
16045 }
16046 
16047 static int __Pyx_modinit_function_export_code(void) {
16048  __Pyx_RefNannyDeclarations
16049  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
16050  /*--- Function export code ---*/
16051  __Pyx_RefNannyFinishContext();
16052  return 0;
16053 }
16054 
16055 static int __Pyx_modinit_type_init_code(void) {
16056  __Pyx_RefNannyDeclarations
16057  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
16058  /*--- Type init code ---*/
16059  __Pyx_RefNannyFinishContext();
16060  return 0;
16061 }
16062 
16063 static int __Pyx_modinit_type_import_code(void) {
16064  __Pyx_RefNannyDeclarations
16065  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
16066  /*--- Type import code ---*/
16067  __Pyx_RefNannyFinishContext();
16068  return 0;
16069 }
16070 
16071 static int __Pyx_modinit_variable_import_code(void) {
16072  __Pyx_RefNannyDeclarations
16073  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
16074  /*--- Variable import code ---*/
16075  __Pyx_RefNannyFinishContext();
16076  return 0;
16077 }
16078 
16079 static int __Pyx_modinit_function_import_code(void) {
16080  __Pyx_RefNannyDeclarations
16081  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
16082  /*--- Function import code ---*/
16083  __Pyx_RefNannyFinishContext();
16084  return 0;
16085 }
16086 
16087 
16088 #ifndef CYTHON_NO_PYINIT_EXPORT
16089 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
16090 #elif PY_MAJOR_VERSION < 3
16091 #ifdef __cplusplus
16092 #define __Pyx_PyMODINIT_FUNC extern "C" void
16093 #else
16094 #define __Pyx_PyMODINIT_FUNC void
16095 #endif
16096 #else
16097 #ifdef __cplusplus
16098 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
16099 #else
16100 #define __Pyx_PyMODINIT_FUNC PyObject *
16101 #endif
16102 #endif
16103 
16104 
16105 #if PY_MAJOR_VERSION < 3
16106 __Pyx_PyMODINIT_FUNC initdtocean(void) CYTHON_SMALL_CODE; /*proto*/
16107 __Pyx_PyMODINIT_FUNC initdtocean(void)
16108 #else
16109 __Pyx_PyMODINIT_FUNC PyInit_dtocean(void) CYTHON_SMALL_CODE; /*proto*/
16110 __Pyx_PyMODINIT_FUNC PyInit_dtocean(void)
16111 #if CYTHON_PEP489_MULTI_PHASE_INIT
16112 {
16113  return PyModuleDef_Init(&__pyx_moduledef);
16114 }
16115 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
16116  #if PY_VERSION_HEX >= 0x030700A1
16117  static PY_INT64_T main_interpreter_id = -1;
16118  PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
16119  if (main_interpreter_id == -1) {
16120  main_interpreter_id = current_id;
16121  return (unlikely(current_id == -1)) ? -1 : 0;
16122  } else if (unlikely(main_interpreter_id != current_id))
16123  #else
16124  static PyInterpreterState *main_interpreter = NULL;
16125  PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
16126  if (!main_interpreter) {
16127  main_interpreter = current_interpreter;
16128  } else if (unlikely(main_interpreter != current_interpreter))
16129  #endif
16130  {
16131  PyErr_SetString(
16132  PyExc_ImportError,
16133  "Interpreter change detected - this module can only be loaded into one interpreter per process.");
16134  return -1;
16135  }
16136  return 0;
16137 }
16138 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) {
16139  PyObject *value = PyObject_GetAttrString(spec, from_name);
16140  int result = 0;
16141  if (likely(value)) {
16142  if (allow_none || value != Py_None) {
16143  result = PyDict_SetItemString(moddict, to_name, value);
16144  }
16145  Py_DECREF(value);
16146  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
16147  PyErr_Clear();
16148  } else {
16149  result = -1;
16150  }
16151  return result;
16152 }
16153 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
16154  PyObject *module = NULL, *moddict, *modname;
16155  if (__Pyx_check_single_interpreter())
16156  return NULL;
16157  if (__pyx_m)
16158  return __Pyx_NewRef(__pyx_m);
16159  modname = PyObject_GetAttrString(spec, "name");
16160  if (unlikely(!modname)) goto bad;
16161  module = PyModule_NewObject(modname);
16162  Py_DECREF(modname);
16163  if (unlikely(!module)) goto bad;
16164  moddict = PyModule_GetDict(module);
16165  if (unlikely(!moddict)) goto bad;
16166  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
16167  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
16168  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
16169  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
16170  return module;
16171 bad:
16172  Py_XDECREF(module);
16173  return NULL;
16174 }
16175 
16176 
16177 static CYTHON_SMALL_CODE int __pyx_pymod_exec_dtocean(PyObject *__pyx_pyinit_module)
16178 #endif
16179 #endif
16180 {
16181  PyObject *__pyx_t_1 = NULL;
16182  PyObject *__pyx_t_2 = NULL;
16183  PyObject *__pyx_t_3 = NULL;
16184  int __pyx_t_4;
16185  int __pyx_lineno = 0;
16186  const char *__pyx_filename = NULL;
16187  int __pyx_clineno = 0;
16188  __Pyx_RefNannyDeclarations
16189  #if CYTHON_PEP489_MULTI_PHASE_INIT
16190  if (__pyx_m) {
16191  if (__pyx_m == __pyx_pyinit_module) return 0;
16192  PyErr_SetString(PyExc_RuntimeError, "Module 'dtocean' has already been imported. Re-initialisation is not supported.");
16193  return -1;
16194  }
16195  #elif PY_MAJOR_VERSION >= 3
16196  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
16197  #endif
16198  #if CYTHON_REFNANNY
16199 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
16200 if (!__Pyx_RefNanny) {
16201  PyErr_Clear();
16202  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
16203  if (!__Pyx_RefNanny)
16204  Py_FatalError("failed to import 'refnanny' module");
16205 }
16206 #endif
16207  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_dtocean(void)", 0);
16208  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
16209  #ifdef __Pxy_PyFrame_Initialize_Offsets
16210  __Pxy_PyFrame_Initialize_Offsets();
16211  #endif
16212  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
16213  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
16214  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
16215  #ifdef __Pyx_CyFunction_USED
16216  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
16217  #endif
16218  #ifdef __Pyx_FusedFunction_USED
16219  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
16220  #endif
16221  #ifdef __Pyx_Coroutine_USED
16222  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
16223  #endif
16224  #ifdef __Pyx_Generator_USED
16225  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
16226  #endif
16227  #ifdef __Pyx_AsyncGen_USED
16228  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
16229  #endif
16230  #ifdef __Pyx_StopAsyncIteration_USED
16231  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
16232  #endif
16233  /*--- Library function declarations ---*/
16234  /*--- Threads initialization code ---*/
16235  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
16236  #ifdef WITH_THREAD /* Python build with threading support? */
16237  PyEval_InitThreads();
16238  #endif
16239  #endif
16240  /*--- Module creation code ---*/
16241  #if CYTHON_PEP489_MULTI_PHASE_INIT
16242  __pyx_m = __pyx_pyinit_module;
16243  Py_INCREF(__pyx_m);
16244  #else
16245  #if PY_MAJOR_VERSION < 3
16246  __pyx_m = Py_InitModule4("dtocean", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
16247  #else
16248  __pyx_m = PyModule_Create(&__pyx_moduledef);
16249  #endif
16250  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
16251  #endif
16252  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
16253  Py_INCREF(__pyx_d);
16254  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
16255  Py_INCREF(__pyx_b);
16256  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
16257  Py_INCREF(__pyx_cython_runtime);
16258  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
16259  /*--- Initialize various global constants etc. ---*/
16260  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
16261  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
16262  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
16263  #endif
16264  if (__pyx_module_is_main_dtocean) {
16265  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
16266  }
16267  #if PY_MAJOR_VERSION >= 3
16268  {
16269  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
16270  if (!PyDict_GetItemString(modules, "dtocean")) {
16271  if (unlikely(PyDict_SetItemString(modules, "dtocean", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
16272  }
16273  }
16274  #endif
16275  /*--- Builtin init code ---*/
16276  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
16277  /*--- Constants init code ---*/
16278  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
16279  /*--- Global type/function init code ---*/
16280  (void)__Pyx_modinit_global_init_code();
16281  (void)__Pyx_modinit_variable_export_code();
16282  (void)__Pyx_modinit_function_export_code();
16283  (void)__Pyx_modinit_type_init_code();
16284  (void)__Pyx_modinit_type_import_code();
16285  (void)__Pyx_modinit_variable_import_code();
16286  (void)__Pyx_modinit_function_import_code();
16287  /*--- Execution code ---*/
16288  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
16289  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
16290  #endif
16291 
16292  /* "dtocean.pyx":3
16293  * # cython: language_level=3
16294  *
16295  * import os # <<<<<<<<<<<<<<
16296  * import sys
16297  * import math
16298  */
16299  __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error)
16300  __Pyx_GOTREF(__pyx_t_1);
16301  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
16302  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16303 
16304  /* "dtocean.pyx":4
16305  *
16306  * import os
16307  * import sys # <<<<<<<<<<<<<<
16308  * import math
16309  * import argparse
16310  */
16311  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
16312  __Pyx_GOTREF(__pyx_t_1);
16313  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 4, __pyx_L1_error)
16314  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16315 
16316  /* "dtocean.pyx":5
16317  * import os
16318  * import sys
16319  * import math # <<<<<<<<<<<<<<
16320  * import argparse
16321  * import numpy as np
16322  */
16323  __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
16324  __Pyx_GOTREF(__pyx_t_1);
16325  if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
16326  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16327 
16328  /* "dtocean.pyx":6
16329  * import sys
16330  * import math
16331  * import argparse # <<<<<<<<<<<<<<
16332  * import numpy as np
16333  * import xarray as xr
16334  */
16335  __pyx_t_1 = __Pyx_Import(__pyx_n_s_argparse, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
16336  __Pyx_GOTREF(__pyx_t_1);
16337  if (PyDict_SetItem(__pyx_d, __pyx_n_s_argparse, __pyx_t_1) < 0) __PYX_ERR(0, 6, __pyx_L1_error)
16338  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16339 
16340  /* "dtocean.pyx":7
16341  * import math
16342  * import argparse
16343  * import numpy as np # <<<<<<<<<<<<<<
16344  * import xarray as xr
16345  * import matplotlib.pyplot as plt
16346  */
16347  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error)
16348  __Pyx_GOTREF(__pyx_t_1);
16349  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 7, __pyx_L1_error)
16350  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16351 
16352  /* "dtocean.pyx":8
16353  * import argparse
16354  * import numpy as np
16355  * import xarray as xr # <<<<<<<<<<<<<<
16356  * import matplotlib.pyplot as plt
16357  * import scipy.interpolate as interp
16358  */
16359  __pyx_t_1 = __Pyx_Import(__pyx_n_s_xarray, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
16360  __Pyx_GOTREF(__pyx_t_1);
16361  if (PyDict_SetItem(__pyx_d, __pyx_n_s_xr, __pyx_t_1) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
16362  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16363 
16364  /* "dtocean.pyx":9
16365  * import numpy as np
16366  * import xarray as xr
16367  * import matplotlib.pyplot as plt # <<<<<<<<<<<<<<
16368  * import scipy.interpolate as interp
16369  * from matplotlib import *
16370  */
16371  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error)
16372  __Pyx_GOTREF(__pyx_t_1);
16373  __Pyx_INCREF(__pyx_n_s__32);
16374  __Pyx_GIVEREF(__pyx_n_s__32);
16375  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s__32);
16376  __pyx_t_2 = __Pyx_Import(__pyx_n_s_matplotlib_pyplot, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error)
16377  __Pyx_GOTREF(__pyx_t_2);
16378  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16379  if (PyDict_SetItem(__pyx_d, __pyx_n_s_plt, __pyx_t_2) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
16380  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16381 
16382  /* "dtocean.pyx":10
16383  * import xarray as xr
16384  * import matplotlib.pyplot as plt
16385  * import scipy.interpolate as interp # <<<<<<<<<<<<<<
16386  * from matplotlib import *
16387  * from matplotlib.ticker import MaxNLocator
16388  */
16389  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error)
16390  __Pyx_GOTREF(__pyx_t_2);
16391  __Pyx_INCREF(__pyx_n_s__32);
16392  __Pyx_GIVEREF(__pyx_n_s__32);
16393  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s__32);
16394  __pyx_t_1 = __Pyx_Import(__pyx_n_s_scipy_interpolate, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error)
16395  __Pyx_GOTREF(__pyx_t_1);
16396  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16397  if (PyDict_SetItem(__pyx_d, __pyx_n_s_interp, __pyx_t_1) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
16398  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16399 
16400  /* "dtocean.pyx":11
16401  * import matplotlib.pyplot as plt
16402  * import scipy.interpolate as interp
16403  * from matplotlib import * # <<<<<<<<<<<<<<
16404  * from matplotlib.ticker import MaxNLocator
16405  * from mpl_toolkits.mplot3d import Axes3D
16406  */
16407  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)
16408  __Pyx_GOTREF(__pyx_t_1);
16409  __Pyx_INCREF(__pyx_n_s__32);
16410  __Pyx_GIVEREF(__pyx_n_s__32);
16411  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s__32);
16412  __pyx_t_2 = __Pyx_Import(__pyx_n_s_matplotlib, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error)
16413  __Pyx_GOTREF(__pyx_t_2);
16414  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16415  if (__pyx_import_star(__pyx_t_2) < 0) __PYX_ERR(0, 11, __pyx_L1_error);
16416  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16417 
16418  /* "dtocean.pyx":12
16419  * import scipy.interpolate as interp
16420  * from matplotlib import *
16421  * from matplotlib.ticker import MaxNLocator # <<<<<<<<<<<<<<
16422  * from mpl_toolkits.mplot3d import Axes3D
16423  * from datetime import datetime
16424  */
16425  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
16426  __Pyx_GOTREF(__pyx_t_2);
16427  __Pyx_INCREF(__pyx_n_s_MaxNLocator);
16428  __Pyx_GIVEREF(__pyx_n_s_MaxNLocator);
16429  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_MaxNLocator);
16430  __pyx_t_1 = __Pyx_Import(__pyx_n_s_matplotlib_ticker, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
16431  __Pyx_GOTREF(__pyx_t_1);
16432  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16433  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_MaxNLocator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
16434  __Pyx_GOTREF(__pyx_t_2);
16435  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MaxNLocator, __pyx_t_2) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
16436  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16437  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16438 
16439  /* "dtocean.pyx":13
16440  * from matplotlib import *
16441  * from matplotlib.ticker import MaxNLocator
16442  * from mpl_toolkits.mplot3d import Axes3D # <<<<<<<<<<<<<<
16443  * from datetime import datetime
16444  *
16445  */
16446  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)
16447  __Pyx_GOTREF(__pyx_t_1);
16448  __Pyx_INCREF(__pyx_n_s_Axes3D);
16449  __Pyx_GIVEREF(__pyx_n_s_Axes3D);
16450  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Axes3D);
16451  __pyx_t_2 = __Pyx_Import(__pyx_n_s_mpl_toolkits_mplot3d, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)
16452  __Pyx_GOTREF(__pyx_t_2);
16453  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16454  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Axes3D); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)
16455  __Pyx_GOTREF(__pyx_t_1);
16456  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Axes3D, __pyx_t_1) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
16457  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16458  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16459 
16460  /* "dtocean.pyx":14
16461  * from matplotlib.ticker import MaxNLocator
16462  * from mpl_toolkits.mplot3d import Axes3D
16463  * from datetime import datetime # <<<<<<<<<<<<<<
16464  *
16465  * W470 = 0
16466  */
16467  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
16468  __Pyx_GOTREF(__pyx_t_2);
16469  __Pyx_INCREF(__pyx_n_s_datetime);
16470  __Pyx_GIVEREF(__pyx_n_s_datetime);
16471  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_datetime);
16472  __pyx_t_1 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)
16473  __Pyx_GOTREF(__pyx_t_1);
16474  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16475  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
16476  __Pyx_GOTREF(__pyx_t_2);
16477  if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __pyx_t_2) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
16478  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16479  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16480 
16481  /* "dtocean.pyx":16
16482  * from datetime import datetime
16483  *
16484  * W470 = 0 # <<<<<<<<<<<<<<
16485  * W550 = 1
16486  * W659 = 2
16487  */
16488  if (PyDict_SetItem(__pyx_d, __pyx_n_s_W470, __pyx_int_0) < 0) __PYX_ERR(0, 16, __pyx_L1_error)
16489 
16490  /* "dtocean.pyx":17
16491  *
16492  * W470 = 0
16493  * W550 = 1 # <<<<<<<<<<<<<<
16494  * W659 = 2
16495  * W860 = 3
16496  */
16497  if (PyDict_SetItem(__pyx_d, __pyx_n_s_W550, __pyx_int_1) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
16498 
16499  /* "dtocean.pyx":18
16500  * W470 = 0
16501  * W550 = 1
16502  * W659 = 2 # <<<<<<<<<<<<<<
16503  * W860 = 3
16504  * W124 = 4
16505  */
16506  if (PyDict_SetItem(__pyx_d, __pyx_n_s_W659, __pyx_int_2) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
16507 
16508  /* "dtocean.pyx":19
16509  * W550 = 1
16510  * W659 = 2
16511  * W860 = 3 # <<<<<<<<<<<<<<
16512  * W124 = 4
16513  * W164 = 5
16514  */
16515  if (PyDict_SetItem(__pyx_d, __pyx_n_s_W860, __pyx_int_3) < 0) __PYX_ERR(0, 19, __pyx_L1_error)
16516 
16517  /* "dtocean.pyx":20
16518  * W659 = 2
16519  * W860 = 3
16520  * W124 = 4 # <<<<<<<<<<<<<<
16521  * W164 = 5
16522  * W213 = 6
16523  */
16524  if (PyDict_SetItem(__pyx_d, __pyx_n_s_W124, __pyx_int_4) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
16525 
16526  /* "dtocean.pyx":21
16527  * W860 = 3
16528  * W124 = 4
16529  * W164 = 5 # <<<<<<<<<<<<<<
16530  * W213 = 6
16531  * NWL = 7
16532  */
16533  if (PyDict_SetItem(__pyx_d, __pyx_n_s_W164, __pyx_int_5) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
16534 
16535  /* "dtocean.pyx":22
16536  * W124 = 4
16537  * W164 = 5
16538  * W213 = 6 # <<<<<<<<<<<<<<
16539  * NWL = 7
16540  * NWS = 4
16541  */
16542  if (PyDict_SetItem(__pyx_d, __pyx_n_s_W213, __pyx_int_6) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
16543 
16544  /* "dtocean.pyx":23
16545  * W164 = 5
16546  * W213 = 6
16547  * NWL = 7 # <<<<<<<<<<<<<<
16548  * NWS = 4
16549  * NSZA = 11
16550  */
16551  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NWL, __pyx_int_7) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
16552 
16553  /* "dtocean.pyx":24
16554  * W213 = 6
16555  * NWL = 7
16556  * NWS = 4 # <<<<<<<<<<<<<<
16557  * NSZA = 11
16558  * NVZA = 16
16559  */
16560  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NWS, __pyx_int_4) < 0) __PYX_ERR(0, 24, __pyx_L1_error)
16561 
16562  /* "dtocean.pyx":25
16563  * NWL = 7
16564  * NWS = 4
16565  * NSZA = 11 # <<<<<<<<<<<<<<
16566  * NVZA = 16
16567  * NRAA = 16
16568  */
16569  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NSZA, __pyx_int_11) < 0) __PYX_ERR(0, 25, __pyx_L1_error)
16570 
16571  /* "dtocean.pyx":26
16572  * NWS = 4
16573  * NSZA = 11
16574  * NVZA = 16 # <<<<<<<<<<<<<<
16575  * NRAA = 16
16576  * NAOT = 6
16577  */
16578  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NVZA, __pyx_int_16) < 0) __PYX_ERR(0, 26, __pyx_L1_error)
16579 
16580  /* "dtocean.pyx":27
16581  * NSZA = 11
16582  * NVZA = 16
16583  * NRAA = 16 # <<<<<<<<<<<<<<
16584  * NAOT = 6
16585  * NBIG = 5
16586  */
16587  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NRAA, __pyx_int_16) < 0) __PYX_ERR(0, 27, __pyx_L1_error)
16588 
16589  /* "dtocean.pyx":28
16590  * NVZA = 16
16591  * NRAA = 16
16592  * NAOT = 6 # <<<<<<<<<<<<<<
16593  * NBIG = 5
16594  * NSMALL = 4
16595  */
16596  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NAOT, __pyx_int_6) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
16597 
16598  /* "dtocean.pyx":29
16599  * NRAA = 16
16600  * NAOT = 6
16601  * NBIG = 5 # <<<<<<<<<<<<<<
16602  * NSMALL = 4
16603  * D2R = np.pi/180.0
16604  */
16605  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NBIG, __pyx_int_5) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
16606 
16607  /* "dtocean.pyx":30
16608  * NAOT = 6
16609  * NBIG = 5
16610  * NSMALL = 4 # <<<<<<<<<<<<<<
16611  * D2R = np.pi/180.0
16612  *
16613  */
16614  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NSMALL, __pyx_int_4) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
16615 
16616  /* "dtocean.pyx":31
16617  * NBIG = 5
16618  * NSMALL = 4
16619  * D2R = np.pi/180.0 # <<<<<<<<<<<<<<
16620  *
16621  * class dtocean(object):
16622  */
16623  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
16624  __Pyx_GOTREF(__pyx_t_1);
16625  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_pi); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)
16626  __Pyx_GOTREF(__pyx_t_2);
16627  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16628  __pyx_t_1 = __Pyx_PyFloat_TrueDivideObjC(__pyx_t_2, __pyx_float_180_0, 180.0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
16629  __Pyx_GOTREF(__pyx_t_1);
16630  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16631  if (PyDict_SetItem(__pyx_d, __pyx_n_s_D2R, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
16632  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16633 
16634  /* "dtocean.pyx":33
16635  * D2R = np.pi/180.0
16636  *
16637  * class dtocean(object): # <<<<<<<<<<<<<<
16638  *
16639  * def __init__(self, lut_filepath, mode):
16640  */
16641  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__33); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
16642  __Pyx_GOTREF(__pyx_t_1);
16643  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__33, __pyx_n_s_dtocean, __pyx_n_s_dtocean, (PyObject *) NULL, __pyx_n_s_dtocean, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
16644  __Pyx_GOTREF(__pyx_t_2);
16645 
16646  /* "dtocean.pyx":35
16647  * class dtocean(object):
16648  *
16649  * def __init__(self, lut_filepath, mode): # <<<<<<<<<<<<<<
16650  * print ("Reading Darktarget LUT: " + lut_filepath)
16651  * self.toas = np.zeros((NWL,NSMALL,NAOT,NWS,NSZA,NVZA,NRAA))
16652  */
16653  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7dtocean_7dtocean_1__init__, 0, __pyx_n_s_dtocean___init, NULL, __pyx_n_s_dtocean, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 35, __pyx_L1_error)
16654  __Pyx_GOTREF(__pyx_t_3);
16655  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_3) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
16656  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16657 
16658  /* "dtocean.pyx":67
16659  *
16660  *
16661  * def interp_extrap( self, num, xin, x, y ): # <<<<<<<<<<<<<<
16662  * if (xin <= x[0]):
16663  * yout = y[0]+(xin-x[0])*(y[1]-y[0])/(x[1]-x[0])
16664  */
16665  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7dtocean_7dtocean_3interp_extrap, 0, __pyx_n_s_dtocean_interp_extrap, NULL, __pyx_n_s_dtocean, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L1_error)
16666  __Pyx_GOTREF(__pyx_t_3);
16667  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_interp_extrap, __pyx_t_3) < 0) __PYX_ERR(0, 67, __pyx_L1_error)
16668  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16669 
16670  /* "dtocean.pyx":79
16671  * return yout;
16672  *
16673  * def proc_gran(self,rfl,sza,vza,raa,wnd): # <<<<<<<<<<<<<<
16674  * xit = np.stack((wnd, sza, vza, raa), axis=2)
16675  * mrfls = np.zeros((NSMALL, NWL))
16676  */
16677  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7dtocean_7dtocean_5proc_gran, 0, __pyx_n_s_dtocean_proc_gran, NULL, __pyx_n_s_dtocean, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 79, __pyx_L1_error)
16678  __Pyx_GOTREF(__pyx_t_3);
16679  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_proc_gran, __pyx_t_3) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
16680  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16681 
16682  /* "dtocean.pyx":124
16683  * return
16684  *
16685  * def process(self,rfl,sza,vza,raa,wnd): # <<<<<<<<<<<<<<
16686  * xit = np.stack((wnd, sza, vza, raa))
16687  * units = np.pi/np.cos(sza*D2R)
16688  */
16689  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7dtocean_7dtocean_7process, 0, __pyx_n_s_dtocean_process, NULL, __pyx_n_s_dtocean, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error)
16690  __Pyx_GOTREF(__pyx_t_3);
16691  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_process, __pyx_t_3) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
16692  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16693 
16694  /* "dtocean.pyx":180
16695  * return self.fmf, self.aot, self.sse, self.type
16696  *
16697  * def plot(self, iy, ix): # <<<<<<<<<<<<<<
16698  * plt.clf()
16699  * plt.grid(True)
16700  */
16701  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7dtocean_7dtocean_9plot, 0, __pyx_n_s_dtocean_plot, NULL, __pyx_n_s_dtocean, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 180, __pyx_L1_error)
16702  __Pyx_GOTREF(__pyx_t_3);
16703  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_plot, __pyx_t_3) < 0) __PYX_ERR(0, 180, __pyx_L1_error)
16704  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16705 
16706  /* "dtocean.pyx":193
16707  * plt.show()
16708  *
16709  * def plot_points(self): # <<<<<<<<<<<<<<
16710  * fig = plt.figure()
16711  * ax = fig.add_subplot(111, projection='3d')
16712  */
16713  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7dtocean_7dtocean_11plot_points, 0, __pyx_n_s_dtocean_plot_points, NULL, __pyx_n_s_dtocean, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error)
16714  __Pyx_GOTREF(__pyx_t_3);
16715  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_plot_points, __pyx_t_3) < 0) __PYX_ERR(0, 193, __pyx_L1_error)
16716  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16717 
16718  /* "dtocean.pyx":33
16719  * D2R = np.pi/180.0
16720  *
16721  * class dtocean(object): # <<<<<<<<<<<<<<
16722  *
16723  * def __init__(self, lut_filepath, mode):
16724  */
16725  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_dtocean, __pyx_tuple__33, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33, __pyx_L1_error)
16726  __Pyx_GOTREF(__pyx_t_3);
16727  if (PyDict_SetItem(__pyx_d, __pyx_n_s_dtocean, __pyx_t_3) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
16728  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16729  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16730  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16731 
16732  /* "dtocean.pyx":247
16733  * plt.show()
16734  *
16735  * class input(object): # <<<<<<<<<<<<<<
16736  *
16737  * def __init__(self, l1b_filepath):
16738  */
16739  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__46); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
16740  __Pyx_GOTREF(__pyx_t_1);
16741  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__46, __pyx_n_s_input, __pyx_n_s_input, (PyObject *) NULL, __pyx_n_s_dtocean, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error)
16742  __Pyx_GOTREF(__pyx_t_2);
16743 
16744  /* "dtocean.pyx":249
16745  * class input(object):
16746  *
16747  * def __init__(self, l1b_filepath): # <<<<<<<<<<<<<<
16748  * self.ifile = l1b_filepath
16749  * print ("Reading VIIRS Data: " + self.ifile)
16750  */
16751  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7dtocean_5input_1__init__, 0, __pyx_n_s_input___init, NULL, __pyx_n_s_dtocean, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error)
16752  __Pyx_GOTREF(__pyx_t_3);
16753  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_3) < 0) __PYX_ERR(0, 249, __pyx_L1_error)
16754  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16755 
16756  /* "dtocean.pyx":247
16757  * plt.show()
16758  *
16759  * class input(object): # <<<<<<<<<<<<<<
16760  *
16761  * def __init__(self, l1b_filepath):
16762  */
16763  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_input, __pyx_tuple__46, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 247, __pyx_L1_error)
16764  __Pyx_GOTREF(__pyx_t_3);
16765  if (PyDict_SetItem(__pyx_d, __pyx_n_s_input, __pyx_t_3) < 0) __PYX_ERR(0, 247, __pyx_L1_error)
16766  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16767  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16768  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16769 
16770  /* "dtocean.pyx":270
16771  *
16772  *
16773  * class output(object): # <<<<<<<<<<<<<<
16774  *
16775  * def __init__(self, out_filepath, ydim, xdim):
16776  */
16777  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__49); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error)
16778  __Pyx_GOTREF(__pyx_t_1);
16779  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__49, __pyx_n_s_output, __pyx_n_s_output, (PyObject *) NULL, __pyx_n_s_dtocean, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error)
16780  __Pyx_GOTREF(__pyx_t_2);
16781 
16782  /* "dtocean.pyx":272
16783  * class output(object):
16784  *
16785  * def __init__(self, out_filepath, ydim, xdim): # <<<<<<<<<<<<<<
16786  * self.ofile = out_filepath
16787  * self.ydim = ydim
16788  */
16789  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7dtocean_6output_1__init__, 0, __pyx_n_s_output___init, NULL, __pyx_n_s_dtocean, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 272, __pyx_L1_error)
16790  __Pyx_GOTREF(__pyx_t_3);
16791  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_3) < 0) __PYX_ERR(0, 272, __pyx_L1_error)
16792  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16793 
16794  /* "dtocean.pyx":298
16795  * sys.exit()
16796  *
16797  * def write(self): # <<<<<<<<<<<<<<
16798  * print ("Writing to file: " + self.ofile)
16799  * self.ds.to_netcdf(self.ofile)
16800  */
16801  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7dtocean_6output_3write, 0, __pyx_n_s_output_write, NULL, __pyx_n_s_dtocean, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 298, __pyx_L1_error)
16802  __Pyx_GOTREF(__pyx_t_3);
16803  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_write, __pyx_t_3) < 0) __PYX_ERR(0, 298, __pyx_L1_error)
16804  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16805 
16806  /* "dtocean.pyx":270
16807  *
16808  *
16809  * class output(object): # <<<<<<<<<<<<<<
16810  *
16811  * def __init__(self, out_filepath, ydim, xdim):
16812  */
16813  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_output, __pyx_tuple__49, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 270, __pyx_L1_error)
16814  __Pyx_GOTREF(__pyx_t_3);
16815  if (PyDict_SetItem(__pyx_d, __pyx_n_s_output, __pyx_t_3) < 0) __PYX_ERR(0, 270, __pyx_L1_error)
16816  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16817  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16818  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16819 
16820  /* "dtocean.pyx":302
16821  * self.ds.to_netcdf(self.ofile)
16822  *
16823  * def main(): # <<<<<<<<<<<<<<
16824  *
16825  * parser = argparse.ArgumentParser()
16826  */
16827  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7dtocean_1main, NULL, __pyx_n_s_dtocean); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
16828  __Pyx_GOTREF(__pyx_t_1);
16829  if (PyDict_SetItem(__pyx_d, __pyx_n_s_main_2, __pyx_t_1) < 0) __PYX_ERR(0, 302, __pyx_L1_error)
16830  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16831 
16832  /* "dtocean.pyx":353
16833  * vout.write()
16834  *
16835  * if __name__ == "__main__": # <<<<<<<<<<<<<<
16836  *
16837  * main()
16838  */
16839  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
16840  __Pyx_GOTREF(__pyx_t_1);
16841  __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_main, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 353, __pyx_L1_error)
16842  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16843  if (__pyx_t_4) {
16844 
16845  /* "dtocean.pyx":355
16846  * if __name__ == "__main__":
16847  *
16848  * main() # <<<<<<<<<<<<<<
16849  */
16850  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_main_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error)
16851  __Pyx_GOTREF(__pyx_t_1);
16852  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error)
16853  __Pyx_GOTREF(__pyx_t_2);
16854  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16855  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16856 
16857  /* "dtocean.pyx":353
16858  * vout.write()
16859  *
16860  * if __name__ == "__main__": # <<<<<<<<<<<<<<
16861  *
16862  * main()
16863  */
16864  }
16865 
16866  /* "dtocean.pyx":1
16867  * # cython: language_level=3 # <<<<<<<<<<<<<<
16868  *
16869  * import os
16870  */
16871  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
16872  __Pyx_GOTREF(__pyx_t_2);
16873  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
16874  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16875 
16876  /*--- Wrapped vars code ---*/
16877 
16878  goto __pyx_L0;
16879  __pyx_L1_error:;
16880  __Pyx_XDECREF(__pyx_t_1);
16881  __Pyx_XDECREF(__pyx_t_2);
16882  __Pyx_XDECREF(__pyx_t_3);
16883  if (__pyx_m) {
16884  if (__pyx_d) {
16885  __Pyx_AddTraceback("init dtocean", __pyx_clineno, __pyx_lineno, __pyx_filename);
16886  }
16887  Py_CLEAR(__pyx_m);
16888  } else if (!PyErr_Occurred()) {
16889  PyErr_SetString(PyExc_ImportError, "init dtocean");
16890  }
16891  __pyx_L0:;
16892  __Pyx_RefNannyFinishContext();
16893  #if CYTHON_PEP489_MULTI_PHASE_INIT
16894  return (__pyx_m != NULL) ? 0 : -1;
16895  #elif PY_MAJOR_VERSION >= 3
16896  return __pyx_m;
16897  #else
16898  return;
16899  #endif
16900 }
16901 
16902 /* --- Runtime support code --- */
16903 /* Refnanny */
16904 #if CYTHON_REFNANNY
16905 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
16906  PyObject *m = NULL, *p = NULL;
16907  void *r = NULL;
16908  m = PyImport_ImportModule(modname);
16909  if (!m) goto end;
16910  p = PyObject_GetAttrString(m, "RefNannyAPI");
16911  if (!p) goto end;
16912  r = PyLong_AsVoidPtr(p);
16913 end:
16914  Py_XDECREF(p);
16915  Py_XDECREF(m);
16916  return (__Pyx_RefNannyAPIStruct *)r;
16917 }
16918 #endif
16919 
16920 /* PyObjectGetAttrStr */
16921 #if CYTHON_USE_TYPE_SLOTS
16922 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
16923  PyTypeObject* tp = Py_TYPE(obj);
16924  if (likely(tp->tp_getattro))
16925  return tp->tp_getattro(obj, attr_name);
16926 #if PY_MAJOR_VERSION < 3
16927  if (likely(tp->tp_getattr))
16928  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
16929 #endif
16930  return PyObject_GetAttr(obj, attr_name);
16931 }
16932 #endif
16933 
16934 /* GetBuiltinName */
16935 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
16936  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
16937  if (unlikely(!result)) {
16938  PyErr_Format(PyExc_NameError,
16939 #if PY_MAJOR_VERSION >= 3
16940  "name '%U' is not defined", name);
16941 #else
16942  "name '%.200s' is not defined", PyString_AS_STRING(name));
16943 #endif
16944  }
16945  return result;
16946 }
16947 
16948 /* RaiseArgTupleInvalid */
16949 static void __Pyx_RaiseArgtupleInvalid(
16950  const char* func_name,
16951  int exact,
16952  Py_ssize_t num_min,
16953  Py_ssize_t num_max,
16954  Py_ssize_t num_found)
16955 {
16956  Py_ssize_t num_expected;
16957  const char *more_or_less;
16958  if (num_found < num_min) {
16959  num_expected = num_min;
16960  more_or_less = "at least";
16961  } else {
16962  num_expected = num_max;
16963  more_or_less = "at most";
16964  }
16965  if (exact) {
16966  more_or_less = "exactly";
16967  }
16968  PyErr_Format(PyExc_TypeError,
16969  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
16970  func_name, more_or_less, num_expected,
16971  (num_expected == 1) ? "" : "s", num_found);
16972 }
16973 
16974 /* RaiseDoubleKeywords */
16975 static void __Pyx_RaiseDoubleKeywordsError(
16976  const char* func_name,
16977  PyObject* kw_name)
16978 {
16979  PyErr_Format(PyExc_TypeError,
16980  #if PY_MAJOR_VERSION >= 3
16981  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
16982  #else
16983  "%s() got multiple values for keyword argument '%s'", func_name,
16984  PyString_AsString(kw_name));
16985  #endif
16986 }
16987 
16988 /* ParseKeywords */
16989 static int __Pyx_ParseOptionalKeywords(
16990  PyObject *kwds,
16991  PyObject **argnames[],
16992  PyObject *kwds2,
16993  PyObject *values[],
16994  Py_ssize_t num_pos_args,
16995  const char* function_name)
16996 {
16997  PyObject *key = 0, *value = 0;
16998  Py_ssize_t pos = 0;
16999  PyObject*** name;
17000  PyObject*** first_kw_arg = argnames + num_pos_args;
17001  while (PyDict_Next(kwds, &pos, &key, &value)) {
17002  name = first_kw_arg;
17003  while (*name && (**name != key)) name++;
17004  if (*name) {
17005  values[name-argnames] = value;
17006  continue;
17007  }
17008  name = first_kw_arg;
17009  #if PY_MAJOR_VERSION < 3
17010  if (likely(PyString_Check(key))) {
17011  while (*name) {
17012  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
17013  && _PyString_Eq(**name, key)) {
17014  values[name-argnames] = value;
17015  break;
17016  }
17017  name++;
17018  }
17019  if (*name) continue;
17020  else {
17021  PyObject*** argname = argnames;
17022  while (argname != first_kw_arg) {
17023  if ((**argname == key) || (
17024  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
17025  && _PyString_Eq(**argname, key))) {
17026  goto arg_passed_twice;
17027  }
17028  argname++;
17029  }
17030  }
17031  } else
17032  #endif
17033  if (likely(PyUnicode_Check(key))) {
17034  while (*name) {
17035  int cmp = (**name == key) ? 0 :
17036  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
17037  (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
17038  #endif
17039  PyUnicode_Compare(**name, key);
17040  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
17041  if (cmp == 0) {
17042  values[name-argnames] = value;
17043  break;
17044  }
17045  name++;
17046  }
17047  if (*name) continue;
17048  else {
17049  PyObject*** argname = argnames;
17050  while (argname != first_kw_arg) {
17051  int cmp = (**argname == key) ? 0 :
17052  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
17053  (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
17054  #endif
17055  PyUnicode_Compare(**argname, key);
17056  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
17057  if (cmp == 0) goto arg_passed_twice;
17058  argname++;
17059  }
17060  }
17061  } else
17062  goto invalid_keyword_type;
17063  if (kwds2) {
17064  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
17065  } else {
17066  goto invalid_keyword;
17067  }
17068  }
17069  return 0;
17070 arg_passed_twice:
17071  __Pyx_RaiseDoubleKeywordsError(function_name, key);
17072  goto bad;
17073 invalid_keyword_type:
17074  PyErr_Format(PyExc_TypeError,
17075  "%.200s() keywords must be strings", function_name);
17076  goto bad;
17077 invalid_keyword:
17078  PyErr_Format(PyExc_TypeError,
17079  #if PY_MAJOR_VERSION < 3
17080  "%.200s() got an unexpected keyword argument '%.200s'",
17081  function_name, PyString_AsString(key));
17082  #else
17083  "%s() got an unexpected keyword argument '%U'",
17084  function_name, key);
17085  #endif
17086 bad:
17087  return -1;
17088 }
17089 
17090 /* PyCFunctionFastCall */
17091 #if CYTHON_FAST_PYCCALL
17092 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
17093  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
17094  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
17095  PyObject *self = PyCFunction_GET_SELF(func);
17096  int flags = PyCFunction_GET_FLAGS(func);
17097  assert(PyCFunction_Check(func));
17098  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
17099  assert(nargs >= 0);
17100  assert(nargs == 0 || args != NULL);
17101  /* _PyCFunction_FastCallDict() must not be called with an exception set,
17102  because it may clear it (directly or indirectly) and so the
17103  caller loses its exception */
17104  assert(!PyErr_Occurred());
17105  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
17106  return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
17107  } else {
17108  return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
17109  }
17110 }
17111 #endif
17112 
17113 /* PyFunctionFastCall */
17114 #if CYTHON_FAST_PYCALL
17115 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
17116  PyObject *globals) {
17117  PyFrameObject *f;
17118  PyThreadState *tstate = __Pyx_PyThreadState_Current;
17119  PyObject **fastlocals;
17120  Py_ssize_t i;
17121  PyObject *result;
17122  assert(globals != NULL);
17123  /* XXX Perhaps we should create a specialized
17124  PyFrame_New() that doesn't take locals, but does
17125  take builtins without sanity checking them.
17126  */
17127  assert(tstate != NULL);
17128  f = PyFrame_New(tstate, co, globals, NULL);
17129  if (f == NULL) {
17130  return NULL;
17131  }
17132  fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
17133  for (i = 0; i < na; i++) {
17134  Py_INCREF(*args);
17135  fastlocals[i] = *args++;
17136  }
17137  result = PyEval_EvalFrameEx(f,0);
17138  ++tstate->recursion_depth;
17139  Py_DECREF(f);
17140  --tstate->recursion_depth;
17141  return result;
17142 }
17143 #if 1 || PY_VERSION_HEX < 0x030600B1
17144 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
17145  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
17146  PyObject *globals = PyFunction_GET_GLOBALS(func);
17147  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
17148  PyObject *closure;
17149 #if PY_MAJOR_VERSION >= 3
17150  PyObject *kwdefs;
17151 #endif
17152  PyObject *kwtuple, **k;
17153  PyObject **d;
17154  Py_ssize_t nd;
17155  Py_ssize_t nk;
17156  PyObject *result;
17157  assert(kwargs == NULL || PyDict_Check(kwargs));
17158  nk = kwargs ? PyDict_Size(kwargs) : 0;
17159  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
17160  return NULL;
17161  }
17162  if (
17163 #if PY_MAJOR_VERSION >= 3
17164  co->co_kwonlyargcount == 0 &&
17165 #endif
17166  likely(kwargs == NULL || nk == 0) &&
17167  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
17168  if (argdefs == NULL && co->co_argcount == nargs) {
17169  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
17170  goto done;
17171  }
17172  else if (nargs == 0 && argdefs != NULL
17173  && co->co_argcount == Py_SIZE(argdefs)) {
17174  /* function called with no arguments, but all parameters have
17175  a default value: use default values as arguments .*/
17176  args = &PyTuple_GET_ITEM(argdefs, 0);
17177  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
17178  goto done;
17179  }
17180  }
17181  if (kwargs != NULL) {
17182  Py_ssize_t pos, i;
17183  kwtuple = PyTuple_New(2 * nk);
17184  if (kwtuple == NULL) {
17185  result = NULL;
17186  goto done;
17187  }
17188  k = &PyTuple_GET_ITEM(kwtuple, 0);
17189  pos = i = 0;
17190  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
17191  Py_INCREF(k[i]);
17192  Py_INCREF(k[i+1]);
17193  i += 2;
17194  }
17195  nk = i / 2;
17196  }
17197  else {
17198  kwtuple = NULL;
17199  k = NULL;
17200  }
17201  closure = PyFunction_GET_CLOSURE(func);
17202 #if PY_MAJOR_VERSION >= 3
17203  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
17204 #endif
17205  if (argdefs != NULL) {
17206  d = &PyTuple_GET_ITEM(argdefs, 0);
17207  nd = Py_SIZE(argdefs);
17208  }
17209  else {
17210  d = NULL;
17211  nd = 0;
17212  }
17213 #if PY_MAJOR_VERSION >= 3
17214  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
17215  args, (int)nargs,
17216  k, (int)nk,
17217  d, (int)nd, kwdefs, closure);
17218 #else
17219  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
17220  args, (int)nargs,
17221  k, (int)nk,
17222  d, (int)nd, closure);
17223 #endif
17224  Py_XDECREF(kwtuple);
17225 done:
17226  Py_LeaveRecursiveCall();
17227  return result;
17228 }
17229 #endif
17230 #endif
17231 
17232 /* PyObjectCall */
17233 #if CYTHON_COMPILING_IN_CPYTHON
17234 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
17235  PyObject *result;
17236  ternaryfunc call = func->ob_type->tp_call;
17237  if (unlikely(!call))
17238  return PyObject_Call(func, arg, kw);
17239  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
17240  return NULL;
17241  result = (*call)(func, arg, kw);
17242  Py_LeaveRecursiveCall();
17243  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
17244  PyErr_SetString(
17245  PyExc_SystemError,
17246  "NULL result without error in PyObject_Call");
17247  }
17248  return result;
17249 }
17250 #endif
17251 
17252 /* PyObjectCallMethO */
17253 #if CYTHON_COMPILING_IN_CPYTHON
17254 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
17255  PyObject *self, *result;
17256  PyCFunction cfunc;
17257  cfunc = PyCFunction_GET_FUNCTION(func);
17258  self = PyCFunction_GET_SELF(func);
17259  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
17260  return NULL;
17261  result = cfunc(self, arg);
17262  Py_LeaveRecursiveCall();
17263  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
17264  PyErr_SetString(
17265  PyExc_SystemError,
17266  "NULL result without error in PyObject_Call");
17267  }
17268  return result;
17269 }
17270 #endif
17271 
17272 /* PyObjectCallOneArg */
17273 #if CYTHON_COMPILING_IN_CPYTHON
17274 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
17275  PyObject *result;
17276  PyObject *args = PyTuple_New(1);
17277  if (unlikely(!args)) return NULL;
17278  Py_INCREF(arg);
17279  PyTuple_SET_ITEM(args, 0, arg);
17280  result = __Pyx_PyObject_Call(func, args, NULL);
17281  Py_DECREF(args);
17282  return result;
17283 }
17284 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
17285 #if CYTHON_FAST_PYCALL
17286  if (PyFunction_Check(func)) {
17287  return __Pyx_PyFunction_FastCall(func, &arg, 1);
17288  }
17289 #endif
17290  if (likely(PyCFunction_Check(func))) {
17291  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
17292  return __Pyx_PyObject_CallMethO(func, arg);
17293 #if CYTHON_FAST_PYCCALL
17294  } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
17295  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
17296 #endif
17297  }
17298  }
17299  return __Pyx__PyObject_CallOneArg(func, arg);
17300 }
17301 #else
17302 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
17303  PyObject *result;
17304  PyObject *args = PyTuple_Pack(1, arg);
17305  if (unlikely(!args)) return NULL;
17306  result = __Pyx_PyObject_Call(func, args, NULL);
17307  Py_DECREF(args);
17308  return result;
17309 }
17310 #endif
17311 
17312 /* PyDictVersioning */
17313 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
17314 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
17315  PyObject *dict = Py_TYPE(obj)->tp_dict;
17316  return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
17317 }
17318 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
17319  PyObject **dictptr = NULL;
17320  Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
17321  if (offset) {
17322 #if CYTHON_COMPILING_IN_CPYTHON
17323  dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
17324 #else
17325  dictptr = _PyObject_GetDictPtr(obj);
17326 #endif
17327  }
17328  return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
17329 }
17330 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
17331  PyObject *dict = Py_TYPE(obj)->tp_dict;
17332  if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
17333  return 0;
17334  return obj_dict_version == __Pyx_get_object_dict_version(obj);
17335 }
17336 #endif
17337 
17338 /* GetModuleGlobalName */
17339 #if CYTHON_USE_DICT_VERSIONS
17340 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
17341 #else
17342 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
17343 #endif
17344 {
17345  PyObject *result;
17346 #if !CYTHON_AVOID_BORROWED_REFS
17347 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
17348  result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
17349  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
17350  if (likely(result)) {
17351  return __Pyx_NewRef(result);
17352  } else if (unlikely(PyErr_Occurred())) {
17353  return NULL;
17354  }
17355 #else
17356  result = PyDict_GetItem(__pyx_d, name);
17357  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
17358  if (likely(result)) {
17359  return __Pyx_NewRef(result);
17360  }
17361 #endif
17362 #else
17363  result = PyObject_GetItem(__pyx_d, name);
17364  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
17365  if (likely(result)) {
17366  return __Pyx_NewRef(result);
17367  }
17368  PyErr_Clear();
17369 #endif
17370  return __Pyx_GetBuiltinName(name);
17371 }
17372 
17373 /* PyObjectCall2Args */
17374 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
17375  PyObject *args, *result = NULL;
17376  #if CYTHON_FAST_PYCALL
17377  if (PyFunction_Check(function)) {
17378  PyObject *args[2] = {arg1, arg2};
17379  return __Pyx_PyFunction_FastCall(function, args, 2);
17380  }
17381  #endif
17382  #if CYTHON_FAST_PYCCALL
17383  if (__Pyx_PyFastCFunction_Check(function)) {
17384  PyObject *args[2] = {arg1, arg2};
17385  return __Pyx_PyCFunction_FastCall(function, args, 2);
17386  }
17387  #endif
17388  args = PyTuple_New(2);
17389  if (unlikely(!args)) goto done;
17390  Py_INCREF(arg1);
17391  PyTuple_SET_ITEM(args, 0, arg1);
17392  Py_INCREF(arg2);
17393  PyTuple_SET_ITEM(args, 1, arg2);
17394  Py_INCREF(function);
17395  result = __Pyx_PyObject_Call(function, args, NULL);
17396  Py_DECREF(args);
17397  Py_DECREF(function);
17398 done:
17399  return result;
17400 }
17401 
17402 /* PyObjectSetAttrStr */
17403 #if CYTHON_USE_TYPE_SLOTS
17404 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
17405  PyTypeObject* tp = Py_TYPE(obj);
17406  if (likely(tp->tp_setattro))
17407  return tp->tp_setattro(obj, attr_name, value);
17408 #if PY_MAJOR_VERSION < 3
17409  if (likely(tp->tp_setattr))
17410  return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
17411 #endif
17412  return PyObject_SetAttr(obj, attr_name, value);
17413 }
17414 #endif
17415 
17416 /* DictGetItem */
17417 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
17418 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
17419  PyObject *value;
17420  value = PyDict_GetItemWithError(d, key);
17421  if (unlikely(!value)) {
17422  if (!PyErr_Occurred()) {
17423  if (unlikely(PyTuple_Check(key))) {
17424  PyObject* args = PyTuple_Pack(1, key);
17425  if (likely(args)) {
17426  PyErr_SetObject(PyExc_KeyError, args);
17427  Py_DECREF(args);
17428  }
17429  } else {
17430  PyErr_SetObject(PyExc_KeyError, key);
17431  }
17432  }
17433  return NULL;
17434  }
17435  Py_INCREF(value);
17436  return value;
17437 }
17438 #endif
17439 
17440 /* GetItemInt */
17441 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
17442  PyObject *r;
17443  if (!j) return NULL;
17444  r = PyObject_GetItem(o, j);
17445  Py_DECREF(j);
17446  return r;
17447 }
17448 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
17449  CYTHON_NCP_UNUSED int wraparound,
17450  CYTHON_NCP_UNUSED int boundscheck) {
17451 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17452  Py_ssize_t wrapped_i = i;
17453  if (wraparound & unlikely(i < 0)) {
17454  wrapped_i += PyList_GET_SIZE(o);
17455  }
17456  if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
17457  PyObject *r = PyList_GET_ITEM(o, wrapped_i);
17458  Py_INCREF(r);
17459  return r;
17460  }
17461  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
17462 #else
17463  return PySequence_GetItem(o, i);
17464 #endif
17465 }
17466 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
17467  CYTHON_NCP_UNUSED int wraparound,
17468  CYTHON_NCP_UNUSED int boundscheck) {
17469 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17470  Py_ssize_t wrapped_i = i;
17471  if (wraparound & unlikely(i < 0)) {
17472  wrapped_i += PyTuple_GET_SIZE(o);
17473  }
17474  if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
17475  PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
17476  Py_INCREF(r);
17477  return r;
17478  }
17479  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
17480 #else
17481  return PySequence_GetItem(o, i);
17482 #endif
17483 }
17484 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
17485  CYTHON_NCP_UNUSED int wraparound,
17486  CYTHON_NCP_UNUSED int boundscheck) {
17487 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
17488  if (is_list || PyList_CheckExact(o)) {
17489  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
17490  if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
17491  PyObject *r = PyList_GET_ITEM(o, n);
17492  Py_INCREF(r);
17493  return r;
17494  }
17495  }
17496  else if (PyTuple_CheckExact(o)) {
17497  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
17498  if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
17499  PyObject *r = PyTuple_GET_ITEM(o, n);
17500  Py_INCREF(r);
17501  return r;
17502  }
17503  } else {
17504  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
17505  if (likely(m && m->sq_item)) {
17506  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
17507  Py_ssize_t l = m->sq_length(o);
17508  if (likely(l >= 0)) {
17509  i += l;
17510  } else {
17511  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
17512  return NULL;
17513  PyErr_Clear();
17514  }
17515  }
17516  return m->sq_item(o, i);
17517  }
17518  }
17519 #else
17520  if (is_list || PySequence_Check(o)) {
17521  return PySequence_GetItem(o, i);
17522  }
17523 #endif
17524  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
17525 }
17526 
17527 /* ObjectGetItem */
17528 #if CYTHON_USE_TYPE_SLOTS
17529 static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
17530  PyObject *runerr;
17531  Py_ssize_t key_value;
17532  PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
17533  if (unlikely(!(m && m->sq_item))) {
17534  PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
17535  return NULL;
17536  }
17537  key_value = __Pyx_PyIndex_AsSsize_t(index);
17538  if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
17539  return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
17540  }
17541  if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
17542  PyErr_Clear();
17543  PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
17544  }
17545  return NULL;
17546 }
17547 static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
17548  PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
17549  if (likely(m && m->mp_subscript)) {
17550  return m->mp_subscript(obj, key);
17551  }
17552  return __Pyx_PyObject_GetIndex(obj, key);
17553 }
17554 #endif
17555 
17556 /* GetTopmostException */
17557 #if CYTHON_USE_EXC_INFO_STACK
17558 static _PyErr_StackItem *
17559 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
17560 {
17561  _PyErr_StackItem *exc_info = tstate->exc_info;
17562  while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
17563  exc_info->previous_item != NULL)
17564  {
17565  exc_info = exc_info->previous_item;
17566  }
17567  return exc_info;
17568 }
17569 #endif
17570 
17571 /* SaveResetException */
17572 #if CYTHON_FAST_THREAD_STATE
17573 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
17574  #if CYTHON_USE_EXC_INFO_STACK
17575  _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
17576  *type = exc_info->exc_type;
17577  *value = exc_info->exc_value;
17578  *tb = exc_info->exc_traceback;
17579  #else
17580  *type = tstate->exc_type;
17581  *value = tstate->exc_value;
17582  *tb = tstate->exc_traceback;
17583  #endif
17584  Py_XINCREF(*type);
17585  Py_XINCREF(*value);
17586  Py_XINCREF(*tb);
17587 }
17588 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
17589  PyObject *tmp_type, *tmp_value, *tmp_tb;
17590  #if CYTHON_USE_EXC_INFO_STACK
17591  _PyErr_StackItem *exc_info = tstate->exc_info;
17592  tmp_type = exc_info->exc_type;
17593  tmp_value = exc_info->exc_value;
17594  tmp_tb = exc_info->exc_traceback;
17595  exc_info->exc_type = type;
17596  exc_info->exc_value = value;
17597  exc_info->exc_traceback = tb;
17598  #else
17599  tmp_type = tstate->exc_type;
17600  tmp_value = tstate->exc_value;
17601  tmp_tb = tstate->exc_traceback;
17602  tstate->exc_type = type;
17603  tstate->exc_value = value;
17604  tstate->exc_traceback = tb;
17605  #endif
17606  Py_XDECREF(tmp_type);
17607  Py_XDECREF(tmp_value);
17608  Py_XDECREF(tmp_tb);
17609 }
17610 #endif
17611 
17612 /* PyErrExceptionMatches */
17613 #if CYTHON_FAST_THREAD_STATE
17614 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
17615  Py_ssize_t i, n;
17616  n = PyTuple_GET_SIZE(tuple);
17617 #if PY_MAJOR_VERSION >= 3
17618  for (i=0; i<n; i++) {
17619  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
17620  }
17621 #endif
17622  for (i=0; i<n; i++) {
17623  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
17624  }
17625  return 0;
17626 }
17627 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
17628  PyObject *exc_type = tstate->curexc_type;
17629  if (exc_type == err) return 1;
17630  if (unlikely(!exc_type)) return 0;
17631  if (unlikely(PyTuple_Check(err)))
17632  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
17633  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
17634 }
17635 #endif
17636 
17637 /* GetException */
17638 #if CYTHON_FAST_THREAD_STATE
17639 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
17640 #else
17641 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
17642 #endif
17643 {
17644  PyObject *local_type, *local_value, *local_tb;
17645 #if CYTHON_FAST_THREAD_STATE
17646  PyObject *tmp_type, *tmp_value, *tmp_tb;
17647  local_type = tstate->curexc_type;
17648  local_value = tstate->curexc_value;
17649  local_tb = tstate->curexc_traceback;
17650  tstate->curexc_type = 0;
17651  tstate->curexc_value = 0;
17652  tstate->curexc_traceback = 0;
17653 #else
17654  PyErr_Fetch(&local_type, &local_value, &local_tb);
17655 #endif
17656  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
17657 #if CYTHON_FAST_THREAD_STATE
17658  if (unlikely(tstate->curexc_type))
17659 #else
17660  if (unlikely(PyErr_Occurred()))
17661 #endif
17662  goto bad;
17663  #if PY_MAJOR_VERSION >= 3
17664  if (local_tb) {
17665  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
17666  goto bad;
17667  }
17668  #endif
17669  Py_XINCREF(local_tb);
17670  Py_XINCREF(local_type);
17671  Py_XINCREF(local_value);
17672  *type = local_type;
17673  *value = local_value;
17674  *tb = local_tb;
17675 #if CYTHON_FAST_THREAD_STATE
17676  #if CYTHON_USE_EXC_INFO_STACK
17677  {
17678  _PyErr_StackItem *exc_info = tstate->exc_info;
17679  tmp_type = exc_info->exc_type;
17680  tmp_value = exc_info->exc_value;
17681  tmp_tb = exc_info->exc_traceback;
17682  exc_info->exc_type = local_type;
17683  exc_info->exc_value = local_value;
17684  exc_info->exc_traceback = local_tb;
17685  }
17686  #else
17687  tmp_type = tstate->exc_type;
17688  tmp_value = tstate->exc_value;
17689  tmp_tb = tstate->exc_traceback;
17690  tstate->exc_type = local_type;
17691  tstate->exc_value = local_value;
17692  tstate->exc_traceback = local_tb;
17693  #endif
17694  Py_XDECREF(tmp_type);
17695  Py_XDECREF(tmp_value);
17696  Py_XDECREF(tmp_tb);
17697 #else
17698  PyErr_SetExcInfo(local_type, local_value, local_tb);
17699 #endif
17700  return 0;
17701 bad:
17702  *type = 0;
17703  *value = 0;
17704  *tb = 0;
17705  Py_XDECREF(local_type);
17706  Py_XDECREF(local_value);
17707  Py_XDECREF(local_tb);
17708  return -1;
17709 }
17710 
17711 /* PyObjectCallNoArg */
17712 #if CYTHON_COMPILING_IN_CPYTHON
17713 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
17714 #if CYTHON_FAST_PYCALL
17715  if (PyFunction_Check(func)) {
17716  return __Pyx_PyFunction_FastCall(func, NULL, 0);
17717  }
17718 #endif
17719 #ifdef __Pyx_CyFunction_USED
17720  if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
17721 #else
17722  if (likely(PyCFunction_Check(func)))
17723 #endif
17724  {
17725  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
17726  return __Pyx_PyObject_CallMethO(func, NULL);
17727  }
17728  }
17729  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
17730 }
17731 #endif
17732 
17733 /* PyErrFetchRestore */
17734 #if CYTHON_FAST_THREAD_STATE
17735 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
17736  PyObject *tmp_type, *tmp_value, *tmp_tb;
17737  tmp_type = tstate->curexc_type;
17738  tmp_value = tstate->curexc_value;
17739  tmp_tb = tstate->curexc_traceback;
17740  tstate->curexc_type = type;
17741  tstate->curexc_value = value;
17742  tstate->curexc_traceback = tb;
17743  Py_XDECREF(tmp_type);
17744  Py_XDECREF(tmp_value);
17745  Py_XDECREF(tmp_tb);
17746 }
17747 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
17748  *type = tstate->curexc_type;
17749  *value = tstate->curexc_value;
17750  *tb = tstate->curexc_traceback;
17751  tstate->curexc_type = 0;
17752  tstate->curexc_value = 0;
17753  tstate->curexc_traceback = 0;
17754 }
17755 #endif
17756 
17757 /* SwapException */
17758 #if CYTHON_FAST_THREAD_STATE
17759 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
17760  PyObject *tmp_type, *tmp_value, *tmp_tb;
17761  #if CYTHON_USE_EXC_INFO_STACK
17762  _PyErr_StackItem *exc_info = tstate->exc_info;
17763  tmp_type = exc_info->exc_type;
17764  tmp_value = exc_info->exc_value;
17765  tmp_tb = exc_info->exc_traceback;
17766  exc_info->exc_type = *type;
17767  exc_info->exc_value = *value;
17768  exc_info->exc_traceback = *tb;
17769  #else
17770  tmp_type = tstate->exc_type;
17771  tmp_value = tstate->exc_value;
17772  tmp_tb = tstate->exc_traceback;
17773  tstate->exc_type = *type;
17774  tstate->exc_value = *value;
17775  tstate->exc_traceback = *tb;
17776  #endif
17777  *type = tmp_type;
17778  *value = tmp_value;
17779  *tb = tmp_tb;
17780 }
17781 #else
17782 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
17783  PyObject *tmp_type, *tmp_value, *tmp_tb;
17784  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
17785  PyErr_SetExcInfo(*type, *value, *tb);
17786  *type = tmp_type;
17787  *value = tmp_value;
17788  *tb = tmp_tb;
17789 }
17790 #endif
17791 
17792 /* PyIntBinop */
17793 #if !CYTHON_COMPILING_IN_PYPY
17794 static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
17795  (void)inplace;
17796  (void)zerodivision_check;
17797  #if PY_MAJOR_VERSION < 3
17798  if (likely(PyInt_CheckExact(op1))) {
17799  const long b = intval;
17800  long x;
17801  long a = PyInt_AS_LONG(op1);
17802  x = (long)((unsigned long)a - b);
17803  if (likely((x^a) >= 0 || (x^~b) >= 0))
17804  return PyInt_FromLong(x);
17805  return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
17806  }
17807  #endif
17808  #if CYTHON_USE_PYLONG_INTERNALS
17809  if (likely(PyLong_CheckExact(op1))) {
17810  const long b = intval;
17811  long a, x;
17812 #ifdef HAVE_LONG_LONG
17813  const PY_LONG_LONG llb = intval;
17814  PY_LONG_LONG lla, llx;
17815 #endif
17816  const digit* digits = ((PyLongObject*)op1)->ob_digit;
17817  const Py_ssize_t size = Py_SIZE(op1);
17818  if (likely(__Pyx_sst_abs(size) <= 1)) {
17819  a = likely(size) ? digits[0] : 0;
17820  if (size == -1) a = -a;
17821  } else {
17822  switch (size) {
17823  case -2:
17824  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
17825  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
17826  break;
17827 #ifdef HAVE_LONG_LONG
17828  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
17829  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
17830  goto long_long;
17831 #endif
17832  }
17833  CYTHON_FALLTHROUGH;
17834  case 2:
17835  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
17836  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
17837  break;
17838 #ifdef HAVE_LONG_LONG
17839  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
17840  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
17841  goto long_long;
17842 #endif
17843  }
17844  CYTHON_FALLTHROUGH;
17845  case -3:
17846  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
17847  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
17848  break;
17849 #ifdef HAVE_LONG_LONG
17850  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
17851  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]));
17852  goto long_long;
17853 #endif
17854  }
17855  CYTHON_FALLTHROUGH;
17856  case 3:
17857  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
17858  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
17859  break;
17860 #ifdef HAVE_LONG_LONG
17861  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
17862  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]));
17863  goto long_long;
17864 #endif
17865  }
17866  CYTHON_FALLTHROUGH;
17867  case -4:
17868  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
17869  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
17870  break;
17871 #ifdef HAVE_LONG_LONG
17872  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
17873  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]));
17874  goto long_long;
17875 #endif
17876  }
17877  CYTHON_FALLTHROUGH;
17878  case 4:
17879  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
17880  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
17881  break;
17882 #ifdef HAVE_LONG_LONG
17883  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
17884  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]));
17885  goto long_long;
17886 #endif
17887  }
17888  CYTHON_FALLTHROUGH;
17889  default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
17890  }
17891  }
17892  x = a - b;
17893  return PyLong_FromLong(x);
17894 #ifdef HAVE_LONG_LONG
17895  long_long:
17896  llx = lla - llb;
17897  return PyLong_FromLongLong(llx);
17898 #endif
17899 
17900 
17901  }
17902  #endif
17903  if (PyFloat_CheckExact(op1)) {
17904  const long b = intval;
17905  double a = PyFloat_AS_DOUBLE(op1);
17906  double result;
17907  PyFPE_START_PROTECT("subtract", return NULL)
17908  result = ((double)a) - (double)b;
17909  PyFPE_END_PROTECT(result)
17910  return PyFloat_FromDouble(result);
17911  }
17912  return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
17913 }
17914 #endif
17915 
17916 /* PyIntBinop */
17917 #if !CYTHON_COMPILING_IN_PYPY
17918 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
17919  (void)inplace;
17920  (void)zerodivision_check;
17921  #if PY_MAJOR_VERSION < 3
17922  if (likely(PyInt_CheckExact(op1))) {
17923  const long b = intval;
17924  long x;
17925  long a = PyInt_AS_LONG(op1);
17926  x = (long)((unsigned long)a + b);
17927  if (likely((x^a) >= 0 || (x^b) >= 0))
17928  return PyInt_FromLong(x);
17929  return PyLong_Type.tp_as_number->nb_add(op1, op2);
17930  }
17931  #endif
17932  #if CYTHON_USE_PYLONG_INTERNALS
17933  if (likely(PyLong_CheckExact(op1))) {
17934  const long b = intval;
17935  long a, x;
17936 #ifdef HAVE_LONG_LONG
17937  const PY_LONG_LONG llb = intval;
17938  PY_LONG_LONG lla, llx;
17939 #endif
17940  const digit* digits = ((PyLongObject*)op1)->ob_digit;
17941  const Py_ssize_t size = Py_SIZE(op1);
17942  if (likely(__Pyx_sst_abs(size) <= 1)) {
17943  a = likely(size) ? digits[0] : 0;
17944  if (size == -1) a = -a;
17945  } else {
17946  switch (size) {
17947  case -2:
17948  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
17949  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
17950  break;
17951 #ifdef HAVE_LONG_LONG
17952  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
17953  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
17954  goto long_long;
17955 #endif
17956  }
17957  CYTHON_FALLTHROUGH;
17958  case 2:
17959  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
17960  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
17961  break;
17962 #ifdef HAVE_LONG_LONG
17963  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
17964  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
17965  goto long_long;
17966 #endif
17967  }
17968  CYTHON_FALLTHROUGH;
17969  case -3:
17970  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
17971  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
17972  break;
17973 #ifdef HAVE_LONG_LONG
17974  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
17975  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]));
17976  goto long_long;
17977 #endif
17978  }
17979  CYTHON_FALLTHROUGH;
17980  case 3:
17981  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
17982  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
17983  break;
17984 #ifdef HAVE_LONG_LONG
17985  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
17986  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]));
17987  goto long_long;
17988 #endif
17989  }
17990  CYTHON_FALLTHROUGH;
17991  case -4:
17992  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
17993  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
17994  break;
17995 #ifdef HAVE_LONG_LONG
17996  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
17997  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]));
17998  goto long_long;
17999 #endif
18000  }
18001  CYTHON_FALLTHROUGH;
18002  case 4:
18003  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
18004  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
18005  break;
18006 #ifdef HAVE_LONG_LONG
18007  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
18008  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]));
18009  goto long_long;
18010 #endif
18011  }
18012  CYTHON_FALLTHROUGH;
18013  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
18014  }
18015  }
18016  x = a + b;
18017  return PyLong_FromLong(x);
18018 #ifdef HAVE_LONG_LONG
18019  long_long:
18020  llx = lla + llb;
18021  return PyLong_FromLongLong(llx);
18022 #endif
18023 
18024 
18025  }
18026  #endif
18027  if (PyFloat_CheckExact(op1)) {
18028  const long b = intval;
18029  double a = PyFloat_AS_DOUBLE(op1);
18030  double result;
18031  PyFPE_START_PROTECT("add", return NULL)
18032  result = ((double)a) + (double)b;
18033  PyFPE_END_PROTECT(result)
18034  return PyFloat_FromDouble(result);
18035  }
18036  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
18037 }
18038 #endif
18039 
18040 /* None */
18041 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
18042  PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
18043 }
18044 
18045 /* PyFloatBinop */
18046 #if !CYTHON_COMPILING_IN_PYPY
18047 static PyObject* __Pyx_PyFloat_AddObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
18048  const double b = floatval;
18049  double a, result;
18050  (void)inplace;
18051  (void)zerodivision_check;
18052  if (likely(PyFloat_CheckExact(op1))) {
18053  a = PyFloat_AS_DOUBLE(op1);
18054 
18055  } else
18056  #if PY_MAJOR_VERSION < 3
18057  if (likely(PyInt_CheckExact(op1))) {
18058  a = (double) PyInt_AS_LONG(op1);
18059 
18060  } else
18061  #endif
18062  if (likely(PyLong_CheckExact(op1))) {
18063  #if CYTHON_USE_PYLONG_INTERNALS
18064  const digit* digits = ((PyLongObject*)op1)->ob_digit;
18065  const Py_ssize_t size = Py_SIZE(op1);
18066  switch (size) {
18067  case 0: a = 0.0; break;
18068  case -1: a = -(double) digits[0]; break;
18069  case 1: a = (double) digits[0]; break;
18070  case -2:
18071  case 2:
18072  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
18073  a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
18074  if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
18075  if (size == -2)
18076  a = -a;
18077  break;
18078  }
18079  }
18080  CYTHON_FALLTHROUGH;
18081  case -3:
18082  case 3:
18083  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
18084  a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
18085  if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
18086  if (size == -3)
18087  a = -a;
18088  break;
18089  }
18090  }
18091  CYTHON_FALLTHROUGH;
18092  case -4:
18093  case 4:
18094  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
18095  a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
18096  if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
18097  if (size == -4)
18098  a = -a;
18099  break;
18100  }
18101  }
18102  CYTHON_FALLTHROUGH;
18103  default:
18104  #else
18105  {
18106  #endif
18107  a = PyLong_AsDouble(op1);
18108  if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
18109 
18110  }
18111  } else {
18112  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
18113  }
18114 
18115  PyFPE_START_PROTECT("add", return NULL)
18116  result = a + b;
18117  PyFPE_END_PROTECT(result)
18118  return PyFloat_FromDouble(result);
18119 }
18120 #endif
18121 
18122 /* SliceObject */
18123  static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
18124  Py_ssize_t cstart, Py_ssize_t cstop,
18125  PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
18126  int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
18127 #if CYTHON_USE_TYPE_SLOTS
18128  PyMappingMethods* mp;
18129 #if PY_MAJOR_VERSION < 3
18130  PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
18131  if (likely(ms && ms->sq_slice)) {
18132  if (!has_cstart) {
18133  if (_py_start && (*_py_start != Py_None)) {
18134  cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
18135  if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
18136  } else
18137  cstart = 0;
18138  }
18139  if (!has_cstop) {
18140  if (_py_stop && (*_py_stop != Py_None)) {
18141  cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
18142  if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
18143  } else
18144  cstop = PY_SSIZE_T_MAX;
18145  }
18146  if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
18147  Py_ssize_t l = ms->sq_length(obj);
18148  if (likely(l >= 0)) {
18149  if (cstop < 0) {
18150  cstop += l;
18151  if (cstop < 0) cstop = 0;
18152  }
18153  if (cstart < 0) {
18154  cstart += l;
18155  if (cstart < 0) cstart = 0;
18156  }
18157  } else {
18158  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
18159  goto bad;
18160  PyErr_Clear();
18161  }
18162  }
18163  return ms->sq_slice(obj, cstart, cstop);
18164  }
18165 #endif
18166  mp = Py_TYPE(obj)->tp_as_mapping;
18167  if (likely(mp && mp->mp_subscript))
18168 #endif
18169  {
18170  PyObject* result;
18171  PyObject *py_slice, *py_start, *py_stop;
18172  if (_py_slice) {
18173  py_slice = *_py_slice;
18174  } else {
18175  PyObject* owned_start = NULL;
18176  PyObject* owned_stop = NULL;
18177  if (_py_start) {
18178  py_start = *_py_start;
18179  } else {
18180  if (has_cstart) {
18181  owned_start = py_start = PyInt_FromSsize_t(cstart);
18182  if (unlikely(!py_start)) goto bad;
18183  } else
18184  py_start = Py_None;
18185  }
18186  if (_py_stop) {
18187  py_stop = *_py_stop;
18188  } else {
18189  if (has_cstop) {
18190  owned_stop = py_stop = PyInt_FromSsize_t(cstop);
18191  if (unlikely(!py_stop)) {
18192  Py_XDECREF(owned_start);
18193  goto bad;
18194  }
18195  } else
18196  py_stop = Py_None;
18197  }
18198  py_slice = PySlice_New(py_start, py_stop, Py_None);
18199  Py_XDECREF(owned_start);
18200  Py_XDECREF(owned_stop);
18201  if (unlikely(!py_slice)) goto bad;
18202  }
18203 #if CYTHON_USE_TYPE_SLOTS
18204  result = mp->mp_subscript(obj, py_slice);
18205 #else
18206  result = PyObject_GetItem(obj, py_slice);
18207 #endif
18208  if (!_py_slice) {
18209  Py_DECREF(py_slice);
18210  }
18211  return result;
18212  }
18213  PyErr_Format(PyExc_TypeError,
18214  "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
18215 bad:
18216  return NULL;
18217 }
18218 
18219 /* PyFloatBinop */
18220  #if !CYTHON_COMPILING_IN_PYPY
18221 static PyObject* __Pyx_PyFloat_SubtractCObj(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
18222  const double a = floatval;
18223  double b, result;
18224  (void)inplace;
18225  (void)zerodivision_check;
18226  if (likely(PyFloat_CheckExact(op2))) {
18227  b = PyFloat_AS_DOUBLE(op2);
18228 
18229  } else
18230  #if PY_MAJOR_VERSION < 3
18231  if (likely(PyInt_CheckExact(op2))) {
18232  b = (double) PyInt_AS_LONG(op2);
18233 
18234  } else
18235  #endif
18236  if (likely(PyLong_CheckExact(op2))) {
18237  #if CYTHON_USE_PYLONG_INTERNALS
18238  const digit* digits = ((PyLongObject*)op2)->ob_digit;
18239  const Py_ssize_t size = Py_SIZE(op2);
18240  switch (size) {
18241  case 0: b = 0.0; break;
18242  case -1: b = -(double) digits[0]; break;
18243  case 1: b = (double) digits[0]; break;
18244  case -2:
18245  case 2:
18246  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
18247  b = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
18248  if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) {
18249  if (size == -2)
18250  b = -b;
18251  break;
18252  }
18253  }
18254  CYTHON_FALLTHROUGH;
18255  case -3:
18256  case 3:
18257  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
18258  b = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
18259  if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) {
18260  if (size == -3)
18261  b = -b;
18262  break;
18263  }
18264  }
18265  CYTHON_FALLTHROUGH;
18266  case -4:
18267  case 4:
18268  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
18269  b = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
18270  if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) {
18271  if (size == -4)
18272  b = -b;
18273  break;
18274  }
18275  }
18276  CYTHON_FALLTHROUGH;
18277  default:
18278  #else
18279  {
18280  #endif
18281  b = PyLong_AsDouble(op2);
18282  if (unlikely(b == -1.0 && PyErr_Occurred())) return NULL;
18283 
18284  }
18285  } else {
18286  return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
18287  }
18288 
18289  PyFPE_START_PROTECT("subtract", return NULL)
18290  result = a - b;
18291  PyFPE_END_PROTECT(result)
18292  return PyFloat_FromDouble(result);
18293 }
18294 #endif
18295 
18296 /* RaiseTooManyValuesToUnpack */
18297  static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
18298  PyErr_Format(PyExc_ValueError,
18299  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
18300 }
18301 
18302 /* RaiseNeedMoreValuesToUnpack */
18303  static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
18304  PyErr_Format(PyExc_ValueError,
18305  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
18306  index, (index == 1) ? "" : "s");
18307 }
18308 
18309 /* IterFinish */
18310  static CYTHON_INLINE int __Pyx_IterFinish(void) {
18311 #if CYTHON_FAST_THREAD_STATE
18312  PyThreadState *tstate = __Pyx_PyThreadState_Current;
18313  PyObject* exc_type = tstate->curexc_type;
18314  if (unlikely(exc_type)) {
18315  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
18316  PyObject *exc_value, *exc_tb;
18317  exc_value = tstate->curexc_value;
18318  exc_tb = tstate->curexc_traceback;
18319  tstate->curexc_type = 0;
18320  tstate->curexc_value = 0;
18321  tstate->curexc_traceback = 0;
18322  Py_DECREF(exc_type);
18323  Py_XDECREF(exc_value);
18324  Py_XDECREF(exc_tb);
18325  return 0;
18326  } else {
18327  return -1;
18328  }
18329  }
18330  return 0;
18331 #else
18332  if (unlikely(PyErr_Occurred())) {
18333  if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
18334  PyErr_Clear();
18335  return 0;
18336  } else {
18337  return -1;
18338  }
18339  }
18340  return 0;
18341 #endif
18342 }
18343 
18344 /* UnpackItemEndCheck */
18345  static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
18346  if (unlikely(retval)) {
18347  Py_DECREF(retval);
18348  __Pyx_RaiseTooManyValuesError(expected);
18349  return -1;
18350  } else {
18351  return __Pyx_IterFinish();
18352  }
18353  return 0;
18354 }
18355 
18356 /* Import */
18357  static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
18358  PyObject *empty_list = 0;
18359  PyObject *module = 0;
18360  PyObject *global_dict = 0;
18361  PyObject *empty_dict = 0;
18362  PyObject *list;
18363  #if PY_MAJOR_VERSION < 3
18364  PyObject *py_import;
18365  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
18366  if (!py_import)
18367  goto bad;
18368  #endif
18369  if (from_list)
18370  list = from_list;
18371  else {
18372  empty_list = PyList_New(0);
18373  if (!empty_list)
18374  goto bad;
18375  list = empty_list;
18376  }
18377  global_dict = PyModule_GetDict(__pyx_m);
18378  if (!global_dict)
18379  goto bad;
18380  empty_dict = PyDict_New();
18381  if (!empty_dict)
18382  goto bad;
18383  {
18384  #if PY_MAJOR_VERSION >= 3
18385  if (level == -1) {
18386  if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
18387  module = PyImport_ImportModuleLevelObject(
18388  name, global_dict, empty_dict, list, 1);
18389  if (!module) {
18390  if (!PyErr_ExceptionMatches(PyExc_ImportError))
18391  goto bad;
18392  PyErr_Clear();
18393  }
18394  }
18395  level = 0;
18396  }
18397  #endif
18398  if (!module) {
18399  #if PY_MAJOR_VERSION < 3
18400  PyObject *py_level = PyInt_FromLong(level);
18401  if (!py_level)
18402  goto bad;
18403  module = PyObject_CallFunctionObjArgs(py_import,
18404  name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
18405  Py_DECREF(py_level);
18406  #else
18407  module = PyImport_ImportModuleLevelObject(
18408  name, global_dict, empty_dict, list, level);
18409  #endif
18410  }
18411  }
18412 bad:
18413  #if PY_MAJOR_VERSION < 3
18414  Py_XDECREF(py_import);
18415  #endif
18416  Py_XDECREF(empty_list);
18417  Py_XDECREF(empty_dict);
18418  return module;
18419 }
18420 
18421 /* ImportFrom */
18422  static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
18423  PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
18424  if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
18425  PyErr_Format(PyExc_ImportError,
18426  #if PY_MAJOR_VERSION < 3
18427  "cannot import name %.230s", PyString_AS_STRING(name));
18428  #else
18429  "cannot import name %S", name);
18430  #endif
18431  }
18432  return value;
18433 }
18434 
18435 /* PyFloatBinop */
18436  #if !CYTHON_COMPILING_IN_PYPY
18437 static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
18438  const double b = floatval;
18439  double a, result;
18440  (void)inplace;
18441  (void)zerodivision_check;
18442  if (likely(PyFloat_CheckExact(op1))) {
18443  a = PyFloat_AS_DOUBLE(op1);
18444 
18445  } else
18446  #if PY_MAJOR_VERSION < 3
18447  if (likely(PyInt_CheckExact(op1))) {
18448  a = (double) PyInt_AS_LONG(op1);
18449 
18450  } else
18451  #endif
18452  if (likely(PyLong_CheckExact(op1))) {
18453  #if CYTHON_USE_PYLONG_INTERNALS
18454  const digit* digits = ((PyLongObject*)op1)->ob_digit;
18455  const Py_ssize_t size = Py_SIZE(op1);
18456  switch (size) {
18457  case 0: a = 0.0; break;
18458  case -1: a = -(double) digits[0]; break;
18459  case 1: a = (double) digits[0]; break;
18460  case -2:
18461  case 2:
18462  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
18463  a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
18464  if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
18465  if (size == -2)
18466  a = -a;
18467  break;
18468  }
18469  }
18470  CYTHON_FALLTHROUGH;
18471  case -3:
18472  case 3:
18473  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
18474  a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
18475  if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
18476  if (size == -3)
18477  a = -a;
18478  break;
18479  }
18480  }
18481  CYTHON_FALLTHROUGH;
18482  case -4:
18483  case 4:
18484  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
18485  a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
18486  if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
18487  if (size == -4)
18488  a = -a;
18489  break;
18490  }
18491  }
18492  CYTHON_FALLTHROUGH;
18493  default:
18494  #else
18495  {
18496  #endif
18497  a = PyLong_AsDouble(op1);
18498  if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
18499 
18500  }
18501  } else {
18502  return (inplace ? PyNumber_InPlaceTrueDivide : PyNumber_TrueDivide)(op1, op2);
18503  }
18504 
18505  PyFPE_START_PROTECT("divide", return NULL)
18506  result = a / b;
18507  PyFPE_END_PROTECT(result)
18508  return PyFloat_FromDouble(result);
18509 }
18510 #endif
18511 
18512 /* CalculateMetaclass */
18513  static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
18514  Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
18515  for (i=0; i < nbases; i++) {
18516  PyTypeObject *tmptype;
18517  PyObject *tmp = PyTuple_GET_ITEM(bases, i);
18518  tmptype = Py_TYPE(tmp);
18519 #if PY_MAJOR_VERSION < 3
18520  if (tmptype == &PyClass_Type)
18521  continue;
18522 #endif
18523  if (!metaclass) {
18524  metaclass = tmptype;
18525  continue;
18526  }
18527  if (PyType_IsSubtype(metaclass, tmptype))
18528  continue;
18529  if (PyType_IsSubtype(tmptype, metaclass)) {
18530  metaclass = tmptype;
18531  continue;
18532  }
18533  PyErr_SetString(PyExc_TypeError,
18534  "metaclass conflict: "
18535  "the metaclass of a derived class "
18536  "must be a (non-strict) subclass "
18537  "of the metaclasses of all its bases");
18538  return NULL;
18539  }
18540  if (!metaclass) {
18541 #if PY_MAJOR_VERSION < 3
18542  metaclass = &PyClass_Type;
18543 #else
18544  metaclass = &PyType_Type;
18545 #endif
18546  }
18547  Py_INCREF((PyObject*) metaclass);
18548  return (PyObject*) metaclass;
18549 }
18550 
18551 /* FetchCommonType */
18552  static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
18553  PyObject* fake_module;
18554  PyTypeObject* cached_type = NULL;
18555  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
18556  if (!fake_module) return NULL;
18557  Py_INCREF(fake_module);
18558  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
18559  if (cached_type) {
18560  if (!PyType_Check((PyObject*)cached_type)) {
18561  PyErr_Format(PyExc_TypeError,
18562  "Shared Cython type %.200s is not a type object",
18563  type->tp_name);
18564  goto bad;
18565  }
18566  if (cached_type->tp_basicsize != type->tp_basicsize) {
18567  PyErr_Format(PyExc_TypeError,
18568  "Shared Cython type %.200s has the wrong size, try recompiling",
18569  type->tp_name);
18570  goto bad;
18571  }
18572  } else {
18573  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
18574  PyErr_Clear();
18575  if (PyType_Ready(type) < 0) goto bad;
18576  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
18577  goto bad;
18578  Py_INCREF(type);
18579  cached_type = type;
18580  }
18581 done:
18582  Py_DECREF(fake_module);
18583  return cached_type;
18584 bad:
18585  Py_XDECREF(cached_type);
18586  cached_type = NULL;
18587  goto done;
18588 }
18589 
18590 /* CythonFunctionShared */
18591  #include <structmember.h>
18592 static PyObject *
18593 __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
18594 {
18595  if (unlikely(op->func_doc == NULL)) {
18596  if (op->func.m_ml->ml_doc) {
18597 #if PY_MAJOR_VERSION >= 3
18598  op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
18599 #else
18600  op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
18601 #endif
18602  if (unlikely(op->func_doc == NULL))
18603  return NULL;
18604  } else {
18605  Py_INCREF(Py_None);
18606  return Py_None;
18607  }
18608  }
18609  Py_INCREF(op->func_doc);
18610  return op->func_doc;
18611 }
18612 static int
18613 __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
18614 {
18615  PyObject *tmp = op->func_doc;
18616  if (value == NULL) {
18617  value = Py_None;
18618  }
18619  Py_INCREF(value);
18620  op->func_doc = value;
18621  Py_XDECREF(tmp);
18622  return 0;
18623 }
18624 static PyObject *
18625 __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
18626 {
18627  if (unlikely(op->func_name == NULL)) {
18628 #if PY_MAJOR_VERSION >= 3
18629  op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
18630 #else
18631  op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
18632 #endif
18633  if (unlikely(op->func_name == NULL))
18634  return NULL;
18635  }
18636  Py_INCREF(op->func_name);
18637  return op->func_name;
18638 }
18639 static int
18640 __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
18641 {
18642  PyObject *tmp;
18643 #if PY_MAJOR_VERSION >= 3
18644  if (unlikely(value == NULL || !PyUnicode_Check(value)))
18645 #else
18646  if (unlikely(value == NULL || !PyString_Check(value)))
18647 #endif
18648  {
18649  PyErr_SetString(PyExc_TypeError,
18650  "__name__ must be set to a string object");
18651  return -1;
18652  }
18653  tmp = op->func_name;
18654  Py_INCREF(value);
18655  op->func_name = value;
18656  Py_XDECREF(tmp);
18657  return 0;
18658 }
18659 static PyObject *
18660 __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
18661 {
18662  Py_INCREF(op->func_qualname);
18663  return op->func_qualname;
18664 }
18665 static int
18666 __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
18667 {
18668  PyObject *tmp;
18669 #if PY_MAJOR_VERSION >= 3
18670  if (unlikely(value == NULL || !PyUnicode_Check(value)))
18671 #else
18672  if (unlikely(value == NULL || !PyString_Check(value)))
18673 #endif
18674  {
18675  PyErr_SetString(PyExc_TypeError,
18676  "__qualname__ must be set to a string object");
18677  return -1;
18678  }
18679  tmp = op->func_qualname;
18680  Py_INCREF(value);
18681  op->func_qualname = value;
18682  Py_XDECREF(tmp);
18683  return 0;
18684 }
18685 static PyObject *
18686 __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
18687 {
18688  PyObject *self;
18689  self = m->func_closure;
18690  if (self == NULL)
18691  self = Py_None;
18692  Py_INCREF(self);
18693  return self;
18694 }
18695 static PyObject *
18696 __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
18697 {
18698  if (unlikely(op->func_dict == NULL)) {
18699  op->func_dict = PyDict_New();
18700  if (unlikely(op->func_dict == NULL))
18701  return NULL;
18702  }
18703  Py_INCREF(op->func_dict);
18704  return op->func_dict;
18705 }
18706 static int
18707 __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
18708 {
18709  PyObject *tmp;
18710  if (unlikely(value == NULL)) {
18711  PyErr_SetString(PyExc_TypeError,
18712  "function's dictionary may not be deleted");
18713  return -1;
18714  }
18715  if (unlikely(!PyDict_Check(value))) {
18716  PyErr_SetString(PyExc_TypeError,
18717  "setting function's dictionary to a non-dict");
18718  return -1;
18719  }
18720  tmp = op->func_dict;
18721  Py_INCREF(value);
18722  op->func_dict = value;
18723  Py_XDECREF(tmp);
18724  return 0;
18725 }
18726 static PyObject *
18727 __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
18728 {
18729  Py_INCREF(op->func_globals);
18730  return op->func_globals;
18731 }
18732 static PyObject *
18733 __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
18734 {
18735  Py_INCREF(Py_None);
18736  return Py_None;
18737 }
18738 static PyObject *
18739 __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
18740 {
18741  PyObject* result = (op->func_code) ? op->func_code : Py_None;
18742  Py_INCREF(result);
18743  return result;
18744 }
18745 static int
18746 __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
18747  int result = 0;
18748  PyObject *res = op->defaults_getter((PyObject *) op);
18749  if (unlikely(!res))
18750  return -1;
18751  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18752  op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
18753  Py_INCREF(op->defaults_tuple);
18754  op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
18755  Py_INCREF(op->defaults_kwdict);
18756  #else
18757  op->defaults_tuple = PySequence_ITEM(res, 0);
18758  if (unlikely(!op->defaults_tuple)) result = -1;
18759  else {
18760  op->defaults_kwdict = PySequence_ITEM(res, 1);
18761  if (unlikely(!op->defaults_kwdict)) result = -1;
18762  }
18763  #endif
18764  Py_DECREF(res);
18765  return result;
18766 }
18767 static int
18768 __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
18769  PyObject* tmp;
18770  if (!value) {
18771  value = Py_None;
18772  } else if (value != Py_None && !PyTuple_Check(value)) {
18773  PyErr_SetString(PyExc_TypeError,
18774  "__defaults__ must be set to a tuple object");
18775  return -1;
18776  }
18777  Py_INCREF(value);
18778  tmp = op->defaults_tuple;
18779  op->defaults_tuple = value;
18780  Py_XDECREF(tmp);
18781  return 0;
18782 }
18783 static PyObject *
18784 __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
18785  PyObject* result = op->defaults_tuple;
18786  if (unlikely(!result)) {
18787  if (op->defaults_getter) {
18788  if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
18789  result = op->defaults_tuple;
18790  } else {
18791  result = Py_None;
18792  }
18793  }
18794  Py_INCREF(result);
18795  return result;
18796 }
18797 static int
18798 __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
18799  PyObject* tmp;
18800  if (!value) {
18801  value = Py_None;
18802  } else if (value != Py_None && !PyDict_Check(value)) {
18803  PyErr_SetString(PyExc_TypeError,
18804  "__kwdefaults__ must be set to a dict object");
18805  return -1;
18806  }
18807  Py_INCREF(value);
18808  tmp = op->defaults_kwdict;
18809  op->defaults_kwdict = value;
18810  Py_XDECREF(tmp);
18811  return 0;
18812 }
18813 static PyObject *
18814 __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
18815  PyObject* result = op->defaults_kwdict;
18816  if (unlikely(!result)) {
18817  if (op->defaults_getter) {
18818  if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
18819  result = op->defaults_kwdict;
18820  } else {
18821  result = Py_None;
18822  }
18823  }
18824  Py_INCREF(result);
18825  return result;
18826 }
18827 static int
18828 __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
18829  PyObject* tmp;
18830  if (!value || value == Py_None) {
18831  value = NULL;
18832  } else if (!PyDict_Check(value)) {
18833  PyErr_SetString(PyExc_TypeError,
18834  "__annotations__ must be set to a dict object");
18835  return -1;
18836  }
18837  Py_XINCREF(value);
18838  tmp = op->func_annotations;
18839  op->func_annotations = value;
18840  Py_XDECREF(tmp);
18841  return 0;
18842 }
18843 static PyObject *
18844 __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
18845  PyObject* result = op->func_annotations;
18846  if (unlikely(!result)) {
18847  result = PyDict_New();
18848  if (unlikely(!result)) return NULL;
18849  op->func_annotations = result;
18850  }
18851  Py_INCREF(result);
18852  return result;
18853 }
18854 static PyGetSetDef __pyx_CyFunction_getsets[] = {
18855  {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
18856  {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
18857  {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
18858  {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
18859  {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
18860  {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
18861  {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
18862  {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
18863  {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
18864  {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
18865  {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
18866  {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
18867  {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
18868  {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
18869  {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
18870  {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
18871  {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
18872  {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
18873  {0, 0, 0, 0, 0}
18874 };
18875 static PyMemberDef __pyx_CyFunction_members[] = {
18876  {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
18877  {0, 0, 0, 0, 0}
18878 };
18879 static PyObject *
18880 __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
18881 {
18882 #if PY_MAJOR_VERSION >= 3
18883  return PyUnicode_FromString(m->func.m_ml->ml_name);
18884 #else
18885  return PyString_FromString(m->func.m_ml->ml_name);
18886 #endif
18887 }
18888 static PyMethodDef __pyx_CyFunction_methods[] = {
18889  {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
18890  {0, 0, 0, 0}
18891 };
18892 #if PY_VERSION_HEX < 0x030500A0
18893 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
18894 #else
18895 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
18896 #endif
18897 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
18898  PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
18899  if (unlikely(op == NULL))
18900  return NULL;
18901  op->flags = flags;
18902  __Pyx_CyFunction_weakreflist(op) = NULL;
18903  op->func.m_ml = ml;
18904  op->func.m_self = (PyObject *) op;
18905  Py_XINCREF(closure);
18906  op->func_closure = closure;
18907  Py_XINCREF(module);
18908  op->func.m_module = module;
18909  op->func_dict = NULL;
18910  op->func_name = NULL;
18911  Py_INCREF(qualname);
18912  op->func_qualname = qualname;
18913  op->func_doc = NULL;
18914  op->func_classobj = NULL;
18915  op->func_globals = globals;
18916  Py_INCREF(op->func_globals);
18917  Py_XINCREF(code);
18918  op->func_code = code;
18919  op->defaults_pyobjects = 0;
18920  op->defaults_size = 0;
18921  op->defaults = NULL;
18922  op->defaults_tuple = NULL;
18923  op->defaults_kwdict = NULL;
18924  op->defaults_getter = NULL;
18925  op->func_annotations = NULL;
18926  return (PyObject *) op;
18927 }
18928 static int
18929 __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
18930 {
18931  Py_CLEAR(m->func_closure);
18932  Py_CLEAR(m->func.m_module);
18933  Py_CLEAR(m->func_dict);
18934  Py_CLEAR(m->func_name);
18935  Py_CLEAR(m->func_qualname);
18936  Py_CLEAR(m->func_doc);
18937  Py_CLEAR(m->func_globals);
18938  Py_CLEAR(m->func_code);
18939  Py_CLEAR(m->func_classobj);
18940  Py_CLEAR(m->defaults_tuple);
18941  Py_CLEAR(m->defaults_kwdict);
18942  Py_CLEAR(m->func_annotations);
18943  if (m->defaults) {
18944  PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
18945  int i;
18946  for (i = 0; i < m->defaults_pyobjects; i++)
18947  Py_XDECREF(pydefaults[i]);
18948  PyObject_Free(m->defaults);
18949  m->defaults = NULL;
18950  }
18951  return 0;
18952 }
18953 static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
18954 {
18955  if (__Pyx_CyFunction_weakreflist(m) != NULL)
18956  PyObject_ClearWeakRefs((PyObject *) m);
18957  __Pyx_CyFunction_clear(m);
18958  PyObject_GC_Del(m);
18959 }
18960 static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
18961 {
18962  PyObject_GC_UnTrack(m);
18963  __Pyx__CyFunction_dealloc(m);
18964 }
18965 static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
18966 {
18967  Py_VISIT(m->func_closure);
18968  Py_VISIT(m->func.m_module);
18969  Py_VISIT(m->func_dict);
18970  Py_VISIT(m->func_name);
18971  Py_VISIT(m->func_qualname);
18972  Py_VISIT(m->func_doc);
18973  Py_VISIT(m->func_globals);
18974  Py_VISIT(m->func_code);
18975  Py_VISIT(m->func_classobj);
18976  Py_VISIT(m->defaults_tuple);
18977  Py_VISIT(m->defaults_kwdict);
18978  if (m->defaults) {
18979  PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
18980  int i;
18981  for (i = 0; i < m->defaults_pyobjects; i++)
18982  Py_VISIT(pydefaults[i]);
18983  }
18984  return 0;
18985 }
18986 static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
18987 {
18988 #if PY_MAJOR_VERSION < 3
18989  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
18990  if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
18991  Py_INCREF(func);
18992  return func;
18993  }
18994  if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
18995  if (type == NULL)
18996  type = (PyObject *)(Py_TYPE(obj));
18997  return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
18998  }
18999  if (obj == Py_None)
19000  obj = NULL;
19001 #endif
19002  return __Pyx_PyMethod_New(func, obj, type);
19003 }
19004 static PyObject*
19005 __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
19006 {
19007 #if PY_MAJOR_VERSION >= 3
19008  return PyUnicode_FromFormat("<cyfunction %U at %p>",
19009  op->func_qualname, (void *)op);
19010 #else
19011  return PyString_FromFormat("<cyfunction %s at %p>",
19012  PyString_AsString(op->func_qualname), (void *)op);
19013 #endif
19014 }
19015 static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
19016  PyCFunctionObject* f = (PyCFunctionObject*)func;
19017  PyCFunction meth = f->m_ml->ml_meth;
19018  Py_ssize_t size;
19019  switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
19020  case METH_VARARGS:
19021  if (likely(kw == NULL || PyDict_Size(kw) == 0))
19022  return (*meth)(self, arg);
19023  break;
19024  case METH_VARARGS | METH_KEYWORDS:
19025  return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
19026  case METH_NOARGS:
19027  if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
19028  size = PyTuple_GET_SIZE(arg);
19029  if (likely(size == 0))
19030  return (*meth)(self, NULL);
19031  PyErr_Format(PyExc_TypeError,
19032  "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
19033  f->m_ml->ml_name, size);
19034  return NULL;
19035  }
19036  break;
19037  case METH_O:
19038  if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
19039  size = PyTuple_GET_SIZE(arg);
19040  if (likely(size == 1)) {
19041  PyObject *result, *arg0;
19042  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
19043  arg0 = PyTuple_GET_ITEM(arg, 0);
19044  #else
19045  arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
19046  #endif
19047  result = (*meth)(self, arg0);
19048  #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
19049  Py_DECREF(arg0);
19050  #endif
19051  return result;
19052  }
19053  PyErr_Format(PyExc_TypeError,
19054  "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
19055  f->m_ml->ml_name, size);
19056  return NULL;
19057  }
19058  break;
19059  default:
19060  PyErr_SetString(PyExc_SystemError, "Bad call flags in "
19061  "__Pyx_CyFunction_Call. METH_OLDARGS is no "
19062  "longer supported!");
19063  return NULL;
19064  }
19065  PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
19066  f->m_ml->ml_name);
19067  return NULL;
19068 }
19069 static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
19070  return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
19071 }
19072 static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
19073  PyObject *result;
19074  __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
19075  if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
19076  Py_ssize_t argc;
19077  PyObject *new_args;
19078  PyObject *self;
19079  argc = PyTuple_GET_SIZE(args);
19080  new_args = PyTuple_GetSlice(args, 1, argc);
19081  if (unlikely(!new_args))
19082  return NULL;
19083  self = PyTuple_GetItem(args, 0);
19084  if (unlikely(!self)) {
19085  Py_DECREF(new_args);
19086  return NULL;
19087  }
19088  result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
19089  Py_DECREF(new_args);
19090  } else {
19091  result = __Pyx_CyFunction_Call(func, args, kw);
19092  }
19093  return result;
19094 }
19095 static PyTypeObject __pyx_CyFunctionType_type = {
19096  PyVarObject_HEAD_INIT(0, 0)
19097  "cython_function_or_method",
19098  sizeof(__pyx_CyFunctionObject),
19099  0,
19100  (destructor) __Pyx_CyFunction_dealloc,
19101  0,
19102  0,
19103  0,
19104 #if PY_MAJOR_VERSION < 3
19105  0,
19106 #else
19107  0,
19108 #endif
19109  (reprfunc) __Pyx_CyFunction_repr,
19110  0,
19111  0,
19112  0,
19113  0,
19114  __Pyx_CyFunction_CallAsMethod,
19115  0,
19116  0,
19117  0,
19118  0,
19119  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
19120  0,
19121  (traverseproc) __Pyx_CyFunction_traverse,
19122  (inquiry) __Pyx_CyFunction_clear,
19123  0,
19124 #if PY_VERSION_HEX < 0x030500A0
19125  offsetof(__pyx_CyFunctionObject, func_weakreflist),
19126 #else
19127  offsetof(PyCFunctionObject, m_weakreflist),
19128 #endif
19129  0,
19130  0,
19131  __pyx_CyFunction_methods,
19132  __pyx_CyFunction_members,
19133  __pyx_CyFunction_getsets,
19134  0,
19135  0,
19136  __Pyx_CyFunction_descr_get,
19137  0,
19138  offsetof(__pyx_CyFunctionObject, func_dict),
19139  0,
19140  0,
19141  0,
19142  0,
19143  0,
19144  0,
19145  0,
19146  0,
19147  0,
19148  0,
19149  0,
19150  0,
19151 #if PY_VERSION_HEX >= 0x030400a1
19152  0,
19153 #endif
19154 #if PY_VERSION_HEX >= 0x030800b1
19155  0,
19156 #endif
19157 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
19158  0,
19159 #endif
19160 };
19161 static int __pyx_CyFunction_init(void) {
19162  __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
19163  if (unlikely(__pyx_CyFunctionType == NULL)) {
19164  return -1;
19165  }
19166  return 0;
19167 }
19168 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
19169  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
19170  m->defaults = PyObject_Malloc(size);
19171  if (unlikely(!m->defaults))
19172  return PyErr_NoMemory();
19173  memset(m->defaults, 0, size);
19174  m->defaults_pyobjects = pyobjects;
19175  m->defaults_size = size;
19176  return m->defaults;
19177 }
19178 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
19179  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
19180  m->defaults_tuple = tuple;
19181  Py_INCREF(tuple);
19182 }
19183 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
19184  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
19185  m->defaults_kwdict = dict;
19186  Py_INCREF(dict);
19187 }
19188 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
19189  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
19190  m->func_annotations = dict;
19191  Py_INCREF(dict);
19192 }
19193 
19194 /* CythonFunction */
19195  static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
19196  PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
19197  PyObject *op = __Pyx_CyFunction_Init(
19198  PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
19199  ml, flags, qualname, closure, module, globals, code
19200  );
19201  if (likely(op)) {
19202  PyObject_GC_Track(op);
19203  }
19204  return op;
19205 }
19206 
19207 /* Py3ClassCreate */
19208  static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
19209  PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
19210  PyObject *ns;
19211  if (metaclass) {
19212  PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
19213  if (prep) {
19214  PyObject *pargs = PyTuple_Pack(2, name, bases);
19215  if (unlikely(!pargs)) {
19216  Py_DECREF(prep);
19217  return NULL;
19218  }
19219  ns = PyObject_Call(prep, pargs, mkw);
19220  Py_DECREF(prep);
19221  Py_DECREF(pargs);
19222  } else {
19223  if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
19224  return NULL;
19225  PyErr_Clear();
19226  ns = PyDict_New();
19227  }
19228  } else {
19229  ns = PyDict_New();
19230  }
19231  if (unlikely(!ns))
19232  return NULL;
19233  if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
19234  if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
19235  if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
19236  return ns;
19237 bad:
19238  Py_DECREF(ns);
19239  return NULL;
19240 }
19241 static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
19242  PyObject *dict, PyObject *mkw,
19243  int calculate_metaclass, int allow_py2_metaclass) {
19244  PyObject *result, *margs;
19245  PyObject *owned_metaclass = NULL;
19246  if (allow_py2_metaclass) {
19247  owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
19248  if (owned_metaclass) {
19249  metaclass = owned_metaclass;
19250  } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
19251  PyErr_Clear();
19252  } else {
19253  return NULL;
19254  }
19255  }
19256  if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
19257  metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
19258  Py_XDECREF(owned_metaclass);
19259  if (unlikely(!metaclass))
19260  return NULL;
19261  owned_metaclass = metaclass;
19262  }
19263  margs = PyTuple_Pack(3, name, bases, dict);
19264  if (unlikely(!margs)) {
19265  result = NULL;
19266  } else {
19267  result = PyObject_Call(metaclass, margs, mkw);
19268  Py_DECREF(margs);
19269  }
19270  Py_XDECREF(owned_metaclass);
19271  return result;
19272 }
19273 
19274 /* BytesEquals */
19275  static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
19276 #if CYTHON_COMPILING_IN_PYPY
19277  return PyObject_RichCompareBool(s1, s2, equals);
19278 #else
19279  if (s1 == s2) {
19280  return (equals == Py_EQ);
19281  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
19282  const char *ps1, *ps2;
19283  Py_ssize_t length = PyBytes_GET_SIZE(s1);
19284  if (length != PyBytes_GET_SIZE(s2))
19285  return (equals == Py_NE);
19286  ps1 = PyBytes_AS_STRING(s1);
19287  ps2 = PyBytes_AS_STRING(s2);
19288  if (ps1[0] != ps2[0]) {
19289  return (equals == Py_NE);
19290  } else if (length == 1) {
19291  return (equals == Py_EQ);
19292  } else {
19293  int result;
19294 #if CYTHON_USE_UNICODE_INTERNALS
19295  Py_hash_t hash1, hash2;
19296  hash1 = ((PyBytesObject*)s1)->ob_shash;
19297  hash2 = ((PyBytesObject*)s2)->ob_shash;
19298  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
19299  return (equals == Py_NE);
19300  }
19301 #endif
19302  result = memcmp(ps1, ps2, (size_t)length);
19303  return (equals == Py_EQ) ? (result == 0) : (result != 0);
19304  }
19305  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
19306  return (equals == Py_NE);
19307  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
19308  return (equals == Py_NE);
19309  } else {
19310  int result;
19311  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
19312  if (!py_result)
19313  return -1;
19314  result = __Pyx_PyObject_IsTrue(py_result);
19315  Py_DECREF(py_result);
19316  return result;
19317  }
19318 #endif
19319 }
19320 
19321 /* UnicodeEquals */
19322  static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
19323 #if CYTHON_COMPILING_IN_PYPY
19324  return PyObject_RichCompareBool(s1, s2, equals);
19325 #else
19326 #if PY_MAJOR_VERSION < 3
19327  PyObject* owned_ref = NULL;
19328 #endif
19329  int s1_is_unicode, s2_is_unicode;
19330  if (s1 == s2) {
19331  goto return_eq;
19332  }
19333  s1_is_unicode = PyUnicode_CheckExact(s1);
19334  s2_is_unicode = PyUnicode_CheckExact(s2);
19335 #if PY_MAJOR_VERSION < 3
19336  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
19337  owned_ref = PyUnicode_FromObject(s2);
19338  if (unlikely(!owned_ref))
19339  return -1;
19340  s2 = owned_ref;
19341  s2_is_unicode = 1;
19342  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
19343  owned_ref = PyUnicode_FromObject(s1);
19344  if (unlikely(!owned_ref))
19345  return -1;
19346  s1 = owned_ref;
19347  s1_is_unicode = 1;
19348  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
19349  return __Pyx_PyBytes_Equals(s1, s2, equals);
19350  }
19351 #endif
19352  if (s1_is_unicode & s2_is_unicode) {
19353  Py_ssize_t length;
19354  int kind;
19355  void *data1, *data2;
19356  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
19357  return -1;
19358  length = __Pyx_PyUnicode_GET_LENGTH(s1);
19359  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
19360  goto return_ne;
19361  }
19362 #if CYTHON_USE_UNICODE_INTERNALS
19363  {
19364  Py_hash_t hash1, hash2;
19365  #if CYTHON_PEP393_ENABLED
19366  hash1 = ((PyASCIIObject*)s1)->hash;
19367  hash2 = ((PyASCIIObject*)s2)->hash;
19368  #else
19369  hash1 = ((PyUnicodeObject*)s1)->hash;
19370  hash2 = ((PyUnicodeObject*)s2)->hash;
19371  #endif
19372  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
19373  goto return_ne;
19374  }
19375  }
19376 #endif
19377  kind = __Pyx_PyUnicode_KIND(s1);
19378  if (kind != __Pyx_PyUnicode_KIND(s2)) {
19379  goto return_ne;
19380  }
19381  data1 = __Pyx_PyUnicode_DATA(s1);
19382  data2 = __Pyx_PyUnicode_DATA(s2);
19383  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
19384  goto return_ne;
19385  } else if (length == 1) {
19386  goto return_eq;
19387  } else {
19388  int result = memcmp(data1, data2, (size_t)(length * kind));
19389  #if PY_MAJOR_VERSION < 3
19390  Py_XDECREF(owned_ref);
19391  #endif
19392  return (equals == Py_EQ) ? (result == 0) : (result != 0);
19393  }
19394  } else if ((s1 == Py_None) & s2_is_unicode) {
19395  goto return_ne;
19396  } else if ((s2 == Py_None) & s1_is_unicode) {
19397  goto return_ne;
19398  } else {
19399  int result;
19400  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
19401  #if PY_MAJOR_VERSION < 3
19402  Py_XDECREF(owned_ref);
19403  #endif
19404  if (!py_result)
19405  return -1;
19406  result = __Pyx_PyObject_IsTrue(py_result);
19407  Py_DECREF(py_result);
19408  return result;
19409  }
19410 return_eq:
19411  #if PY_MAJOR_VERSION < 3
19412  Py_XDECREF(owned_ref);
19413  #endif
19414  return (equals == Py_EQ);
19415 return_ne:
19416  #if PY_MAJOR_VERSION < 3
19417  Py_XDECREF(owned_ref);
19418  #endif
19419  return (equals == Py_NE);
19420 #endif
19421 }
19422 
19423 /* CLineInTraceback */
19424  #ifndef CYTHON_CLINE_IN_TRACEBACK
19425 static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
19426  PyObject *use_cline;
19427  PyObject *ptype, *pvalue, *ptraceback;
19428 #if CYTHON_COMPILING_IN_CPYTHON
19429  PyObject **cython_runtime_dict;
19430 #endif
19431  if (unlikely(!__pyx_cython_runtime)) {
19432  return c_line;
19433  }
19434  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
19435 #if CYTHON_COMPILING_IN_CPYTHON
19436  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
19437  if (likely(cython_runtime_dict)) {
19438  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
19439  use_cline, *cython_runtime_dict,
19440  __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
19441  } else
19442 #endif
19443  {
19444  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
19445  if (use_cline_obj) {
19446  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
19447  Py_DECREF(use_cline_obj);
19448  } else {
19449  PyErr_Clear();
19450  use_cline = NULL;
19451  }
19452  }
19453  if (!use_cline) {
19454  c_line = 0;
19455  PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
19456  }
19457  else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
19458  c_line = 0;
19459  }
19460  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
19461  return c_line;
19462 }
19463 #endif
19464 
19465 /* CodeObjectCache */
19466  static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
19467  int start = 0, mid = 0, end = count - 1;
19468  if (end >= 0 && code_line > entries[end].code_line) {
19469  return count;
19470  }
19471  while (start < end) {
19472  mid = start + (end - start) / 2;
19473  if (code_line < entries[mid].code_line) {
19474  end = mid;
19475  } else if (code_line > entries[mid].code_line) {
19476  start = mid + 1;
19477  } else {
19478  return mid;
19479  }
19480  }
19481  if (code_line <= entries[mid].code_line) {
19482  return mid;
19483  } else {
19484  return mid + 1;
19485  }
19486 }
19487 static PyCodeObject *__pyx_find_code_object(int code_line) {
19488  PyCodeObject* code_object;
19489  int pos;
19490  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
19491  return NULL;
19492  }
19493  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
19494  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
19495  return NULL;
19496  }
19497  code_object = __pyx_code_cache.entries[pos].code_object;
19498  Py_INCREF(code_object);
19499  return code_object;
19500 }
19501 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
19502  int pos, i;
19503  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
19504  if (unlikely(!code_line)) {
19505  return;
19506  }
19507  if (unlikely(!entries)) {
19508  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
19509  if (likely(entries)) {
19510  __pyx_code_cache.entries = entries;
19511  __pyx_code_cache.max_count = 64;
19512  __pyx_code_cache.count = 1;
19513  entries[0].code_line = code_line;
19514  entries[0].code_object = code_object;
19515  Py_INCREF(code_object);
19516  }
19517  return;
19518  }
19519  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
19520  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
19521  PyCodeObject* tmp = entries[pos].code_object;
19522  entries[pos].code_object = code_object;
19523  Py_DECREF(tmp);
19524  return;
19525  }
19526  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
19527  int new_max = __pyx_code_cache.max_count + 64;
19528  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
19529  __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
19530  if (unlikely(!entries)) {
19531  return;
19532  }
19533  __pyx_code_cache.entries = entries;
19534  __pyx_code_cache.max_count = new_max;
19535  }
19536  for (i=__pyx_code_cache.count; i>pos; i--) {
19537  entries[i] = entries[i-1];
19538  }
19539  entries[pos].code_line = code_line;
19540  entries[pos].code_object = code_object;
19541  __pyx_code_cache.count++;
19542  Py_INCREF(code_object);
19543 }
19544 
19545 /* AddTraceback */
19546  #include "compile.h"
19547 #include "frameobject.h"
19548 #include "traceback.h"
19549 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
19550  const char *funcname, int c_line,
19551  int py_line, const char *filename) {
19552  PyCodeObject *py_code = 0;
19553  PyObject *py_srcfile = 0;
19554  PyObject *py_funcname = 0;
19555  #if PY_MAJOR_VERSION < 3
19556  py_srcfile = PyString_FromString(filename);
19557  #else
19558  py_srcfile = PyUnicode_FromString(filename);
19559  #endif
19560  if (!py_srcfile) goto bad;
19561  if (c_line) {
19562  #if PY_MAJOR_VERSION < 3
19563  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
19564  #else
19565  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
19566  #endif
19567  }
19568  else {
19569  #if PY_MAJOR_VERSION < 3
19570  py_funcname = PyString_FromString(funcname);
19571  #else
19572  py_funcname = PyUnicode_FromString(funcname);
19573  #endif
19574  }
19575  if (!py_funcname) goto bad;
19576  py_code = __Pyx_PyCode_New(
19577  0,
19578  0,
19579  0,
19580  0,
19581  0,
19582  __pyx_empty_bytes, /*PyObject *code,*/
19583  __pyx_empty_tuple, /*PyObject *consts,*/
19584  __pyx_empty_tuple, /*PyObject *names,*/
19585  __pyx_empty_tuple, /*PyObject *varnames,*/
19586  __pyx_empty_tuple, /*PyObject *freevars,*/
19587  __pyx_empty_tuple, /*PyObject *cellvars,*/
19588  py_srcfile, /*PyObject *filename,*/
19589  py_funcname, /*PyObject *name,*/
19590  py_line,
19591  __pyx_empty_bytes /*PyObject *lnotab*/
19592  );
19593  Py_DECREF(py_srcfile);
19594  Py_DECREF(py_funcname);
19595  return py_code;
19596 bad:
19597  Py_XDECREF(py_srcfile);
19598  Py_XDECREF(py_funcname);
19599  return NULL;
19600 }
19601 static void __Pyx_AddTraceback(const char *funcname, int c_line,
19602  int py_line, const char *filename) {
19603  PyCodeObject *py_code = 0;
19604  PyFrameObject *py_frame = 0;
19605  PyThreadState *tstate = __Pyx_PyThreadState_Current;
19606  if (c_line) {
19607  c_line = __Pyx_CLineForTraceback(tstate, c_line);
19608  }
19609  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
19610  if (!py_code) {
19611  py_code = __Pyx_CreateCodeObjectForTraceback(
19612  funcname, c_line, py_line, filename);
19613  if (!py_code) goto bad;
19614  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
19615  }
19616  py_frame = PyFrame_New(
19617  tstate, /*PyThreadState *tstate,*/
19618  py_code, /*PyCodeObject *code,*/
19619  __pyx_d, /*PyObject *globals,*/
19620  0 /*PyObject *locals*/
19621  );
19622  if (!py_frame) goto bad;
19623  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
19624  PyTraceBack_Here(py_frame);
19625 bad:
19626  Py_XDECREF(py_code);
19627  Py_XDECREF(py_frame);
19628 }
19629 
19630 /* CIntToPy */
19631  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
19632  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
19633  const int is_unsigned = neg_one > const_zero;
19634  if (is_unsigned) {
19635  if (sizeof(long) < sizeof(long)) {
19636  return PyInt_FromLong((long) value);
19637  } else if (sizeof(long) <= sizeof(unsigned long)) {
19638  return PyLong_FromUnsignedLong((unsigned long) value);
19639 #ifdef HAVE_LONG_LONG
19640  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
19641  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
19642 #endif
19643  }
19644  } else {
19645  if (sizeof(long) <= sizeof(long)) {
19646  return PyInt_FromLong((long) value);
19647 #ifdef HAVE_LONG_LONG
19648  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
19649  return PyLong_FromLongLong((PY_LONG_LONG) value);
19650 #endif
19651  }
19652  }
19653  {
19654  int one = 1; int little = (int)*(unsigned char *)&one;
19655  unsigned char *bytes = (unsigned char *)&value;
19656  return _PyLong_FromByteArray(bytes, sizeof(long),
19657  little, !is_unsigned);
19658  }
19659 }
19660 
19661 /* CIntFromPyVerify */
19662  #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
19663  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
19664 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
19665  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
19666 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
19667  {\
19668  func_type value = func_value;\
19669  if (sizeof(target_type) < sizeof(func_type)) {\
19670  if (unlikely(value != (func_type) (target_type) value)) {\
19671  func_type zero = 0;\
19672  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
19673  return (target_type) -1;\
19674  if (is_unsigned && unlikely(value < zero))\
19675  goto raise_neg_overflow;\
19676  else\
19677  goto raise_overflow;\
19678  }\
19679  }\
19680  return (target_type) value;\
19681  }
19682 
19683 /* CIntFromPy */
19684  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
19685  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
19686  const int is_unsigned = neg_one > const_zero;
19687 #if PY_MAJOR_VERSION < 3
19688  if (likely(PyInt_Check(x))) {
19689  if (sizeof(long) < sizeof(long)) {
19690  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
19691  } else {
19692  long val = PyInt_AS_LONG(x);
19693  if (is_unsigned && unlikely(val < 0)) {
19694  goto raise_neg_overflow;
19695  }
19696  return (long) val;
19697  }
19698  } else
19699 #endif
19700  if (likely(PyLong_Check(x))) {
19701  if (is_unsigned) {
19702 #if CYTHON_USE_PYLONG_INTERNALS
19703  const digit* digits = ((PyLongObject*)x)->ob_digit;
19704  switch (Py_SIZE(x)) {
19705  case 0: return (long) 0;
19706  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
19707  case 2:
19708  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
19709  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
19710  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
19711  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
19712  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
19713  }
19714  }
19715  break;
19716  case 3:
19717  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
19718  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
19719  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
19720  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
19721  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
19722  }
19723  }
19724  break;
19725  case 4:
19726  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
19727  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
19728  __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])))
19729  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
19730  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
19731  }
19732  }
19733  break;
19734  }
19735 #endif
19736 #if CYTHON_COMPILING_IN_CPYTHON
19737  if (unlikely(Py_SIZE(x) < 0)) {
19738  goto raise_neg_overflow;
19739  }
19740 #else
19741  {
19742  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
19743  if (unlikely(result < 0))
19744  return (long) -1;
19745  if (unlikely(result == 1))
19746  goto raise_neg_overflow;
19747  }
19748 #endif
19749  if (sizeof(long) <= sizeof(unsigned long)) {
19750  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
19751 #ifdef HAVE_LONG_LONG
19752  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
19753  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
19754 #endif
19755  }
19756  } else {
19757 #if CYTHON_USE_PYLONG_INTERNALS
19758  const digit* digits = ((PyLongObject*)x)->ob_digit;
19759  switch (Py_SIZE(x)) {
19760  case 0: return (long) 0;
19761  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
19762  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
19763  case -2:
19764  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
19765  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
19766  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
19767  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
19768  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
19769  }
19770  }
19771  break;
19772  case 2:
19773  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
19774  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
19775  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
19776  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
19777  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
19778  }
19779  }
19780  break;
19781  case -3:
19782  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
19783  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
19784  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
19785  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
19786  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
19787  }
19788  }
19789  break;
19790  case 3:
19791  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
19792  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
19793  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
19794  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
19795  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
19796  }
19797  }
19798  break;
19799  case -4:
19800  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
19801  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
19802  __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])))
19803  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
19804  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
19805  }
19806  }
19807  break;
19808  case 4:
19809  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
19810  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
19811  __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])))
19812  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
19813  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
19814  }
19815  }
19816  break;
19817  }
19818 #endif
19819  if (sizeof(long) <= sizeof(long)) {
19820  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
19821 #ifdef HAVE_LONG_LONG
19822  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
19823  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
19824 #endif
19825  }
19826  }
19827  {
19828 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
19829  PyErr_SetString(PyExc_RuntimeError,
19830  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
19831 #else
19832  long val;
19833  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
19834  #if PY_MAJOR_VERSION < 3
19835  if (likely(v) && !PyLong_Check(v)) {
19836  PyObject *tmp = v;
19837  v = PyNumber_Long(tmp);
19838  Py_DECREF(tmp);
19839  }
19840  #endif
19841  if (likely(v)) {
19842  int one = 1; int is_little = (int)*(unsigned char *)&one;
19843  unsigned char *bytes = (unsigned char *)&val;
19844  int ret = _PyLong_AsByteArray((PyLongObject *)v,
19845  bytes, sizeof(val),
19846  is_little, !is_unsigned);
19847  Py_DECREF(v);
19848  if (likely(!ret))
19849  return val;
19850  }
19851 #endif
19852  return (long) -1;
19853  }
19854  } else {
19855  long val;
19856  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
19857  if (!tmp) return (long) -1;
19858  val = __Pyx_PyInt_As_long(tmp);
19859  Py_DECREF(tmp);
19860  return val;
19861  }
19862 raise_overflow:
19863  PyErr_SetString(PyExc_OverflowError,
19864  "value too large to convert to long");
19865  return (long) -1;
19866 raise_neg_overflow:
19867  PyErr_SetString(PyExc_OverflowError,
19868  "can't convert negative value to long");
19869  return (long) -1;
19870 }
19871 
19872 /* CIntFromPy */
19873  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
19874  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
19875  const int is_unsigned = neg_one > const_zero;
19876 #if PY_MAJOR_VERSION < 3
19877  if (likely(PyInt_Check(x))) {
19878  if (sizeof(int) < sizeof(long)) {
19879  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
19880  } else {
19881  long val = PyInt_AS_LONG(x);
19882  if (is_unsigned && unlikely(val < 0)) {
19883  goto raise_neg_overflow;
19884  }
19885  return (int) val;
19886  }
19887  } else
19888 #endif
19889  if (likely(PyLong_Check(x))) {
19890  if (is_unsigned) {
19891 #if CYTHON_USE_PYLONG_INTERNALS
19892  const digit* digits = ((PyLongObject*)x)->ob_digit;
19893  switch (Py_SIZE(x)) {
19894  case 0: return (int) 0;
19895  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
19896  case 2:
19897  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
19898  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
19899  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
19900  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
19901  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
19902  }
19903  }
19904  break;
19905  case 3:
19906  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
19907  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
19908  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
19909  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
19910  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
19911  }
19912  }
19913  break;
19914  case 4:
19915  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
19916  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
19917  __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])))
19918  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
19919  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
19920  }
19921  }
19922  break;
19923  }
19924 #endif
19925 #if CYTHON_COMPILING_IN_CPYTHON
19926  if (unlikely(Py_SIZE(x) < 0)) {
19927  goto raise_neg_overflow;
19928  }
19929 #else
19930  {
19931  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
19932  if (unlikely(result < 0))
19933  return (int) -1;
19934  if (unlikely(result == 1))
19935  goto raise_neg_overflow;
19936  }
19937 #endif
19938  if (sizeof(int) <= sizeof(unsigned long)) {
19939  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
19940 #ifdef HAVE_LONG_LONG
19941  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
19942  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
19943 #endif
19944  }
19945  } else {
19946 #if CYTHON_USE_PYLONG_INTERNALS
19947  const digit* digits = ((PyLongObject*)x)->ob_digit;
19948  switch (Py_SIZE(x)) {
19949  case 0: return (int) 0;
19950  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
19951  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
19952  case -2:
19953  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
19954  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
19955  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
19956  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
19957  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
19958  }
19959  }
19960  break;
19961  case 2:
19962  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
19963  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
19964  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
19965  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
19966  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
19967  }
19968  }
19969  break;
19970  case -3:
19971  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
19972  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
19973  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
19974  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
19975  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
19976  }
19977  }
19978  break;
19979  case 3:
19980  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
19981  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
19982  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
19983  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
19984  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
19985  }
19986  }
19987  break;
19988  case -4:
19989  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
19990  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
19991  __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])))
19992  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
19993  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
19994  }
19995  }
19996  break;
19997  case 4:
19998  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
19999  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
20000  __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])))
20001  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
20002  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
20003  }
20004  }
20005  break;
20006  }
20007 #endif
20008  if (sizeof(int) <= sizeof(long)) {
20009  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
20010 #ifdef HAVE_LONG_LONG
20011  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
20012  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
20013 #endif
20014  }
20015  }
20016  {
20017 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
20018  PyErr_SetString(PyExc_RuntimeError,
20019  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
20020 #else
20021  int val;
20022  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
20023  #if PY_MAJOR_VERSION < 3
20024  if (likely(v) && !PyLong_Check(v)) {
20025  PyObject *tmp = v;
20026  v = PyNumber_Long(tmp);
20027  Py_DECREF(tmp);
20028  }
20029  #endif
20030  if (likely(v)) {
20031  int one = 1; int is_little = (int)*(unsigned char *)&one;
20032  unsigned char *bytes = (unsigned char *)&val;
20033  int ret = _PyLong_AsByteArray((PyLongObject *)v,
20034  bytes, sizeof(val),
20035  is_little, !is_unsigned);
20036  Py_DECREF(v);
20037  if (likely(!ret))
20038  return val;
20039  }
20040 #endif
20041  return (int) -1;
20042  }
20043  } else {
20044  int val;
20045  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
20046  if (!tmp) return (int) -1;
20047  val = __Pyx_PyInt_As_int(tmp);
20048  Py_DECREF(tmp);
20049  return val;
20050  }
20051 raise_overflow:
20052  PyErr_SetString(PyExc_OverflowError,
20053  "value too large to convert to int");
20054  return (int) -1;
20055 raise_neg_overflow:
20056  PyErr_SetString(PyExc_OverflowError,
20057  "can't convert negative value to int");
20058  return (int) -1;
20059 }
20060 
20061 /* FastTypeChecks */
20062  #if CYTHON_COMPILING_IN_CPYTHON
20063 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
20064  while (a) {
20065  a = a->tp_base;
20066  if (a == b)
20067  return 1;
20068  }
20069  return b == &PyBaseObject_Type;
20070 }
20071 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
20072  PyObject *mro;
20073  if (a == b) return 1;
20074  mro = a->tp_mro;
20075  if (likely(mro)) {
20076  Py_ssize_t i, n;
20077  n = PyTuple_GET_SIZE(mro);
20078  for (i = 0; i < n; i++) {
20079  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
20080  return 1;
20081  }
20082  return 0;
20083  }
20084  return __Pyx_InBases(a, b);
20085 }
20086 #if PY_MAJOR_VERSION == 2
20087 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
20088  PyObject *exception, *value, *tb;
20089  int res;
20090  __Pyx_PyThreadState_declare
20091  __Pyx_PyThreadState_assign
20092  __Pyx_ErrFetch(&exception, &value, &tb);
20093  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
20094  if (unlikely(res == -1)) {
20095  PyErr_WriteUnraisable(err);
20096  res = 0;
20097  }
20098  if (!res) {
20099  res = PyObject_IsSubclass(err, exc_type2);
20100  if (unlikely(res == -1)) {
20101  PyErr_WriteUnraisable(err);
20102  res = 0;
20103  }
20104  }
20105  __Pyx_ErrRestore(exception, value, tb);
20106  return res;
20107 }
20108 #else
20109 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
20110  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
20111  if (!res) {
20112  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
20113  }
20114  return res;
20115 }
20116 #endif
20117 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
20118  Py_ssize_t i, n;
20119  assert(PyExceptionClass_Check(exc_type));
20120  n = PyTuple_GET_SIZE(tuple);
20121 #if PY_MAJOR_VERSION >= 3
20122  for (i=0; i<n; i++) {
20123  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
20124  }
20125 #endif
20126  for (i=0; i<n; i++) {
20127  PyObject *t = PyTuple_GET_ITEM(tuple, i);
20128  #if PY_MAJOR_VERSION < 3
20129  if (likely(exc_type == t)) return 1;
20130  #endif
20131  if (likely(PyExceptionClass_Check(t))) {
20132  if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
20133  } else {
20134  }
20135  }
20136  return 0;
20137 }
20138 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
20139  if (likely(err == exc_type)) return 1;
20140  if (likely(PyExceptionClass_Check(err))) {
20141  if (likely(PyExceptionClass_Check(exc_type))) {
20142  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
20143  } else if (likely(PyTuple_Check(exc_type))) {
20144  return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
20145  } else {
20146  }
20147  }
20148  return PyErr_GivenExceptionMatches(err, exc_type);
20149 }
20150 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
20151  assert(PyExceptionClass_Check(exc_type1));
20152  assert(PyExceptionClass_Check(exc_type2));
20153  if (likely(err == exc_type1 || err == exc_type2)) return 1;
20154  if (likely(PyExceptionClass_Check(err))) {
20155  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
20156  }
20157  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
20158 }
20159 #endif
20160 
20161 /* CStringEquals */
20162  static CYTHON_INLINE int __Pyx_StrEq(const char *s1, const char *s2) {
20163  while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
20164  return *s1 == *s2;
20165 }
20166 
20167 /* CheckBinaryVersion */
20168  static int __Pyx_check_binary_version(void) {
20169  char ctversion[4], rtversion[4];
20170  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
20171  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
20172  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
20173  char message[200];
20174  PyOS_snprintf(message, sizeof(message),
20175  "compiletime version %s of module '%.100s' "
20176  "does not match runtime version %s",
20177  ctversion, __Pyx_MODULE_NAME, rtversion);
20178  return PyErr_WarnEx(NULL, message, 1);
20179  }
20180  return 0;
20181 }
20182 
20183 /* InitStrings */
20184  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
20185  while (t->p) {
20186  #if PY_MAJOR_VERSION < 3
20187  if (t->is_unicode) {
20188  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
20189  } else if (t->intern) {
20190  *t->p = PyString_InternFromString(t->s);
20191  } else {
20192  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
20193  }
20194  #else
20195  if (t->is_unicode | t->is_str) {
20196  if (t->intern) {
20197  *t->p = PyUnicode_InternFromString(t->s);
20198  } else if (t->encoding) {
20199  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
20200  } else {
20201  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
20202  }
20203  } else {
20204  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
20205  }
20206  #endif
20207  if (!*t->p)
20208  return -1;
20209  if (PyObject_Hash(*t->p) == -1)
20210  return -1;
20211  ++t;
20212  }
20213  return 0;
20214 }
20215 
20216 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
20217  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
20218 }
20219 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
20220  Py_ssize_t ignore;
20221  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
20222 }
20223 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
20224 #if !CYTHON_PEP393_ENABLED
20225 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
20226  char* defenc_c;
20227  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
20228  if (!defenc) return NULL;
20229  defenc_c = PyBytes_AS_STRING(defenc);
20230 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
20231  {
20232  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
20233  char* c;
20234  for (c = defenc_c; c < end; c++) {
20235  if ((unsigned char) (*c) >= 128) {
20236  PyUnicode_AsASCIIString(o);
20237  return NULL;
20238  }
20239  }
20240  }
20241 #endif
20242  *length = PyBytes_GET_SIZE(defenc);
20243  return defenc_c;
20244 }
20245 #else
20246 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
20247  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
20248 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
20249  if (likely(PyUnicode_IS_ASCII(o))) {
20250  *length = PyUnicode_GET_LENGTH(o);
20251  return PyUnicode_AsUTF8(o);
20252  } else {
20253  PyUnicode_AsASCIIString(o);
20254  return NULL;
20255  }
20256 #else
20257  return PyUnicode_AsUTF8AndSize(o, length);
20258 #endif
20259 }
20260 #endif
20261 #endif
20262 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
20263 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
20264  if (
20265 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
20266  __Pyx_sys_getdefaultencoding_not_ascii &&
20267 #endif
20268  PyUnicode_Check(o)) {
20269  return __Pyx_PyUnicode_AsStringAndSize(o, length);
20270  } else
20271 #endif
20272 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
20273  if (PyByteArray_Check(o)) {
20274  *length = PyByteArray_GET_SIZE(o);
20275  return PyByteArray_AS_STRING(o);
20276  } else
20277 #endif
20278  {
20279  char* result;
20280  int r = PyBytes_AsStringAndSize(o, &result, length);
20281  if (unlikely(r < 0)) {
20282  return NULL;
20283  } else {
20284  return result;
20285  }
20286  }
20287 }
20288 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
20289  int is_true = x == Py_True;
20290  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
20291  else return PyObject_IsTrue(x);
20292 }
20293 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
20294  int retval;
20295  if (unlikely(!x)) return -1;
20296  retval = __Pyx_PyObject_IsTrue(x);
20297  Py_DECREF(x);
20298  return retval;
20299 }
20300 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
20301 #if PY_MAJOR_VERSION >= 3
20302  if (PyLong_Check(result)) {
20303  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
20304  "__int__ returned non-int (type %.200s). "
20305  "The ability to return an instance of a strict subclass of int "
20306  "is deprecated, and may be removed in a future version of Python.",
20307  Py_TYPE(result)->tp_name)) {
20308  Py_DECREF(result);
20309  return NULL;
20310  }
20311  return result;
20312  }
20313 #endif
20314  PyErr_Format(PyExc_TypeError,
20315  "__%.4s__ returned non-%.4s (type %.200s)",
20316  type_name, type_name, Py_TYPE(result)->tp_name);
20317  Py_DECREF(result);
20318  return NULL;
20319 }
20320 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
20321 #if CYTHON_USE_TYPE_SLOTS
20322  PyNumberMethods *m;
20323 #endif
20324  const char *name = NULL;
20325  PyObject *res = NULL;
20326 #if PY_MAJOR_VERSION < 3
20327  if (likely(PyInt_Check(x) || PyLong_Check(x)))
20328 #else
20329  if (likely(PyLong_Check(x)))
20330 #endif
20331  return __Pyx_NewRef(x);
20332 #if CYTHON_USE_TYPE_SLOTS
20333  m = Py_TYPE(x)->tp_as_number;
20334  #if PY_MAJOR_VERSION < 3
20335  if (m && m->nb_int) {
20336  name = "int";
20337  res = m->nb_int(x);
20338  }
20339  else if (m && m->nb_long) {
20340  name = "long";
20341  res = m->nb_long(x);
20342  }
20343  #else
20344  if (likely(m && m->nb_int)) {
20345  name = "int";
20346  res = m->nb_int(x);
20347  }
20348  #endif
20349 #else
20350  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
20351  res = PyNumber_Int(x);
20352  }
20353 #endif
20354  if (likely(res)) {
20355 #if PY_MAJOR_VERSION < 3
20356  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
20357 #else
20358  if (unlikely(!PyLong_CheckExact(res))) {
20359 #endif
20360  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
20361  }
20362  }
20363  else if (!PyErr_Occurred()) {
20364  PyErr_SetString(PyExc_TypeError,
20365  "an integer is required");
20366  }
20367  return res;
20368 }
20369 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
20370  Py_ssize_t ival;
20371  PyObject *x;
20372 #if PY_MAJOR_VERSION < 3
20373  if (likely(PyInt_CheckExact(b))) {
20374  if (sizeof(Py_ssize_t) >= sizeof(long))
20375  return PyInt_AS_LONG(b);
20376  else
20377  return PyInt_AsSsize_t(b);
20378  }
20379 #endif
20380  if (likely(PyLong_CheckExact(b))) {
20381  #if CYTHON_USE_PYLONG_INTERNALS
20382  const digit* digits = ((PyLongObject*)b)->ob_digit;
20383  const Py_ssize_t size = Py_SIZE(b);
20384  if (likely(__Pyx_sst_abs(size) <= 1)) {
20385  ival = likely(size) ? digits[0] : 0;
20386  if (size == -1) ival = -ival;
20387  return ival;
20388  } else {
20389  switch (size) {
20390  case 2:
20391  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
20392  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
20393  }
20394  break;
20395  case -2:
20396  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
20397  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
20398  }
20399  break;
20400  case 3:
20401  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
20402  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
20403  }
20404  break;
20405  case -3:
20406  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
20407  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
20408  }
20409  break;
20410  case 4:
20411  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
20412  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]));
20413  }
20414  break;
20415  case -4:
20416  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
20417  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]));
20418  }
20419  break;
20420  }
20421  }
20422  #endif
20423  return PyLong_AsSsize_t(b);
20424  }
20425  x = PyNumber_Index(b);
20426  if (!x) return -1;
20427  ival = PyInt_AsSsize_t(x);
20428  Py_DECREF(x);
20429  return ival;
20430 }
20431 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
20432  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
20433 }
20434 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
20435  return PyInt_FromSize_t(ival);
20436 }
20437 
20438 
20439 #endif /* Py_PYTHON_H */
an array had not been initialized Several spelling and grammar corrections were which is read from the appropriate MCF the above metadata values were hard coded A problem calculating the average background DN for SWIR bands when the moon is in the space view port was corrected The new algorithm used to calculate the average background DN for all reflective bands when the moon is in the space view port is now the same as the algorithm employed by the thermal bands For non SWIR changes in the averages are typically less than Also for non SWIR the black body DNs remain a backup in case the SV DNs are not available For SWIR the changes in computed averages were larger because the old which used the black body suffered from contamination by the micron leak As a consequence of the if SV DNs are not available for the SWIR the EV pixels will not be the granule time is used to identify the appropriate tables within the set given for one LUT the first two or last two tables respectively will be used for the interpolation If there is only one LUT in the set of it will be treated as a constant LUT The manner in which Earth View data is checked for saturation was changed Previously the raw Earth View DNs and Space View DNs were checked against the lookup table values contained in the table dn_sat The change made is to check the raw Earth and Space View DNs to be sure they are less than the maximum saturation value and to check the Space View subtracted Earth View dns against a set of values contained in the new lookup table dn_sat_ev The metadata configuration and ASSOCIATEDINSTRUMENTSHORTNAME from the MOD02HKM product The same metatdata with extensions and were removed from the MOD021KM and MOD02OBC products ASSOCIATEDSENSORSHORTNAME was set to MODIS in all products These changes are reflected in new File Specification which users may consult for exact the pow functions were eliminated in Emissive_Cal and Emissive bands replaced by more efficient code Other calculations throughout the code were also made more efficient Aside from a few round off there was no difference to the product The CPU time decreased by about for a day case and for a night case A minor bug in calculating the uncertainty index for emissive bands was corrected The frame index(0-based) was previously being used the frame number(1-based) should have been used. There were only a few minor changes to the uncertainty index(maximum of 1 digit). 3. Some inefficient arrays(Sigma_RVS_norm_sq) were eliminated and some code lines in Preprocess_L1A_Data were moved into Process_OBCEng_Emiss. There were no changes to the product. Required RAM was reduced by 20 MB. Now
void interp(double *ephemPtr, int startLoc, double *inTime, int numCoefs, int numCom, int numSets, int velFlag, double *posvel)
int32 value
Definition: Granule.c:1235
int r
Definition: decode_rs.h:73
data_t t[NROOTS+1]
Definition: decode_rs.h:77
int32_t co
Definition: atrem_corl1.h:118
int j
Definition: decode_rs.h:73
===========================================================================V4.1.3 12/18/2002============================================================================Changes which do not affect scientific output:1. The R *LUT was eliminated and the equivalent formulation for R *, i.e. 1/(m1 *e_sun_over_pi), was substituted for it in the only instance of its use, which is in the calculation of the RSB uncertainty index. This reduces the size of the Reflective LUT HDF file by approximately 1/4 to 1/3. The equivalent formulation of R *differed from the new by at most 0.056% in test granules and uncertainty differences of at most 1 count(out of a range of 0-15) were found in no more than 1 in 100, 000 pixels. 2. In Preprocess.c, a small error where the trailing dropped scan counter was incremented when the leading dropped scan counter should have been was fixed. This counter is internal only and is not yet used for any purpose. 3. NEW MYD02OBC Metadata Configuration Files. MCST wishes to have the OBC files archived even when the Orbit Number is recorded as "-1". Accordingly, ECS has delivered new MCF files for OBC output having all elements in the OrbitCalculatedSpatialDomain container set to "MANDATORY=FALSE". 4. pgs_in.version is now reset to "1" in Metadata.c before the call to look up the geolocation gringpoint information.============================================================================V4.1.1 CODE SPECIFIC TO MODIS/AQUA(FM1) 10/03/2002============================================================================Two changes were made to the code which do not affect scientific output:1. A bug which caused PGE02 to fail when scans were dropped between granules was fixed.(The length of the error message generated was shortened.) 2. Messages regarding an invalid MCST LUT Version or an invalid Write High Resolution Night Mode Output value in the PCF file were added.==============================================================================V4.1.0 CODE SPECIFIC TO MODIS/AQUA(FM1)(NEVER USED IN PRODUCTION) 07/30/2002==============================================================================Changes which impact scientific output of code:1. The LUT type of the RVS corrections was changed to piecewise linear. In addition the RVS LUTs were changed from listing the RVS corrections to listing the quadratic coefficients necessary to make the RVS corrections. The coefficients are now calculated by interpolating on the granule collection time and the RVS corrections are then generated using the interpolated coefficients. Previously used Emissive and Reflective RVS LUT tables were eliminated and new ones introduced. Several changes were made to the code which should not affect scientific output. They are:1. The ADC correction algorithm and related LUTs were stripped from the code.(The ADC correction has always been set to "0" so this has no scientific impact.) 2. Some small changes to the code, chiefly to casting of variables, were added to make it LINUX-compatible. Output of code run on LINUX machines displays differences of at most 1 scaled integer(SI) from output of code run on IRIX machines. The data type of the LUT "dn_sat_ev" was changed to float64 to avoid discrepancies seen between MOD_PR02 run on LINUX systems and IRIX systems where values were flagged under one operating system but not the other. 3. Checking for non-functioning detectors, sector rotation, incalculable values of the Emissive calibration factor "b1", and incalculable values of SV or BB averages was moved outside the loop over frames in Emissive_Cal.c since none of these quantities are frame-dependent. 4. The code was altered so that if up to five scans are dropped between the leading/middle or middle/trailing granules, the leading or trailing granule will still be used in emissive calibration to form a cross-granule average. QA bits 25 and 26 are set for a gap between the leading/middle and middle/trailing granules respectively. This may in rare instances lead to a change in emissive calibration coefficients for scans at the beginning or end of a granule. 5.(MODIS/AQUA ONLY) The name of the seed(error message) file was changed from "MODIS_36100.h" to "MODIS_36110.h". 6. Metadata.c was changed so that the source of the geolocation metadata is the input geolocation file rather than the L1A granule. 7. To reduce to overall size of the reflective LUT HDF files, fill values were eliminated from all LUTs previously dimensioned "BDSM"([NUM_REFLECTIVE_BANDS] *[MAX_DETECTORS_PER_BAND] *[MAX_SAMPLES_PER_BAND] *[NUM_MIRROR_SIDES]) in the LUT HDF files. Each table piece is stored in the HDF file with dimensions NUM_REFLECTIVE_INDICES, where NUM_REFLECTIVE_INDICES=[NUM_250M_BANDS *DETECTORS_PER_250M_BAND *SAMPLES_PER_250M_BAND *NUM_MIRROR_SIDES]+[NUM_500M_BANDS *DETECTORS_PER_500M_BAND *SAMPLES_PER_500M_BAND *NUM_MIRROR_SIDES]+[NUM_1000M_BANDS *DETECTORS_PER_1KM_BAND *SAMPLES_PER_1KM_BAND *NUM_MIRROR_SIDES] with SAMPLES_PER_250M_BAND=4, SAMPLES_PER_500M_BAND=2, and SAMPLES_PER_1KM_BAND=1. Values within each table piece appear in the order listed above. The overall dimensions of time dependent BDSM LUTs are now[NUM_TIMES] *[NUM_REFLECTIVE_INDICES], where NUM_TIMES is the number of time dependent table pieces. 8. Checking for non-functioning detectors, sector rotation, incalculable values of the Emissive calibration factor "b1", and incalculable values of SV or BB averages was moved outside the loop over frames in Emissive_Cal.c since none of these quantities are frame-dependent. 9. The code was altered so that if up to five scans are dropped between the leading/middle or middle/trailing granules, the leading or trailing granule will still be used in emissive calibration to form a cross-granule average. QA bits 25 and 26 are set for a gap between the leading/middle and middle/trailing granules respectively. This may in rare instances lead to a change in emissive calibration coefficients for scans at the beginning or end of a granule. 10. The array of b1s in Preprocess.c was being initialized to -1 outside the loop over bands, which meant that if b1 could not be computed, the value of b1 from the previous band for that scan/detector combination was used. The initialization was moved inside the band loop.============================================================================V3.1.0(Original Aqua-specific code version) 02/06/2002============================================================================AQUA-Specific changes made:1. A correction to a problem with blackbody warmup on bands 33, 35, and 36 was inserted. PC Bands 33, 35, and 36 on MODIS Aqua saturate on BB warmup before 310K, which means current code will not provide correct b1 calibration coefficients when the BB temperatures are above the saturation threshold. A LUT with default b1s and band-dependent temperature thresholds will be inserted in code. If the BB temperature is over the saturation threshold for the band, the default b1 from the table is used. 2. The number of possible wavelengths in the Emissive LUT RSR file was changed to 67 in order to accommodate the Aqua RSR tables. 3. Several changes to the upper and lower bound limits on LUT values were inserted. Changes to both Aqua and Terra Code:1. A check was put into Emissive_Cal.c to see whether the value of b1 being used to calibrate a pixel is negative. If so, the pixel is flagged with the newly created flag TEB_B1_NOT_CALCULATED, value 65526, and the number of pixels for which this occurs is counted in the QA_common table. 2. The array of b1s in Preprocess.c was being initialized to -1 outside the loop over bands, which meant that if b1 could not be computed, the value of b1 from the previous band for that scan/detector combination was used. The initialization was moved inside the band loop. 3. Minor code changes were made to eliminate compiler warnings when the code is compiled in 64-bit mode. 4. Temperature equations were upgraded to be MODIS/Aqua or MODIS/Terra specific and temperature conversion coefficients for Aqua were inserted.========================================================================================================================================================ALL CHANGES BELOW ARE TO COMMON TERRA/AQUA CODE USED BEFORE 02/06/2002========================================================================================================================================================v3.0.1 11/26/2001============================================================================Several small changes to the code were made, none of which changes the scientific output:1. The code was changed so that production of 250m and 500m resolution data when all scans of a granule are in night mode may be turned off/on through the PCF file. 2. A check on the times of the leading and trailing granules was inserted. If a leading or trailing granule does not immediately precede or follow(respectively) the middle granule, it is treated as a missing granule and a warning message is printed. 3. The code now reads the "MCST Version Number"(e.g. "3.0.1.0_Terra") from the PCF file and checks it against the MCST Version number contained in the LUT HDF files. This was done to allow the user to make sure the code is being run using the correct LUT files.(The designators "0_Terra", "1_Terra", etc.) refer to the LUT versions.) 4. A small bug in Preprocess.c was corrected code
Definition: HISTORY.txt:661
list(APPEND LIBS ${PGSTK_LIBRARIES}) add_executable(atteph_info_modis atteph_info_modis.c) target_link_libraries(atteph_info_modis $
Definition: CMakeLists.txt:7
#define NULL
Definition: decode_rs.h:63
float32 * pos
Definition: l1_czcs_hdf.c:35
this program makes no use of any feature of the SDP Toolkit that could generate such a call
Definition: HISTORY.txt:150
float tp[MODELMAX]
Definition: atrem_corl1.h:173
double precision function f(R1)
Definition: tmd.lp.f:1454
data_t tmp
Definition: decode_rs.h:74
subroutine func(x, conec, n, bconecno, bn, units, u, inno, i, outno, o, Input, Targ, p, sqerr)
Definition: ffnet.f:287
instead the metadata field ProcessingEnvinronment is filled in from the output of a call to the POSIX compliant function uname from within the L1B code A small bug in L1B_Tables an incorrect comparison of RVS coefficients for TEBs to RVS coefficients for RSBs was being made This was replaced with a comparison between TEB coefficients This error never resulted in an incorrect RVS correction but did lead to recalculating the coefficients for each detector in a thermal band even if the coefficients were the same for all detectors To reduce to overall size of the reflective LUT HDF fill values were eliminated from all LUTs previously dimensioned where and where NUM_TIMES is the number of time dependent table pieces In Preprocess a small error where the trailing dropped scan counter was incremented when the leading dropped scan counter should have been was fixed This counter is internal only and is not yet used for any chiefly to casting of were added to make it LINUX compatible Output of code run on LINUX machines displays differences of at most scaled sector incalculable values of the Emissive calibration factor and incalculable values of SV or BB averages was moved outside the loop over frames in Emissive_Cal c since none of these quantities are frame dependent Initialization of b1 and XMS values in Preprocess c routine Process_OBCENG_Emiss was moved inside the detector loops The code was altered so that if up to five scans are dropped between the leading middle or middle trailing the leading or trailing granule will still be used in emissive calibration to form a cross granule average QA bits and are set for a gap between the leading middle and middle trailing granules respectively This may in rare instances lead to a change in emissive calibration coefficients for scans at the beginning or end of a granule A small bug in the Band correction algorithm was corrected an uncertainty value was being checked against an upper bound whereas the proper quantity to be checked was the corresponding which is the product of the Band radiance times the ratio of the Band to Band scaling factors times the LUT correction value for that detector In addition a new LUT which allows for a frame offset with regard to the Band radiance was added A LUT which switches the correction off or on was also added Changes which do not affect scientific output of the the pixel is flagged with the newly created flag and the number of pixels for which this occurs is counted in the QA_common table The array of b1s in Preprocess c was being initialized to outside the loop over which meant that if b1 could not be the value of b1 from the previous band for that scan detector combination was used The initialization was moved inside the band loop Minor code changes were made to eliminate compiler warnings when the code is compiled in bit mode Temperature equations were upgraded to be MODIS AQUA or MODIS TERRA specific and temperature conversion coefficients for AQUA were MOD_PR02 will not cease execution if the value of this parameter is not but will print a message
Definition: HISTORY.txt:644
dictionary kwargs
endif() set(LIBS $
Definition: CMakeLists.txt:6
char filename[FILENAME_MAX]
Definition: atrem_corl1.h:122
integer, parameter double
data_t b[NROOTS+1]
Definition: decode_rs.h:77
level
Definition: mapgen.py:186
HISTORY txt for MOD_PR01(step one of PGE01) History follows the following convention needed due to new Aqua ReprocessingActual and the expected LUT revision number from PCF Changed to use PGE version for ProductionHistory Added Archive including ProcessingEnvironment Corrected handling of bad to resovle GSFcd02514 Changed to check staged LUT revision number versus the expected LUT revision number from thereby resolving defect report MODxl02056 This change also avoids the memory access violation reported in MODur00039 Changed the way output arrays were initialized with fill values
Definition: HISTORY.txt:162
flags
Definition: DDAlgorithm.h:22
data_t u
Definition: decode_rs.h:74
data_t s[NROOTS]
Definition: decode_rs.h:75
l2prod offset
no change in intended resolving MODur00064 Corrected handling of bad ephemeris attitude resolving resolving GSFcd00179 Corrected handling of fill values for[Sensor|Solar][Zenith|Azimuth] resolving MODxl01751 Changed to validate LUT version against a value retrieved from the resolving MODxl02056 Changed to calculate Solar Diffuser angles without adjustment for estimated post launch changes in the MODIS orientation relative to incidentally resolving defects MODxl01766 Also resolves MODxl01947 Changed to ignore fill values in SCI_ABNORM and SCI_STATE rather than treating them as resolving MODxl01780 Changed to use spacecraft ancillary data to recognise when the mirror encoder data is being set by side A or side B and to change calculations accordingly This removes the need for seperate LUTs for Side A and Side B data it makes the new LUTs incompatible with older versions of the and vice versa Also resolves MODxl01685 A more robust GRing algorithm is being which will create a non default GRing anytime there s even a single geolocated pixel in a granule Removed obsolete messages from seed as required for compatibility with version of the SDP toolkit Corrected test output file names to end in per delivery and then split off a new MYD_PR03 pcf file for Aqua Added AssociatedPlatformInstrumentSensor to the inventory metadata in MOD01 mcf and MOD03 mcf Created new versions named MYD01 mcf and MYD03 where AssociatedPlatformShortName is rather than Terra The program itself has been changed to read the Satellite Instrument validate it against the input L1A and LUT and to use it determine the correct files to retrieve the ephemeris and attitude data from Changed to produce a LocalGranuleID starting with MYD03 if run on Aqua data Added the Scan Type file attribute to the Geolocation copied from the L1A and attitude_angels to radians rather than degrees The accumulation of Cumulated gflags was moved from GEO_validate_earth_location c to GEO_locate_one_scan c
Definition: HISTORY.txt:464
int i
Definition: decode_rs.h:71
msiBandIdx val
Definition: l1c_msi.cpp:34
How many dimensions is the output array Default is Not sure if anything above will work correctly strcpy(l2prod->title, "no title yet")
PGE01 indicating that PGE02 PGE01 V6 for and PGE01 V2 for MOD03 were used to produce the granule By convention adopted in all MODIS Terra PGE02 code versions are The fourth digit of the PGE02 version denotes the LUT version used to produce the granule The source of the metadata environment variable ProcessingCenter was changed from a QA LUT value to the Process Configuration A sign used in error in the second order term was changed to a
Definition: HISTORY.txt:424
int k
Definition: decode_rs.h:73
float p[MODELMAX]
Definition: atrem_corl1.h:131
int count
Definition: decode_rs.h:79