OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
dbocean.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": "dbocean",
7  "sources": [
8  "dbocean.pyx"
9  ]
10  },
11  "module_name": "dbocean"
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__dbocean
618 #define __PYX_HAVE_API__dbocean
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  "dbocean.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 /* PyObjectSetAttrStr.proto */
965 #if CYTHON_USE_TYPE_SLOTS
966 #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
967 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
968 #else
969 #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n)
970 #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
971 #endif
972 
973 /* PyDictVersioning.proto */
974 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
975 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
976 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
977 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
978  (version_var) = __PYX_GET_DICT_VERSION(dict);\
979  (cache_var) = (value);
980 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
981  static PY_UINT64_T __pyx_dict_version = 0;\
982  static PyObject *__pyx_dict_cached_value = NULL;\
983  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
984  (VAR) = __pyx_dict_cached_value;\
985  } else {\
986  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
987  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
988  }\
989 }
990 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
991 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
992 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
993 #else
994 #define __PYX_GET_DICT_VERSION(dict) (0)
995 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
996 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
997 #endif
998 
999 /* GetModuleGlobalName.proto */
1000 #if CYTHON_USE_DICT_VERSIONS
1001 #define __Pyx_GetModuleGlobalName(var, name) {\
1002  static PY_UINT64_T __pyx_dict_version = 0;\
1003  static PyObject *__pyx_dict_cached_value = NULL;\
1004  (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1005  (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1006  __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1007 }
1008 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
1009  PY_UINT64_T __pyx_dict_version;\
1010  PyObject *__pyx_dict_cached_value;\
1011  (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1012 }
1013 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1014 #else
1015 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1016 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1017 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1018 #endif
1019 
1020 /* PyObjectCall2Args.proto */
1021 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
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 /* SliceObject.proto */
1057 #define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\
1058  __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)
1059 static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
1060  PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
1061  PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
1062  int has_cstart, int has_cstop, int wraparound);
1063 
1064 /* PyObjectCallNoArg.proto */
1065 #if CYTHON_COMPILING_IN_CPYTHON
1066 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1067 #else
1068 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1069 #endif
1070 
1071 /* PyIntCompare.proto */
1072 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
1073 
1074 /* GetTopmostException.proto */
1075 #if CYTHON_USE_EXC_INFO_STACK
1076 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1077 #endif
1078 
1079 /* PyThreadStateGet.proto */
1080 #if CYTHON_FAST_THREAD_STATE
1081 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1082 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1083 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1084 #else
1085 #define __Pyx_PyThreadState_declare
1086 #define __Pyx_PyThreadState_assign
1087 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1088 #endif
1089 
1090 /* SaveResetException.proto */
1091 #if CYTHON_FAST_THREAD_STATE
1092 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1093 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1094 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1095 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1096 #else
1097 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1098 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1099 #endif
1100 
1101 /* PyErrExceptionMatches.proto */
1102 #if CYTHON_FAST_THREAD_STATE
1103 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1104 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1105 #else
1106 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1107 #endif
1108 
1109 /* GetException.proto */
1110 #if CYTHON_FAST_THREAD_STATE
1111 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1112 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1113 #else
1114 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1115 #endif
1116 
1117 /* PyErrFetchRestore.proto */
1118 #if CYTHON_FAST_THREAD_STATE
1119 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1120 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1121 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1122 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1123 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1124 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1125 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1126 #if CYTHON_COMPILING_IN_CPYTHON
1127 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1128 #else
1129 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1130 #endif
1131 #else
1132 #define __Pyx_PyErr_Clear() PyErr_Clear()
1133 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1134 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1135 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1136 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1137 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1138 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1139 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1140 #endif
1141 
1142 /* SwapException.proto */
1143 #if CYTHON_FAST_THREAD_STATE
1144 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1145 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1146 #else
1147 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1148 #endif
1149 
1150 /* None.proto */
1151 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
1152 
1153 /* PyFloatBinop.proto */
1154 #if !CYTHON_COMPILING_IN_PYPY
1155 static PyObject* __Pyx_PyFloat_TrueDivideCObj(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
1156 #else
1157 #define __Pyx_PyFloat_TrueDivideCObj(op1, op2, floatval, inplace, zerodivision_check)\
1158  (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2))
1159 #endif
1160 
1161 /* PyFloatBinop.proto */
1162 #if !CYTHON_COMPILING_IN_PYPY
1163 static PyObject* __Pyx_PyFloat_AddObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
1164 #else
1165 #define __Pyx_PyFloat_AddObjC(op1, op2, floatval, inplace, zerodivision_check)\
1166  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1167 #endif
1168 
1169 /* ObjectGetItem.proto */
1170 #if CYTHON_USE_TYPE_SLOTS
1171 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
1172 #else
1173 #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
1174 #endif
1175 
1176 /* RaiseTooManyValuesToUnpack.proto */
1177 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
1178 
1179 /* RaiseNeedMoreValuesToUnpack.proto */
1180 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
1181 
1182 /* IterFinish.proto */
1183 static CYTHON_INLINE int __Pyx_IterFinish(void);
1184 
1185 /* UnpackItemEndCheck.proto */
1186 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
1187 
1188 /* Import.proto */
1189 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1190 
1191 /* PyFloatBinop.proto */
1192 #if !CYTHON_COMPILING_IN_PYPY
1193 static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
1194 #else
1195 #define __Pyx_PyFloat_TrueDivideObjC(op1, op2, floatval, inplace, zerodivision_check)\
1196  (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2))
1197 #endif
1198 
1199 /* CalculateMetaclass.proto */
1200 static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
1201 
1202 /* FetchCommonType.proto */
1203 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1204 
1205 /* CythonFunctionShared.proto */
1206 #define __Pyx_CyFunction_USED 1
1207 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01
1208 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
1209 #define __Pyx_CYFUNCTION_CCLASS 0x04
1210 #define __Pyx_CyFunction_GetClosure(f)\
1211  (((__pyx_CyFunctionObject *) (f))->func_closure)
1212 #define __Pyx_CyFunction_GetClassObj(f)\
1213  (((__pyx_CyFunctionObject *) (f))->func_classobj)
1214 #define __Pyx_CyFunction_Defaults(type, f)\
1215  ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
1216 #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
1217  ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
1218 typedef struct {
1219  PyCFunctionObject func;
1220 #if PY_VERSION_HEX < 0x030500A0
1221  PyObject *func_weakreflist;
1222 #endif
1223  PyObject *func_dict;
1224  PyObject *func_name;
1225  PyObject *func_qualname;
1226  PyObject *func_doc;
1227  PyObject *func_globals;
1228  PyObject *func_code;
1229  PyObject *func_closure;
1230  PyObject *func_classobj;
1231  void *defaults;
1232  int defaults_pyobjects;
1233  size_t defaults_size; // used by FusedFunction for copying defaults
1234  int flags;
1235  PyObject *defaults_tuple;
1236  PyObject *defaults_kwdict;
1237  PyObject *(*defaults_getter)(PyObject *);
1238  PyObject *func_annotations;
1239 } __pyx_CyFunctionObject;
1240 static PyTypeObject *__pyx_CyFunctionType = 0;
1241 #define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
1242 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
1243  int flags, PyObject* qualname,
1244  PyObject *self,
1245  PyObject *module, PyObject *globals,
1246  PyObject* code);
1247 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
1248  size_t size,
1249  int pyobjects);
1250 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
1251  PyObject *tuple);
1252 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
1253  PyObject *dict);
1254 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
1255  PyObject *dict);
1256 static int __pyx_CyFunction_init(void);
1257 
1258 /* CythonFunction.proto */
1259 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
1260  int flags, PyObject* qualname,
1261  PyObject *closure,
1262  PyObject *module, PyObject *globals,
1263  PyObject* code);
1264 
1265 /* SetNameInClass.proto */
1266 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
1267 #define __Pyx_SetNameInClass(ns, name, value)\
1268  (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
1269 #elif CYTHON_COMPILING_IN_CPYTHON
1270 #define __Pyx_SetNameInClass(ns, name, value)\
1271  (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
1272 #else
1273 #define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value)
1274 #endif
1275 
1276 /* Py3ClassCreate.proto */
1277 static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
1278  PyObject *mkw, PyObject *modname, PyObject *doc);
1279 static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
1280  PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
1281 
1282 /* IncludeStringH.proto */
1283 #include <string.h>
1284 
1285 /* BytesEquals.proto */
1286 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1287 
1288 /* UnicodeEquals.proto */
1289 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1290 
1291 /* CLineInTraceback.proto */
1292 #ifdef CYTHON_CLINE_IN_TRACEBACK
1293 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1294 #else
1295 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1296 #endif
1297 
1298 /* CodeObjectCache.proto */
1299 typedef struct {
1300  PyCodeObject* code_object;
1301  int code_line;
1302 } __Pyx_CodeObjectCacheEntry;
1303 struct __Pyx_CodeObjectCache {
1304  int count;
1305  int max_count;
1306  __Pyx_CodeObjectCacheEntry* entries;
1307 };
1308 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1309 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1310 static PyCodeObject *__pyx_find_code_object(int code_line);
1311 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1312 
1313 /* AddTraceback.proto */
1314 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1315  int py_line, const char *filename);
1316 
1317 /* CIntToPy.proto */
1318 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1319 
1320 /* CIntToPy.proto */
1321 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1322 
1323 /* CIntFromPy.proto */
1324 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1325 
1326 /* CIntFromPy.proto */
1327 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1328 
1329 /* FastTypeChecks.proto */
1330 #if CYTHON_COMPILING_IN_CPYTHON
1331 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1332 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1333 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1334 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1335 #else
1336 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1337 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1338 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1339 #endif
1340 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1341 
1342 /* CheckBinaryVersion.proto */
1343 static int __Pyx_check_binary_version(void);
1344 
1345 /* InitStrings.proto */
1346 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1347 
1348 
1349 /* Module declarations from 'dbocean' */
1350 static int __pyx_v_7dbocean_W470;
1351 static int __pyx_v_7dbocean_W550;
1352 static int __pyx_v_7dbocean_W659;
1353 static int __pyx_v_7dbocean_W860;
1354 static int __pyx_v_7dbocean_W124;
1355 static int __pyx_v_7dbocean_W164;
1356 static int __pyx_v_7dbocean_W213;
1357 static int __pyx_v_7dbocean_NWL;
1358 static int __pyx_v_7dbocean_NSZA;
1359 static int __pyx_v_7dbocean_NVZA;
1360 static int __pyx_v_7dbocean_NRAA;
1361 static int __pyx_v_7dbocean_NAOT;
1362 static int __pyx_v_7dbocean_NFMF;
1363 static int __pyx_v_7dbocean_NF1;
1364 static int __pyx_v_7dbocean_NF2;
1365 static int __pyx_v_7dbocean_NWS;
1366 static int __pyx_v_7dbocean_NCHL;
1367 static int __pyx_v_7dbocean_D2R;
1368 #define __Pyx_MODULE_NAME "dbocean"
1369 extern int __pyx_module_is_main_dbocean;
1370 int __pyx_module_is_main_dbocean = 0;
1371 
1372 /* Implementation of 'dbocean' */
1373 static PyObject *__pyx_builtin_object;
1374 static PyObject *__pyx_builtin_print;
1375 static PyObject *__pyx_builtin_range;
1376 static const char __pyx_k_b[] = "b";
1377 static const char __pyx_k_g[] = "g";
1378 static const char __pyx_k_r[] = "r";
1379 static const char __pyx_k_w[] = "w";
1380 static const char __pyx_k_x[] = "x";
1381 static const char __pyx_k_y[] = "y";
1382 static const char __pyx_k_z[] = "z";
1383 static const char __pyx_k__7[] = ".";
1384 static const char __pyx_k_ds[] = "ds";
1385 static const char __pyx_k_if[] = "-if";
1386 static const char __pyx_k_ix[] = "ix";
1387 static const char __pyx_k_iy[] = "iy";
1388 static const char __pyx_k_lf[] = "-lf";
1389 static const char __pyx_k_lm[] = "lm";
1390 static const char __pyx_k_mf[] = "-mf";
1391 static const char __pyx_k_np[] = "np";
1392 static const char __pyx_k_of[] = "-of";
1393 static const char __pyx_k_os[] = "os";
1394 static const char __pyx_k_pf[] = "-pf";
1395 static const char __pyx_k_pi[] = "pi";
1396 static const char __pyx_k_wl[] = "wl";
1397 static const char __pyx_k_xi[] = "xi";
1398 static const char __pyx_k_xr[] = "xr";
1399 static const char __pyx_k__26[] = "*";
1400 static const char __pyx_k_add[] = "add";
1401 static const char __pyx_k_aot[] = "aot";
1402 static const char __pyx_k_chl[] = "chl";
1403 static const char __pyx_k_cld[] = "cld";
1404 static const char __pyx_k_clf[] = "clf";
1405 static const char __pyx_k_dbo[] = "dbo";
1406 static const char __pyx_k_doc[] = "__doc__";
1407 static const char __pyx_k_dot[] = "dot";
1408 static const char __pyx_k_fmf[] = "fmf";
1409 static const char __pyx_k_lat[] = "lat";
1410 static const char __pyx_k_loc[] = "loc";
1411 static const char __pyx_k_lon[] = "lon";
1412 static const char __pyx_k_lut[] = "lut";
1413 static const char __pyx_k_max[] = "max";
1414 static const char __pyx_k_min[] = "min";
1415 static const char __pyx_k_mxi[] = "mxi";
1416 static const char __pyx_k_plt[] = "plt";
1417 static const char __pyx_k_raa[] = "raa";
1418 static const char __pyx_k_rfl[] = "rfl";
1419 static const char __pyx_k_rsd[] = "rsd";
1420 static const char __pyx_k_rxi[] = "rxi";
1421 static const char __pyx_k_sse[] = "sse";
1422 static const char __pyx_k_sys[] = "sys";
1423 static const char __pyx_k_sza[] = "sza";
1424 static const char __pyx_k_tic[] = "tic";
1425 static const char __pyx_k_toc[] = "toc";
1426 static const char __pyx_k_tpp[] = "tpp";
1427 static const char __pyx_k_trp[] = "trp";
1428 static const char __pyx_k_vin[] = "vin";
1429 static const char __pyx_k_vza[] = "vza";
1430 static const char __pyx_k_wnd[] = "wnd";
1431 static const char __pyx_k_Done[] = " Done!";
1432 static const char __pyx_k_args[] = "args";
1433 static const char __pyx_k_axis[] = "axis";
1434 static const char __pyx_k_chlc[] = "chlc";
1435 static const char __pyx_k_coef[] = "coef";
1436 static const char __pyx_k_data[] = "data";
1437 static const char __pyx_k_dims[] = "dims";
1438 static const char __pyx_k_dimx[] = "dimx";
1439 static const char __pyx_k_dimy[] = "dimy";
1440 static const char __pyx_k_exit[] = "exit";
1441 static const char __pyx_k_grid[] = "grid";
1442 static const char __pyx_k_help[] = "help";
1443 static const char __pyx_k_init[] = "__init__";
1444 static const char __pyx_k_inst[] = "inst";
1445 static const char __pyx_k_main[] = "__main__";
1446 static const char __pyx_k_math[] = "math";
1447 static const char __pyx_k_mfit[] = "mfit";
1448 static const char __pyx_k_mode[] = "mode";
1449 static const char __pyx_k_mpts[] = "mpts";
1450 static const char __pyx_k_mrfl[] = "mrfl";
1451 static const char __pyx_k_name[] = "name";
1452 static const char __pyx_k_pars[] = "pars";
1453 static const char __pyx_k_plot[] = "plot";
1454 static const char __pyx_k_rlut[] = "rlut";
1455 static const char __pyx_k_rpts[] = "rpts";
1456 static const char __pyx_k_self[] = "self";
1457 static const char __pyx_k_show[] = "show";
1458 static const char __pyx_k_test[] = "__test__";
1459 static const char __pyx_k_time[] = "time";
1460 static const char __pyx_k_tlut[] = "tlut";
1461 static const char __pyx_k_tstr[] = "tstr";
1462 static const char __pyx_k_type[] = "type";
1463 static const char __pyx_k_vout[] = "vout";
1464 static const char __pyx_k_wndc[] = "wndc";
1465 static const char __pyx_k_xdim[] = "xdim";
1466 static const char __pyx_k_ydim[] = "ydim";
1467 static const char __pyx_k_array[] = "array";
1468 static const char __pyx_k_color[] = "color";
1469 static const char __pyx_k_flush[] = "flush";
1470 static const char __pyx_k_group[] = "group";
1471 static const char __pyx_k_ifile[] = "ifile";
1472 static const char __pyx_k_input[] = "input";
1473 static const char __pyx_k_label[] = "label";
1474 static const char __pyx_k_lmfit[] = "lmfit";
1475 static const char __pyx_k_lut_2[] = "--lut";
1476 static const char __pyx_k_model[] = "model";
1477 static const char __pyx_k_numpy[] = "numpy";
1478 static const char __pyx_k_ofile[] = "ofile";
1479 static const char __pyx_k_print[] = "print";
1480 static const char __pyx_k_range[] = "range";
1481 static const char __pyx_k_scale[] = "scale";
1482 static const char __pyx_k_shape[] = "shape";
1483 static const char __pyx_k_stack[] = "stack";
1484 static const char __pyx_k_title[] = "title";
1485 static const char __pyx_k_value[] = "value";
1486 static const char __pyx_k_write[] = "write";
1487 static const char __pyx_k_zeros[] = "zeros";
1488 static const char __pyx_k_append[] = "append";
1489 static const char __pyx_k_format[] = "format";
1490 static const char __pyx_k_import[] = "__import__";
1491 static const char __pyx_k_legend[] = "legend";
1492 static const char __pyx_k_main_2[] = "main";
1493 static const char __pyx_k_marker[] = "marker";
1494 static const char __pyx_k_minfun[] = "minfun";
1495 static const char __pyx_k_mode_2[] = "--mode";
1496 static const char __pyx_k_module[] = "__module__";
1497 static const char __pyx_k_name_2[] = "__name__";
1498 static const char __pyx_k_object[] = "object";
1499 static const char __pyx_k_output[] = "output";
1500 static const char __pyx_k_params[] = "params";
1501 static const char __pyx_k_parser[] = "parser";
1502 static const char __pyx_k_plot_2[] = "--plot";
1503 static const char __pyx_k_redchi[] = "redchi";
1504 static const char __pyx_k_values[] = "values";
1505 static const char __pyx_k_wl_pts[] = "wl_pts";
1506 static const char __pyx_k_xarray[] = "xarray";
1507 static const char __pyx_k_xlabel[] = "xlabel";
1508 static const char __pyx_k_ylabel[] = "ylabel";
1509 static const char __pyx_k_Dataset[] = "Dataset";
1510 static const char __pyx_k_LOG_CHL[] = "/LOG_CHL";
1511 static const char __pyx_k_aot_pts[] = "aot_pts";
1512 static const char __pyx_k_chl_lut[] = "chl_lut";
1513 static const char __pyx_k_chl_pts[] = "chl_pts";
1514 static const char __pyx_k_dbocean[] = "dbocean";
1515 static const char __pyx_k_default[] = "default";
1516 static const char __pyx_k_fmf_pts[] = "fmf_pts";
1517 static const char __pyx_k_ifile_2[] = "--ifile";
1518 static const char __pyx_k_interpn[] = "interpn";
1519 static const char __pyx_k_modeled[] = "modeled";
1520 static const char __pyx_k_ofile_2[] = "--ofile";
1521 static const char __pyx_k_prepare[] = "__prepare__";
1522 static const char __pyx_k_process[] = "process";
1523 static const char __pyx_k_raa_pts[] = "raa_pts";
1524 static const char __pyx_k_sza_pts[] = "sza_pts";
1525 static const char __pyx_k_vza_pts[] = "vza_pts";
1526 static const char __pyx_k_wnd_pts[] = "wnd_pts";
1527 static const char __pyx_k_Chl_Conc[] = "Chl_Conc";
1528 static const char __pyx_k_FileType[] = "FileType";
1529 static const char __pyx_k_argparse[] = "argparse";
1530 static const char __pyx_k_latitude[] = "latitude";
1531 static const char __pyx_k_measured[] = "measured";
1532 static const char __pyx_k_minimize[] = "minimize";
1533 static const char __pyx_k_qualname[] = "__qualname__";
1534 static const char __pyx_k_required[] = "required";
1535 static const char __pyx_k_residual[] = "residual";
1536 static const char __pyx_k_DataArray[] = "DataArray";
1537 static const char __pyx_k_LOG_CHL_2[] = "LOG_CHL";
1538 static const char __pyx_k_ancillary[] = "/ancillary";
1539 static const char __pyx_k_longitude[] = "longitude";
1540 static const char __pyx_k_metaclass[] = "__metaclass__";
1541 static const char __pyx_k_to_netcdf[] = "to_netcdf";
1542 static const char __pyx_k_transpose[] = "transpose";
1543 static const char __pyx_k_IoverF_m03[] = "IoverF_m03";
1544 static const char __pyx_k_IoverF_m04[] = "IoverF_m04";
1545 static const char __pyx_k_IoverF_m05[] = "IoverF_m05";
1546 static const char __pyx_k_IoverF_m07[] = "IoverF_m07";
1547 static const char __pyx_k_IoverF_m08[] = "IoverF_m08";
1548 static const char __pyx_k_IoverF_m10[] = "IoverF_m10";
1549 static const char __pyx_k_IoverF_m11[] = "IoverF_m11";
1550 static const char __pyx_k_Parameters[] = "Parameters";
1551 static const char __pyx_k_Wind_Speed[] = "Wind_Speed";
1552 static const char __pyx_k_cloud_mask[] = "cloud_mask";
1553 static const char __pyx_k_fill_value[] = "fill_value";
1554 static const char __pyx_k_input_file[] = "input file";
1555 static const char __pyx_k_parse_args[] = "parse_args";
1556 static const char __pyx_k_start_line[] = "start line";
1557 static const char __pyx_k_wind_speed[] = "wind_speed";
1558 static const char __pyx_k_chlorophyll[] = "chlorophyll";
1559 static const char __pyx_k_dbocean_pyx[] = "dbocean.pyx";
1560 static const char __pyx_k_geolocation[] = "/geolocation";
1561 static const char __pyx_k_mode_option[] = "mode option";
1562 static const char __pyx_k_output_file[] = "output file";
1563 static const char __pyx_k_reflectance[] = "reflectance";
1564 static const char __pyx_k_square_side[] = "square side ";
1565 static const char __pyx_k_start_pixel[] = "start pixel";
1566 static const char __pyx_k_upper_right[] = "upper right";
1567 static const char __pyx_k_add_argument[] = "add_argument";
1568 static const char __pyx_k_bounds_error[] = "bounds_error";
1569 static const char __pyx_k_dbocean_plot[] = "dbocean.plot";
1570 static const char __pyx_k_input___init[] = "input.__init__";
1571 static const char __pyx_k_l1b_filepath[] = "l1b_filepath";
1572 static const char __pyx_k_load_dataset[] = "load_dataset";
1573 static const char __pyx_k_lut_filepath[] = "lut_filepath";
1574 static const char __pyx_k_out_filepath[] = "out_filepath";
1575 static const char __pyx_k_output_write[] = "output.write";
1576 static const char __pyx_k_perf_counter[] = "perf_counter";
1577 static const char __pyx_k_solar_zenith[] = "solar_zenith";
1578 static const char __pyx_k_output___init[] = "output.__init__";
1579 static const char __pyx_k_reflectance_2[] = "/reflectance";
1580 static const char __pyx_k_sensor_zenith[] = "sensor_zenith";
1581 static const char __pyx_k_wavelength_nm[] = "wavelength (nm)";
1582 static const char __pyx_k_ArgumentParser[] = "ArgumentParser";
1583 static const char __pyx_k_dbocean___init[] = "dbocean.__init__";
1584 static const char __pyx_k_dbocean_minfun[] = "dbocean.minfun";
1585 static const char __pyx_k_Writing_to_file[] = "Writing to file: ";
1586 static const char __pyx_k_dbocean_process[] = "dbocean.process";
1587 static const char __pyx_k_navigation_data[] = "/navigation_data";
1588 static const char __pyx_k_plot_pixel_data[] = "plot pixel data";
1589 static const char __pyx_k_toa_reflectance[] = "toa_reflectance";
1590 static const char __pyx_k_relative_azimuth[] = "relative_azimuth";
1591 static const char __pyx_k_Processing_mode_0[] = "Processing mode {0}";
1592 static const char __pyx_k_View_Zenith_Angle[] = "View_Zenith_Angle";
1593 static const char __pyx_k_lookup_table_file[] = "lookup table file";
1594 static const char __pyx_k_matplotlib_pyplot[] = "matplotlib.pyplot";
1595 static const char __pyx_k_scipy_interpolate[] = "scipy.interpolate";
1596 static const char __pyx_k_OCEAN_AEROSOL_DUST[] = "/OCEAN_AEROSOL_DUST";
1597 static const char __pyx_k_OCEAN_AEROSOL_FINE[] = "/OCEAN_AEROSOL_FINE";
1598 static const char __pyx_k_Solar_Zenith_Angle[] = "Solar_Zenith_Angle";
1599 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
1600 static const char __pyx_k_OCEAN_AEROSOL_MIXED[] = "/OCEAN_AEROSOL_MIXED";
1601 static const char __pyx_k_Reading_sensor_data[] = "Reading sensor data: ";
1602 static const char __pyx_k_Reading_Deepblue_LUT[] = "Reading Deepblue LUT: ";
1603 static const char __pyx_k_Fine_Mode_Fraction_550[] = "Fine_Mode_Fraction_550";
1604 static const char __pyx_k_Relative_Azimuth_Angle[] = "Relative_Azimuth_Angle";
1605 static const char __pyx_k_Band_Central_Wavelength[] = "Band_Central_Wavelength";
1606 static const char __pyx_k_Aerosol_Optical_Depth_550[] = "Aerosol_Optical_Depth_550";
1607 static const char __pyx_k_processing_error_at_pixel[] = "processing error at pixel";
1608 static const char __pyx_k_Unable_to_read_LUT_file_exiting[] = "Unable to read LUT file ... exiting";
1609 static const char __pyx_k_Unable_to_initialize_output_file[] = "Unable to initialize output file ... exiting";
1610 static const char __pyx_k_Unable_to_read_from_file_exiting[] = "Unable to read from file ... exiting";
1611 static const char __pyx_k_dbocean_mode_3_d_y_4_x_5_aot_0_3[] = "dbocean mode {3:d} -- y={4:}, x={5:} aot: {0:.3f} fmf: {1:.3f} sse: {2:.3}";
1612 static PyObject *__pyx_n_u_Aerosol_Optical_Depth_550;
1613 static PyObject *__pyx_n_s_ArgumentParser;
1614 static PyObject *__pyx_n_u_Band_Central_Wavelength;
1615 static PyObject *__pyx_n_u_Chl_Conc;
1616 static PyObject *__pyx_n_s_DataArray;
1617 static PyObject *__pyx_n_s_Dataset;
1618 static PyObject *__pyx_kp_u_Done;
1619 static PyObject *__pyx_n_s_FileType;
1620 static PyObject *__pyx_n_u_Fine_Mode_Fraction_550;
1621 static PyObject *__pyx_n_u_IoverF_m03;
1622 static PyObject *__pyx_n_u_IoverF_m04;
1623 static PyObject *__pyx_n_u_IoverF_m05;
1624 static PyObject *__pyx_n_u_IoverF_m07;
1625 static PyObject *__pyx_n_u_IoverF_m08;
1626 static PyObject *__pyx_n_u_IoverF_m10;
1627 static PyObject *__pyx_n_u_IoverF_m11;
1628 static PyObject *__pyx_kp_u_LOG_CHL;
1629 static PyObject *__pyx_n_u_LOG_CHL_2;
1630 static PyObject *__pyx_kp_u_OCEAN_AEROSOL_DUST;
1631 static PyObject *__pyx_kp_u_OCEAN_AEROSOL_FINE;
1632 static PyObject *__pyx_kp_u_OCEAN_AEROSOL_MIXED;
1633 static PyObject *__pyx_n_s_Parameters;
1634 static PyObject *__pyx_kp_u_Processing_mode_0;
1635 static PyObject *__pyx_kp_u_Reading_Deepblue_LUT;
1636 static PyObject *__pyx_kp_u_Reading_sensor_data;
1637 static PyObject *__pyx_n_u_Relative_Azimuth_Angle;
1638 static PyObject *__pyx_n_u_Solar_Zenith_Angle;
1639 static PyObject *__pyx_kp_u_Unable_to_initialize_output_file;
1640 static PyObject *__pyx_kp_u_Unable_to_read_LUT_file_exiting;
1641 static PyObject *__pyx_kp_u_Unable_to_read_from_file_exiting;
1642 static PyObject *__pyx_n_u_View_Zenith_Angle;
1643 static PyObject *__pyx_n_u_Wind_Speed;
1644 static PyObject *__pyx_kp_u_Writing_to_file;
1645 static PyObject *__pyx_n_s__26;
1646 static PyObject *__pyx_kp_u__7;
1647 static PyObject *__pyx_n_s_add;
1648 static PyObject *__pyx_n_s_add_argument;
1649 static PyObject *__pyx_kp_u_ancillary;
1650 static PyObject *__pyx_n_s_aot;
1651 static PyObject *__pyx_n_u_aot;
1652 static PyObject *__pyx_n_s_aot_pts;
1653 static PyObject *__pyx_n_s_append;
1654 static PyObject *__pyx_n_s_argparse;
1655 static PyObject *__pyx_n_s_args;
1656 static PyObject *__pyx_n_s_array;
1657 static PyObject *__pyx_n_s_axis;
1658 static PyObject *__pyx_n_u_b;
1659 static PyObject *__pyx_n_s_bounds_error;
1660 static PyObject *__pyx_n_s_chl;
1661 static PyObject *__pyx_n_u_chl;
1662 static PyObject *__pyx_n_s_chl_lut;
1663 static PyObject *__pyx_n_s_chl_pts;
1664 static PyObject *__pyx_n_s_chlc;
1665 static PyObject *__pyx_n_u_chlorophyll;
1666 static PyObject *__pyx_n_s_cld;
1667 static PyObject *__pyx_n_s_clf;
1668 static PyObject *__pyx_n_s_cline_in_traceback;
1669 static PyObject *__pyx_n_u_cloud_mask;
1670 static PyObject *__pyx_n_s_coef;
1671 static PyObject *__pyx_n_s_color;
1672 static PyObject *__pyx_n_s_data;
1673 static PyObject *__pyx_n_s_dbo;
1674 static PyObject *__pyx_n_s_dbocean;
1675 static PyObject *__pyx_n_s_dbocean___init;
1676 static PyObject *__pyx_n_s_dbocean_minfun;
1677 static PyObject *__pyx_kp_u_dbocean_mode_3_d_y_4_x_5_aot_0_3;
1678 static PyObject *__pyx_n_s_dbocean_plot;
1679 static PyObject *__pyx_n_s_dbocean_process;
1680 static PyObject *__pyx_kp_s_dbocean_pyx;
1681 static PyObject *__pyx_n_s_default;
1682 static PyObject *__pyx_n_s_dims;
1683 static PyObject *__pyx_n_s_dimx;
1684 static PyObject *__pyx_n_s_dimy;
1685 static PyObject *__pyx_n_s_doc;
1686 static PyObject *__pyx_n_s_dot;
1687 static PyObject *__pyx_n_s_ds;
1688 static PyObject *__pyx_n_s_exit;
1689 static PyObject *__pyx_n_s_fill_value;
1690 static PyObject *__pyx_n_s_flush;
1691 static PyObject *__pyx_n_s_fmf;
1692 static PyObject *__pyx_n_u_fmf;
1693 static PyObject *__pyx_n_s_fmf_pts;
1694 static PyObject *__pyx_n_s_format;
1695 static PyObject *__pyx_n_u_g;
1696 static PyObject *__pyx_kp_u_geolocation;
1697 static PyObject *__pyx_n_s_grid;
1698 static PyObject *__pyx_n_s_group;
1699 static PyObject *__pyx_n_s_help;
1700 static PyObject *__pyx_kp_u_if;
1701 static PyObject *__pyx_n_s_ifile;
1702 static PyObject *__pyx_kp_u_ifile_2;
1703 static PyObject *__pyx_n_s_import;
1704 static PyObject *__pyx_n_s_init;
1705 static PyObject *__pyx_n_s_input;
1706 static PyObject *__pyx_n_s_input___init;
1707 static PyObject *__pyx_kp_u_input_file;
1708 static PyObject *__pyx_n_s_inst;
1709 static PyObject *__pyx_n_s_interpn;
1710 static PyObject *__pyx_n_s_ix;
1711 static PyObject *__pyx_n_s_iy;
1712 static PyObject *__pyx_n_s_l1b_filepath;
1713 static PyObject *__pyx_n_s_label;
1714 static PyObject *__pyx_n_s_lat;
1715 static PyObject *__pyx_n_u_lat;
1716 static PyObject *__pyx_n_u_latitude;
1717 static PyObject *__pyx_n_s_legend;
1718 static PyObject *__pyx_kp_u_lf;
1719 static PyObject *__pyx_n_s_lm;
1720 static PyObject *__pyx_n_s_lmfit;
1721 static PyObject *__pyx_n_s_load_dataset;
1722 static PyObject *__pyx_n_s_loc;
1723 static PyObject *__pyx_n_s_lon;
1724 static PyObject *__pyx_n_u_lon;
1725 static PyObject *__pyx_n_u_longitude;
1726 static PyObject *__pyx_kp_u_lookup_table_file;
1727 static PyObject *__pyx_n_s_lut;
1728 static PyObject *__pyx_kp_u_lut_2;
1729 static PyObject *__pyx_n_s_lut_filepath;
1730 static PyObject *__pyx_n_s_main;
1731 static PyObject *__pyx_n_u_main;
1732 static PyObject *__pyx_n_s_main_2;
1733 static PyObject *__pyx_n_s_marker;
1734 static PyObject *__pyx_n_s_math;
1735 static PyObject *__pyx_n_s_matplotlib_pyplot;
1736 static PyObject *__pyx_n_s_max;
1737 static PyObject *__pyx_n_u_measured;
1738 static PyObject *__pyx_n_s_metaclass;
1739 static PyObject *__pyx_kp_u_mf;
1740 static PyObject *__pyx_n_s_mfit;
1741 static PyObject *__pyx_n_s_min;
1742 static PyObject *__pyx_n_s_minfun;
1743 static PyObject *__pyx_n_s_minimize;
1744 static PyObject *__pyx_n_s_mode;
1745 static PyObject *__pyx_kp_u_mode_2;
1746 static PyObject *__pyx_kp_u_mode_option;
1747 static PyObject *__pyx_n_s_model;
1748 static PyObject *__pyx_n_u_modeled;
1749 static PyObject *__pyx_n_s_module;
1750 static PyObject *__pyx_n_s_mpts;
1751 static PyObject *__pyx_n_s_mrfl;
1752 static PyObject *__pyx_n_s_mxi;
1753 static PyObject *__pyx_n_s_name;
1754 static PyObject *__pyx_n_s_name_2;
1755 static PyObject *__pyx_kp_u_navigation_data;
1756 static PyObject *__pyx_n_s_np;
1757 static PyObject *__pyx_n_s_numpy;
1758 static PyObject *__pyx_n_s_object;
1759 static PyObject *__pyx_kp_u_of;
1760 static PyObject *__pyx_n_s_ofile;
1761 static PyObject *__pyx_kp_u_ofile_2;
1762 static PyObject *__pyx_n_s_os;
1763 static PyObject *__pyx_n_s_out_filepath;
1764 static PyObject *__pyx_n_s_output;
1765 static PyObject *__pyx_n_s_output___init;
1766 static PyObject *__pyx_kp_u_output_file;
1767 static PyObject *__pyx_n_s_output_write;
1768 static PyObject *__pyx_n_s_params;
1769 static PyObject *__pyx_n_s_pars;
1770 static PyObject *__pyx_n_s_parse_args;
1771 static PyObject *__pyx_n_s_parser;
1772 static PyObject *__pyx_n_s_perf_counter;
1773 static PyObject *__pyx_kp_u_pf;
1774 static PyObject *__pyx_n_s_pi;
1775 static PyObject *__pyx_n_s_plot;
1776 static PyObject *__pyx_kp_u_plot_2;
1777 static PyObject *__pyx_kp_u_plot_pixel_data;
1778 static PyObject *__pyx_n_s_plt;
1779 static PyObject *__pyx_n_s_prepare;
1780 static PyObject *__pyx_n_s_print;
1781 static PyObject *__pyx_n_s_process;
1782 static PyObject *__pyx_kp_u_processing_error_at_pixel;
1783 static PyObject *__pyx_n_s_qualname;
1784 static PyObject *__pyx_n_u_r;
1785 static PyObject *__pyx_n_s_raa;
1786 static PyObject *__pyx_n_u_raa;
1787 static PyObject *__pyx_n_s_raa_pts;
1788 static PyObject *__pyx_n_s_range;
1789 static PyObject *__pyx_n_s_redchi;
1790 static PyObject *__pyx_n_u_reflectance;
1791 static PyObject *__pyx_kp_u_reflectance_2;
1792 static PyObject *__pyx_n_u_relative_azimuth;
1793 static PyObject *__pyx_n_s_required;
1794 static PyObject *__pyx_n_u_residual;
1795 static PyObject *__pyx_n_s_rfl;
1796 static PyObject *__pyx_n_u_rfl;
1797 static PyObject *__pyx_n_s_rlut;
1798 static PyObject *__pyx_n_s_rpts;
1799 static PyObject *__pyx_n_s_rsd;
1800 static PyObject *__pyx_n_s_rxi;
1801 static PyObject *__pyx_n_s_scale;
1802 static PyObject *__pyx_n_s_scipy_interpolate;
1803 static PyObject *__pyx_n_s_self;
1804 static PyObject *__pyx_n_u_sensor_zenith;
1805 static PyObject *__pyx_n_s_shape;
1806 static PyObject *__pyx_n_s_show;
1807 static PyObject *__pyx_n_u_solar_zenith;
1808 static PyObject *__pyx_kp_u_square_side;
1809 static PyObject *__pyx_n_s_sse;
1810 static PyObject *__pyx_n_u_sse;
1811 static PyObject *__pyx_n_s_stack;
1812 static PyObject *__pyx_kp_u_start_line;
1813 static PyObject *__pyx_kp_u_start_pixel;
1814 static PyObject *__pyx_n_s_sys;
1815 static PyObject *__pyx_n_s_sza;
1816 static PyObject *__pyx_n_u_sza;
1817 static PyObject *__pyx_n_s_sza_pts;
1818 static PyObject *__pyx_n_s_test;
1819 static PyObject *__pyx_n_s_tic;
1820 static PyObject *__pyx_n_s_time;
1821 static PyObject *__pyx_n_s_title;
1822 static PyObject *__pyx_n_s_tlut;
1823 static PyObject *__pyx_n_s_to_netcdf;
1824 static PyObject *__pyx_n_u_toa_reflectance;
1825 static PyObject *__pyx_n_s_toc;
1826 static PyObject *__pyx_n_s_tpp;
1827 static PyObject *__pyx_n_s_transpose;
1828 static PyObject *__pyx_n_s_trp;
1829 static PyObject *__pyx_n_s_tstr;
1830 static PyObject *__pyx_n_s_type;
1831 static PyObject *__pyx_kp_u_upper_right;
1832 static PyObject *__pyx_n_s_value;
1833 static PyObject *__pyx_n_s_values;
1834 static PyObject *__pyx_n_s_vin;
1835 static PyObject *__pyx_n_s_vout;
1836 static PyObject *__pyx_n_s_vza;
1837 static PyObject *__pyx_n_u_vza;
1838 static PyObject *__pyx_n_s_vza_pts;
1839 static PyObject *__pyx_n_u_w;
1840 static PyObject *__pyx_kp_u_wavelength_nm;
1841 static PyObject *__pyx_n_u_wind_speed;
1842 static PyObject *__pyx_n_u_wl;
1843 static PyObject *__pyx_n_s_wl_pts;
1844 static PyObject *__pyx_n_s_wnd;
1845 static PyObject *__pyx_n_u_wnd;
1846 static PyObject *__pyx_n_s_wnd_pts;
1847 static PyObject *__pyx_n_s_wndc;
1848 static PyObject *__pyx_n_s_write;
1849 static PyObject *__pyx_n_s_x;
1850 static PyObject *__pyx_n_u_x;
1851 static PyObject *__pyx_n_s_xarray;
1852 static PyObject *__pyx_n_s_xdim;
1853 static PyObject *__pyx_n_s_xi;
1854 static PyObject *__pyx_n_s_xlabel;
1855 static PyObject *__pyx_n_s_xr;
1856 static PyObject *__pyx_n_s_y;
1857 static PyObject *__pyx_n_u_y;
1858 static PyObject *__pyx_n_s_ydim;
1859 static PyObject *__pyx_n_s_ylabel;
1860 static PyObject *__pyx_n_s_z;
1861 static PyObject *__pyx_n_u_z;
1862 static PyObject *__pyx_n_s_zeros;
1863 static PyObject *__pyx_pf_7dbocean_7dbocean___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_lut_filepath, PyObject *__pyx_v_mode); /* proto */
1864 static PyObject *__pyx_pf_7dbocean_7dbocean_2minfun(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pars, PyObject *__pyx_v_data, PyObject *__pyx_v_scale, PyObject *__pyx_v_rlut); /* proto */
1865 static PyObject *__pyx_pf_7dbocean_7dbocean_4process(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, PyObject *__pyx_v_chl); /* proto */
1866 static PyObject *__pyx_pf_7dbocean_7dbocean_6plot(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_iy, PyObject *__pyx_v_ix); /* proto */
1867 static PyObject *__pyx_pf_7dbocean_5input___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_l1b_filepath); /* proto */
1868 static PyObject *__pyx_pf_7dbocean_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 */
1869 static PyObject *__pyx_pf_7dbocean_6output_2write(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
1870 static PyObject *__pyx_pf_7dbocean_main(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
1871 static PyObject *__pyx_float_0_1;
1872 static PyObject *__pyx_float_0_5;
1873 static PyObject *__pyx_float_1_0;
1874 static PyObject *__pyx_float_2_0;
1875 static PyObject *__pyx_float_0_04;
1876 static PyObject *__pyx_float_0_06;
1877 static PyObject *__pyx_float_0_07;
1878 static PyObject *__pyx_float_180_0;
1879 static PyObject *__pyx_float_0_00001;
1880 static PyObject *__pyx_float_neg_2_0;
1881 static PyObject *__pyx_float_neg_10_0;
1882 static PyObject *__pyx_float_neg_999_9;
1883 static PyObject *__pyx_int_0;
1884 static PyObject *__pyx_int_1;
1885 static PyObject *__pyx_int_2;
1886 static PyObject *__pyx_int_3;
1887 static PyObject *__pyx_int_4;
1888 static PyObject *__pyx_int_5;
1889 static PyObject *__pyx_int_6;
1890 static PyObject *__pyx_int_7;
1891 static PyObject *__pyx_int_8;
1892 static PyObject *__pyx_int_100;
1893 static PyObject *__pyx_int_neg_999;
1894 static PyObject *__pyx_slice_;
1895 static PyObject *__pyx_slice__8;
1896 static PyObject *__pyx_tuple__2;
1897 static PyObject *__pyx_tuple__3;
1898 static PyObject *__pyx_tuple__4;
1899 static PyObject *__pyx_tuple__5;
1900 static PyObject *__pyx_tuple__6;
1901 static PyObject *__pyx_tuple__9;
1902 static PyObject *__pyx_slice__10;
1903 static PyObject *__pyx_tuple__11;
1904 static PyObject *__pyx_tuple__12;
1905 static PyObject *__pyx_tuple__13;
1906 static PyObject *__pyx_tuple__14;
1907 static PyObject *__pyx_tuple__15;
1908 static PyObject *__pyx_tuple__16;
1909 static PyObject *__pyx_tuple__17;
1910 static PyObject *__pyx_tuple__18;
1911 static PyObject *__pyx_tuple__19;
1912 static PyObject *__pyx_tuple__20;
1913 static PyObject *__pyx_tuple__21;
1914 static PyObject *__pyx_tuple__22;
1915 static PyObject *__pyx_tuple__23;
1916 static PyObject *__pyx_tuple__24;
1917 static PyObject *__pyx_tuple__25;
1918 static PyObject *__pyx_tuple__27;
1919 static PyObject *__pyx_tuple__28;
1920 static PyObject *__pyx_tuple__30;
1921 static PyObject *__pyx_tuple__32;
1922 static PyObject *__pyx_tuple__34;
1923 static PyObject *__pyx_tuple__36;
1924 static PyObject *__pyx_tuple__37;
1925 static PyObject *__pyx_tuple__39;
1926 static PyObject *__pyx_tuple__40;
1927 static PyObject *__pyx_tuple__42;
1928 static PyObject *__pyx_tuple__44;
1929 static PyObject *__pyx_codeobj__29;
1930 static PyObject *__pyx_codeobj__31;
1931 static PyObject *__pyx_codeobj__33;
1932 static PyObject *__pyx_codeobj__35;
1933 static PyObject *__pyx_codeobj__38;
1934 static PyObject *__pyx_codeobj__41;
1935 static PyObject *__pyx_codeobj__43;
1936 static PyObject *__pyx_codeobj__45;
1937 /* Late includes */
1938 
1939 /* "dbocean.pyx":35
1940  * class dbocean(object):
1941  *
1942  * def __init__(self, lut_filepath, mode): # <<<<<<<<<<<<<<
1943  * print ("Reading Deepblue LUT: " + lut_filepath)
1944  * self.mode = mode
1945  */
1946 
1947 /* Python wrapper */
1948 static PyObject *__pyx_pw_7dbocean_7dbocean_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1949 static PyMethodDef __pyx_mdef_7dbocean_7dbocean_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7dbocean_7dbocean_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
1950 static PyObject *__pyx_pw_7dbocean_7dbocean_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1951  PyObject *__pyx_v_self = 0;
1952  PyObject *__pyx_v_lut_filepath = 0;
1953  PyObject *__pyx_v_mode = 0;
1954  int __pyx_lineno = 0;
1955  const char *__pyx_filename = NULL;
1956  int __pyx_clineno = 0;
1957  PyObject *__pyx_r = 0;
1958  __Pyx_RefNannyDeclarations
1959  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
1960  {
1961  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_lut_filepath,&__pyx_n_s_mode,0};
1962  PyObject* values[3] = {0,0,0};
1963  if (unlikely(__pyx_kwds)) {
1964  Py_ssize_t kw_args;
1965  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
1966  switch (pos_args) {
1967  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
1968  CYTHON_FALLTHROUGH;
1969  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1970  CYTHON_FALLTHROUGH;
1971  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1972  CYTHON_FALLTHROUGH;
1973  case 0: break;
1974  default: goto __pyx_L5_argtuple_error;
1975  }
1976  kw_args = PyDict_Size(__pyx_kwds);
1977  switch (pos_args) {
1978  case 0:
1979  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
1980  else goto __pyx_L5_argtuple_error;
1981  CYTHON_FALLTHROUGH;
1982  case 1:
1983  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lut_filepath)) != 0)) kw_args--;
1984  else {
1985  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 35, __pyx_L3_error)
1986  }
1987  CYTHON_FALLTHROUGH;
1988  case 2:
1989  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode)) != 0)) kw_args--;
1990  else {
1991  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 35, __pyx_L3_error)
1992  }
1993  }
1994  if (unlikely(kw_args > 0)) {
1995  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 35, __pyx_L3_error)
1996  }
1997  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
1998  goto __pyx_L5_argtuple_error;
1999  } else {
2000  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2001  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2002  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2003  }
2004  __pyx_v_self = values[0];
2005  __pyx_v_lut_filepath = values[1];
2006  __pyx_v_mode = values[2];
2007  }
2008  goto __pyx_L4_argument_unpacking_done;
2009  __pyx_L5_argtuple_error:;
2010  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 35, __pyx_L3_error)
2011  __pyx_L3_error:;
2012  __Pyx_AddTraceback("dbocean.dbocean.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2013  __Pyx_RefNannyFinishContext();
2014  return NULL;
2015  __pyx_L4_argument_unpacking_done:;
2016  __pyx_r = __pyx_pf_7dbocean_7dbocean___init__(__pyx_self, __pyx_v_self, __pyx_v_lut_filepath, __pyx_v_mode);
2017 
2018  /* function exit code */
2019  __Pyx_RefNannyFinishContext();
2020  return __pyx_r;
2021 }
2022 
2023 static PyObject *__pyx_pf_7dbocean_7dbocean___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_lut_filepath, PyObject *__pyx_v_mode) {
2024  PyObject *__pyx_v_fmf_pts = NULL;
2025  PyObject *__pyx_v_raa_pts = NULL;
2026  PyObject *__pyx_v_vza_pts = NULL;
2027  PyObject *__pyx_v_sza_pts = NULL;
2028  PyObject *__pyx_v_wnd_pts = NULL;
2029  PyObject *__pyx_v_chl_pts = NULL;
2030  PyObject *__pyx_v_aot_pts = NULL;
2031  PyObject *__pyx_v_inst = NULL;
2032  PyObject *__pyx_r = NULL;
2033  __Pyx_RefNannyDeclarations
2034  PyObject *__pyx_t_1 = NULL;
2035  PyObject *__pyx_t_2 = NULL;
2036  PyObject *__pyx_t_3 = NULL;
2037  PyObject *__pyx_t_4 = NULL;
2038  PyObject *__pyx_t_5 = NULL;
2039  PyObject *__pyx_t_6 = NULL;
2040  PyObject *__pyx_t_7 = NULL;
2041  PyObject *__pyx_t_8 = NULL;
2042  PyObject *__pyx_t_9 = NULL;
2043  PyObject *__pyx_t_10 = NULL;
2044  PyObject *__pyx_t_11 = NULL;
2045  PyObject *__pyx_t_12 = NULL;
2046  PyObject *__pyx_t_13 = NULL;
2047  PyObject *__pyx_t_14 = NULL;
2048  int __pyx_t_15;
2049  int __pyx_t_16;
2050  int __pyx_t_17;
2051  int __pyx_t_18;
2052  char const *__pyx_t_19;
2053  PyObject *__pyx_t_20 = NULL;
2054  PyObject *__pyx_t_21 = NULL;
2055  PyObject *__pyx_t_22 = NULL;
2056  PyObject *__pyx_t_23 = NULL;
2057  PyObject *__pyx_t_24 = NULL;
2058  PyObject *__pyx_t_25 = NULL;
2059  int __pyx_lineno = 0;
2060  const char *__pyx_filename = NULL;
2061  int __pyx_clineno = 0;
2062  __Pyx_RefNannySetupContext("__init__", 0);
2063 
2064  /* "dbocean.pyx":36
2065  *
2066  * def __init__(self, lut_filepath, mode):
2067  * print ("Reading Deepblue LUT: " + lut_filepath) # <<<<<<<<<<<<<<
2068  * self.mode = mode
2069  * self.chlc = -2.0
2070  */
2071  __pyx_t_1 = PyNumber_Add(__pyx_kp_u_Reading_Deepblue_LUT, __pyx_v_lut_filepath); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
2072  __Pyx_GOTREF(__pyx_t_1);
2073  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)
2074  __Pyx_GOTREF(__pyx_t_2);
2075  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2076  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2077 
2078  /* "dbocean.pyx":37
2079  * def __init__(self, lut_filepath, mode):
2080  * print ("Reading Deepblue LUT: " + lut_filepath)
2081  * self.mode = mode # <<<<<<<<<<<<<<
2082  * self.chlc = -2.0
2083  * self.wndc = 1.0
2084  */
2085  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mode, __pyx_v_mode) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
2086 
2087  /* "dbocean.pyx":38
2088  * print ("Reading Deepblue LUT: " + lut_filepath)
2089  * self.mode = mode
2090  * self.chlc = -2.0 # <<<<<<<<<<<<<<
2091  * self.wndc = 1.0
2092  * self.lut = np.zeros((NWL,NCHL,NWS,NFMF,NAOT,NRAA,NVZA,NSZA))
2093  */
2094  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_chlc, __pyx_float_neg_2_0) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
2095 
2096  /* "dbocean.pyx":39
2097  * self.mode = mode
2098  * self.chlc = -2.0
2099  * self.wndc = 1.0 # <<<<<<<<<<<<<<
2100  * self.lut = np.zeros((NWL,NCHL,NWS,NFMF,NAOT,NRAA,NVZA,NSZA))
2101  * fmf_pts = np.zeros((NFMF))
2102  */
2103  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wndc, __pyx_float_1_0) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
2104 
2105  /* "dbocean.pyx":40
2106  * self.chlc = -2.0
2107  * self.wndc = 1.0
2108  * self.lut = np.zeros((NWL,NCHL,NWS,NFMF,NAOT,NRAA,NVZA,NSZA)) # <<<<<<<<<<<<<<
2109  * fmf_pts = np.zeros((NFMF))
2110  * try:
2111  */
2112  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
2113  __Pyx_GOTREF(__pyx_t_1);
2114  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 40, __pyx_L1_error)
2115  __Pyx_GOTREF(__pyx_t_3);
2116  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2117  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NWL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
2118  __Pyx_GOTREF(__pyx_t_1);
2119  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NCHL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 40, __pyx_L1_error)
2120  __Pyx_GOTREF(__pyx_t_4);
2121  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NWS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 40, __pyx_L1_error)
2122  __Pyx_GOTREF(__pyx_t_5);
2123  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NFMF); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 40, __pyx_L1_error)
2124  __Pyx_GOTREF(__pyx_t_6);
2125  __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NAOT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 40, __pyx_L1_error)
2126  __Pyx_GOTREF(__pyx_t_7);
2127  __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NRAA); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 40, __pyx_L1_error)
2128  __Pyx_GOTREF(__pyx_t_8);
2129  __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NVZA); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 40, __pyx_L1_error)
2130  __Pyx_GOTREF(__pyx_t_9);
2131  __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NSZA); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 40, __pyx_L1_error)
2132  __Pyx_GOTREF(__pyx_t_10);
2133  __pyx_t_11 = PyTuple_New(8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 40, __pyx_L1_error)
2134  __Pyx_GOTREF(__pyx_t_11);
2135  __Pyx_GIVEREF(__pyx_t_1);
2136  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1);
2137  __Pyx_GIVEREF(__pyx_t_4);
2138  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_4);
2139  __Pyx_GIVEREF(__pyx_t_5);
2140  PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_5);
2141  __Pyx_GIVEREF(__pyx_t_6);
2142  PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_6);
2143  __Pyx_GIVEREF(__pyx_t_7);
2144  PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_t_7);
2145  __Pyx_GIVEREF(__pyx_t_8);
2146  PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_t_8);
2147  __Pyx_GIVEREF(__pyx_t_9);
2148  PyTuple_SET_ITEM(__pyx_t_11, 6, __pyx_t_9);
2149  __Pyx_GIVEREF(__pyx_t_10);
2150  PyTuple_SET_ITEM(__pyx_t_11, 7, __pyx_t_10);
2151  __pyx_t_1 = 0;
2152  __pyx_t_4 = 0;
2153  __pyx_t_5 = 0;
2154  __pyx_t_6 = 0;
2155  __pyx_t_7 = 0;
2156  __pyx_t_8 = 0;
2157  __pyx_t_9 = 0;
2158  __pyx_t_10 = 0;
2159  __pyx_t_10 = NULL;
2160  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
2161  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
2162  if (likely(__pyx_t_10)) {
2163  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
2164  __Pyx_INCREF(__pyx_t_10);
2165  __Pyx_INCREF(function);
2166  __Pyx_DECREF_SET(__pyx_t_3, function);
2167  }
2168  }
2169  __pyx_t_2 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_11);
2170  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
2171  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2172  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
2173  __Pyx_GOTREF(__pyx_t_2);
2174  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2175  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lut, __pyx_t_2) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
2176  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2177 
2178  /* "dbocean.pyx":41
2179  * self.wndc = 1.0
2180  * self.lut = np.zeros((NWL,NCHL,NWS,NFMF,NAOT,NRAA,NVZA,NSZA))
2181  * fmf_pts = np.zeros((NFMF)) # <<<<<<<<<<<<<<
2182  * try:
2183  * self.lut[W470][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m03']
2184  */
2185  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error)
2186  __Pyx_GOTREF(__pyx_t_3);
2187  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 41, __pyx_L1_error)
2188  __Pyx_GOTREF(__pyx_t_11);
2189  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2190  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NFMF); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error)
2191  __Pyx_GOTREF(__pyx_t_3);
2192  __pyx_t_10 = NULL;
2193  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
2194  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
2195  if (likely(__pyx_t_10)) {
2196  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
2197  __Pyx_INCREF(__pyx_t_10);
2198  __Pyx_INCREF(function);
2199  __Pyx_DECREF_SET(__pyx_t_11, function);
2200  }
2201  }
2202  __pyx_t_2 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_10, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_3);
2203  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
2204  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2205  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
2206  __Pyx_GOTREF(__pyx_t_2);
2207  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2208  __pyx_v_fmf_pts = __pyx_t_2;
2209  __pyx_t_2 = 0;
2210 
2211  /* "dbocean.pyx":42
2212  * self.lut = np.zeros((NWL,NCHL,NWS,NFMF,NAOT,NRAA,NVZA,NSZA))
2213  * fmf_pts = np.zeros((NFMF))
2214  * try: # <<<<<<<<<<<<<<
2215  * self.lut[W470][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m03']
2216  * self.lut[W470][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m03']
2217  */
2218  {
2219  __Pyx_PyThreadState_declare
2220  __Pyx_PyThreadState_assign
2221  __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
2222  __Pyx_XGOTREF(__pyx_t_12);
2223  __Pyx_XGOTREF(__pyx_t_13);
2224  __Pyx_XGOTREF(__pyx_t_14);
2225  /*try:*/ {
2226 
2227  /* "dbocean.pyx":43
2228  * fmf_pts = np.zeros((NFMF))
2229  * try:
2230  * self.lut[W470][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m03'] # <<<<<<<<<<<<<<
2231  * self.lut[W470][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m03']
2232  * self.lut[W470][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m03']
2233  */
2234  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_xr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L3_error)
2235  __Pyx_GOTREF(__pyx_t_2);
2236  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 43, __pyx_L3_error)
2237  __Pyx_GOTREF(__pyx_t_11);
2238  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2239  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L3_error)
2240  __Pyx_GOTREF(__pyx_t_2);
2241  __Pyx_INCREF(__pyx_v_lut_filepath);
2242  __Pyx_GIVEREF(__pyx_v_lut_filepath);
2243  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lut_filepath);
2244  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 43, __pyx_L3_error)
2245  __Pyx_GOTREF(__pyx_t_3);
2246  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_DUST) < 0) __PYX_ERR(0, 43, __pyx_L3_error)
2247  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 43, __pyx_L3_error)
2248  __Pyx_GOTREF(__pyx_t_10);
2249  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2250  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2251  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2252  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_u_IoverF_m03); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 43, __pyx_L3_error)
2253  __Pyx_GOTREF(__pyx_t_3);
2254  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2255  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 43, __pyx_L3_error)
2256  __Pyx_GOTREF(__pyx_t_10);
2257  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_10, __pyx_v_7dbocean_W470, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L3_error)
2258  __Pyx_GOTREF(__pyx_t_2);
2259  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2260  __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NF1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 43, __pyx_L3_error)
2261  __Pyx_GOTREF(__pyx_t_10);
2262  __pyx_t_11 = PySlice_New(__pyx_int_0, __pyx_t_10, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 43, __pyx_L3_error)
2263  __Pyx_GOTREF(__pyx_t_11);
2264  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2265  __pyx_t_10 = PyTuple_New(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 43, __pyx_L3_error)
2266  __Pyx_GOTREF(__pyx_t_10);
2267  __Pyx_INCREF(__pyx_slice_);
2268  __Pyx_GIVEREF(__pyx_slice_);
2269  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_slice_);
2270  __Pyx_INCREF(__pyx_slice_);
2271  __Pyx_GIVEREF(__pyx_slice_);
2272  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_slice_);
2273  __Pyx_GIVEREF(__pyx_t_11);
2274  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_11);
2275  __Pyx_INCREF(__pyx_slice_);
2276  __Pyx_GIVEREF(__pyx_slice_);
2277  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_slice_);
2278  __Pyx_INCREF(__pyx_slice_);
2279  __Pyx_GIVEREF(__pyx_slice_);
2280  PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_slice_);
2281  __Pyx_INCREF(__pyx_slice_);
2282  __Pyx_GIVEREF(__pyx_slice_);
2283  PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_slice_);
2284  __Pyx_INCREF(__pyx_slice_);
2285  __Pyx_GIVEREF(__pyx_slice_);
2286  PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_slice_);
2287  __pyx_t_11 = 0;
2288  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_t_10, __pyx_t_3) < 0)) __PYX_ERR(0, 43, __pyx_L3_error)
2289  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2290  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2291  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2292 
2293  /* "dbocean.pyx":44
2294  * try:
2295  * self.lut[W470][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m03']
2296  * self.lut[W470][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m03'] # <<<<<<<<<<<<<<
2297  * self.lut[W470][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m03']
2298  * self.lut[W550][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m04']
2299  */
2300  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_xr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 44, __pyx_L3_error)
2301  __Pyx_GOTREF(__pyx_t_3);
2302  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 44, __pyx_L3_error)
2303  __Pyx_GOTREF(__pyx_t_10);
2304  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2305  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 44, __pyx_L3_error)
2306  __Pyx_GOTREF(__pyx_t_3);
2307  __Pyx_INCREF(__pyx_v_lut_filepath);
2308  __Pyx_GIVEREF(__pyx_v_lut_filepath);
2309  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lut_filepath);
2310  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L3_error)
2311  __Pyx_GOTREF(__pyx_t_2);
2312  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_MIXED) < 0) __PYX_ERR(0, 44, __pyx_L3_error)
2313  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 44, __pyx_L3_error)
2314  __Pyx_GOTREF(__pyx_t_11);
2315  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2316  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2317  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2318  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_11, __pyx_n_u_IoverF_m03); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L3_error)
2319  __Pyx_GOTREF(__pyx_t_2);
2320  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2321  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 44, __pyx_L3_error)
2322  __Pyx_GOTREF(__pyx_t_11);
2323  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_11, __pyx_v_7dbocean_W470, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 44, __pyx_L3_error)
2324  __Pyx_GOTREF(__pyx_t_3);
2325  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2326  __pyx_t_11 = __Pyx_PyInt_From_long((__pyx_v_7dbocean_NF1 - 1)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 44, __pyx_L3_error)
2327  __Pyx_GOTREF(__pyx_t_11);
2328  __pyx_t_10 = __Pyx_PyInt_From_long((__pyx_v_7dbocean_NF2 - 1)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 44, __pyx_L3_error)
2329  __Pyx_GOTREF(__pyx_t_10);
2330  __pyx_t_9 = PySlice_New(__pyx_t_11, __pyx_t_10, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 44, __pyx_L3_error)
2331  __Pyx_GOTREF(__pyx_t_9);
2332  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2333  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2334  __pyx_t_10 = PyTuple_New(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 44, __pyx_L3_error)
2335  __Pyx_GOTREF(__pyx_t_10);
2336  __Pyx_INCREF(__pyx_slice_);
2337  __Pyx_GIVEREF(__pyx_slice_);
2338  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_slice_);
2339  __Pyx_INCREF(__pyx_slice_);
2340  __Pyx_GIVEREF(__pyx_slice_);
2341  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_slice_);
2342  __Pyx_GIVEREF(__pyx_t_9);
2343  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_9);
2344  __Pyx_INCREF(__pyx_slice_);
2345  __Pyx_GIVEREF(__pyx_slice_);
2346  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_slice_);
2347  __Pyx_INCREF(__pyx_slice_);
2348  __Pyx_GIVEREF(__pyx_slice_);
2349  PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_slice_);
2350  __Pyx_INCREF(__pyx_slice_);
2351  __Pyx_GIVEREF(__pyx_slice_);
2352  PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_slice_);
2353  __Pyx_INCREF(__pyx_slice_);
2354  __Pyx_GIVEREF(__pyx_slice_);
2355  PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_slice_);
2356  __pyx_t_9 = 0;
2357  if (unlikely(PyObject_SetItem(__pyx_t_3, __pyx_t_10, __pyx_t_2) < 0)) __PYX_ERR(0, 44, __pyx_L3_error)
2358  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2359  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2360  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2361 
2362  /* "dbocean.pyx":45
2363  * self.lut[W470][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m03']
2364  * self.lut[W470][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m03']
2365  * self.lut[W470][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m03'] # <<<<<<<<<<<<<<
2366  * self.lut[W550][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m04']
2367  * self.lut[W550][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m04']
2368  */
2369  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_xr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L3_error)
2370  __Pyx_GOTREF(__pyx_t_2);
2371  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 45, __pyx_L3_error)
2372  __Pyx_GOTREF(__pyx_t_10);
2373  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2374  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L3_error)
2375  __Pyx_GOTREF(__pyx_t_2);
2376  __Pyx_INCREF(__pyx_v_lut_filepath);
2377  __Pyx_GIVEREF(__pyx_v_lut_filepath);
2378  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lut_filepath);
2379  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 45, __pyx_L3_error)
2380  __Pyx_GOTREF(__pyx_t_3);
2381  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_FINE) < 0) __PYX_ERR(0, 45, __pyx_L3_error)
2382  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 45, __pyx_L3_error)
2383  __Pyx_GOTREF(__pyx_t_9);
2384  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2385  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2386  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2387  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_9, __pyx_n_u_IoverF_m03); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 45, __pyx_L3_error)
2388  __Pyx_GOTREF(__pyx_t_3);
2389  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
2390  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 45, __pyx_L3_error)
2391  __Pyx_GOTREF(__pyx_t_9);
2392  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_9, __pyx_v_7dbocean_W470, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L3_error)
2393  __Pyx_GOTREF(__pyx_t_2);
2394  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
2395  __pyx_t_9 = __Pyx_PyInt_From_long((__pyx_v_7dbocean_NF2 - 2)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 45, __pyx_L3_error)
2396  __Pyx_GOTREF(__pyx_t_9);
2397  __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NFMF); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 45, __pyx_L3_error)
2398  __Pyx_GOTREF(__pyx_t_10);
2399  __pyx_t_11 = PySlice_New(__pyx_t_9, __pyx_t_10, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 45, __pyx_L3_error)
2400  __Pyx_GOTREF(__pyx_t_11);
2401  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
2402  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2403  __pyx_t_10 = PyTuple_New(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 45, __pyx_L3_error)
2404  __Pyx_GOTREF(__pyx_t_10);
2405  __Pyx_INCREF(__pyx_slice_);
2406  __Pyx_GIVEREF(__pyx_slice_);
2407  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_slice_);
2408  __Pyx_INCREF(__pyx_slice_);
2409  __Pyx_GIVEREF(__pyx_slice_);
2410  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_slice_);
2411  __Pyx_GIVEREF(__pyx_t_11);
2412  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_11);
2413  __Pyx_INCREF(__pyx_slice_);
2414  __Pyx_GIVEREF(__pyx_slice_);
2415  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_slice_);
2416  __Pyx_INCREF(__pyx_slice_);
2417  __Pyx_GIVEREF(__pyx_slice_);
2418  PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_slice_);
2419  __Pyx_INCREF(__pyx_slice_);
2420  __Pyx_GIVEREF(__pyx_slice_);
2421  PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_slice_);
2422  __Pyx_INCREF(__pyx_slice_);
2423  __Pyx_GIVEREF(__pyx_slice_);
2424  PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_slice_);
2425  __pyx_t_11 = 0;
2426  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_t_10, __pyx_t_3) < 0)) __PYX_ERR(0, 45, __pyx_L3_error)
2427  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2428  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2429  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2430 
2431  /* "dbocean.pyx":46
2432  * self.lut[W470][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m03']
2433  * self.lut[W470][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m03']
2434  * self.lut[W550][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m04'] # <<<<<<<<<<<<<<
2435  * self.lut[W550][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m04']
2436  * self.lut[W550][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m04']
2437  */
2438  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_xr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 46, __pyx_L3_error)
2439  __Pyx_GOTREF(__pyx_t_3);
2440  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 46, __pyx_L3_error)
2441  __Pyx_GOTREF(__pyx_t_10);
2442  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2443  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 46, __pyx_L3_error)
2444  __Pyx_GOTREF(__pyx_t_3);
2445  __Pyx_INCREF(__pyx_v_lut_filepath);
2446  __Pyx_GIVEREF(__pyx_v_lut_filepath);
2447  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lut_filepath);
2448  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L3_error)
2449  __Pyx_GOTREF(__pyx_t_2);
2450  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_DUST) < 0) __PYX_ERR(0, 46, __pyx_L3_error)
2451  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 46, __pyx_L3_error)
2452  __Pyx_GOTREF(__pyx_t_11);
2453  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2454  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2455  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2456  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_11, __pyx_n_u_IoverF_m04); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L3_error)
2457  __Pyx_GOTREF(__pyx_t_2);
2458  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2459  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 46, __pyx_L3_error)
2460  __Pyx_GOTREF(__pyx_t_11);
2461  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_11, __pyx_v_7dbocean_W550, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 46, __pyx_L3_error)
2462  __Pyx_GOTREF(__pyx_t_3);
2463  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2464  __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NF1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 46, __pyx_L3_error)
2465  __Pyx_GOTREF(__pyx_t_11);
2466  __pyx_t_10 = PySlice_New(__pyx_int_0, __pyx_t_11, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 46, __pyx_L3_error)
2467  __Pyx_GOTREF(__pyx_t_10);
2468  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2469  __pyx_t_11 = PyTuple_New(7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 46, __pyx_L3_error)
2470  __Pyx_GOTREF(__pyx_t_11);
2471  __Pyx_INCREF(__pyx_slice_);
2472  __Pyx_GIVEREF(__pyx_slice_);
2473  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_slice_);
2474  __Pyx_INCREF(__pyx_slice_);
2475  __Pyx_GIVEREF(__pyx_slice_);
2476  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_slice_);
2477  __Pyx_GIVEREF(__pyx_t_10);
2478  PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_10);
2479  __Pyx_INCREF(__pyx_slice_);
2480  __Pyx_GIVEREF(__pyx_slice_);
2481  PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_slice_);
2482  __Pyx_INCREF(__pyx_slice_);
2483  __Pyx_GIVEREF(__pyx_slice_);
2484  PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_slice_);
2485  __Pyx_INCREF(__pyx_slice_);
2486  __Pyx_GIVEREF(__pyx_slice_);
2487  PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_slice_);
2488  __Pyx_INCREF(__pyx_slice_);
2489  __Pyx_GIVEREF(__pyx_slice_);
2490  PyTuple_SET_ITEM(__pyx_t_11, 6, __pyx_slice_);
2491  __pyx_t_10 = 0;
2492  if (unlikely(PyObject_SetItem(__pyx_t_3, __pyx_t_11, __pyx_t_2) < 0)) __PYX_ERR(0, 46, __pyx_L3_error)
2493  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2494  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2495  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2496 
2497  /* "dbocean.pyx":47
2498  * self.lut[W470][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m03']
2499  * self.lut[W550][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m04']
2500  * self.lut[W550][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m04'] # <<<<<<<<<<<<<<
2501  * self.lut[W550][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m04']
2502  * self.lut[W659][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m05']
2503  */
2504  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_xr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L3_error)
2505  __Pyx_GOTREF(__pyx_t_2);
2506  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 47, __pyx_L3_error)
2507  __Pyx_GOTREF(__pyx_t_11);
2508  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2509  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L3_error)
2510  __Pyx_GOTREF(__pyx_t_2);
2511  __Pyx_INCREF(__pyx_v_lut_filepath);
2512  __Pyx_GIVEREF(__pyx_v_lut_filepath);
2513  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lut_filepath);
2514  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 47, __pyx_L3_error)
2515  __Pyx_GOTREF(__pyx_t_3);
2516  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_MIXED) < 0) __PYX_ERR(0, 47, __pyx_L3_error)
2517  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 47, __pyx_L3_error)
2518  __Pyx_GOTREF(__pyx_t_10);
2519  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2520  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2521  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2522  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_u_IoverF_m04); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 47, __pyx_L3_error)
2523  __Pyx_GOTREF(__pyx_t_3);
2524  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2525  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 47, __pyx_L3_error)
2526  __Pyx_GOTREF(__pyx_t_10);
2527  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_10, __pyx_v_7dbocean_W550, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L3_error)
2528  __Pyx_GOTREF(__pyx_t_2);
2529  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2530  __pyx_t_10 = __Pyx_PyInt_From_long((__pyx_v_7dbocean_NF1 - 1)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 47, __pyx_L3_error)
2531  __Pyx_GOTREF(__pyx_t_10);
2532  __pyx_t_11 = __Pyx_PyInt_From_long((__pyx_v_7dbocean_NF2 - 1)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 47, __pyx_L3_error)
2533  __Pyx_GOTREF(__pyx_t_11);
2534  __pyx_t_9 = PySlice_New(__pyx_t_10, __pyx_t_11, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 47, __pyx_L3_error)
2535  __Pyx_GOTREF(__pyx_t_9);
2536  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2537  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2538  __pyx_t_11 = PyTuple_New(7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 47, __pyx_L3_error)
2539  __Pyx_GOTREF(__pyx_t_11);
2540  __Pyx_INCREF(__pyx_slice_);
2541  __Pyx_GIVEREF(__pyx_slice_);
2542  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_slice_);
2543  __Pyx_INCREF(__pyx_slice_);
2544  __Pyx_GIVEREF(__pyx_slice_);
2545  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_slice_);
2546  __Pyx_GIVEREF(__pyx_t_9);
2547  PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_9);
2548  __Pyx_INCREF(__pyx_slice_);
2549  __Pyx_GIVEREF(__pyx_slice_);
2550  PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_slice_);
2551  __Pyx_INCREF(__pyx_slice_);
2552  __Pyx_GIVEREF(__pyx_slice_);
2553  PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_slice_);
2554  __Pyx_INCREF(__pyx_slice_);
2555  __Pyx_GIVEREF(__pyx_slice_);
2556  PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_slice_);
2557  __Pyx_INCREF(__pyx_slice_);
2558  __Pyx_GIVEREF(__pyx_slice_);
2559  PyTuple_SET_ITEM(__pyx_t_11, 6, __pyx_slice_);
2560  __pyx_t_9 = 0;
2561  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_t_11, __pyx_t_3) < 0)) __PYX_ERR(0, 47, __pyx_L3_error)
2562  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2563  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2564  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2565 
2566  /* "dbocean.pyx":48
2567  * self.lut[W550][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m04']
2568  * self.lut[W550][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m04']
2569  * self.lut[W550][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m04'] # <<<<<<<<<<<<<<
2570  * self.lut[W659][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m05']
2571  * self.lut[W659][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m05']
2572  */
2573  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_xr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 48, __pyx_L3_error)
2574  __Pyx_GOTREF(__pyx_t_3);
2575  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 48, __pyx_L3_error)
2576  __Pyx_GOTREF(__pyx_t_11);
2577  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2578  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 48, __pyx_L3_error)
2579  __Pyx_GOTREF(__pyx_t_3);
2580  __Pyx_INCREF(__pyx_v_lut_filepath);
2581  __Pyx_GIVEREF(__pyx_v_lut_filepath);
2582  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lut_filepath);
2583  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L3_error)
2584  __Pyx_GOTREF(__pyx_t_2);
2585  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_FINE) < 0) __PYX_ERR(0, 48, __pyx_L3_error)
2586  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 48, __pyx_L3_error)
2587  __Pyx_GOTREF(__pyx_t_9);
2588  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2589  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2590  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2591  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_9, __pyx_n_u_IoverF_m04); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L3_error)
2592  __Pyx_GOTREF(__pyx_t_2);
2593  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
2594  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 48, __pyx_L3_error)
2595  __Pyx_GOTREF(__pyx_t_9);
2596  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_9, __pyx_v_7dbocean_W550, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 48, __pyx_L3_error)
2597  __Pyx_GOTREF(__pyx_t_3);
2598  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
2599  __pyx_t_9 = __Pyx_PyInt_From_long((__pyx_v_7dbocean_NF2 - 2)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 48, __pyx_L3_error)
2600  __Pyx_GOTREF(__pyx_t_9);
2601  __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NFMF); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 48, __pyx_L3_error)
2602  __Pyx_GOTREF(__pyx_t_11);
2603  __pyx_t_10 = PySlice_New(__pyx_t_9, __pyx_t_11, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 48, __pyx_L3_error)
2604  __Pyx_GOTREF(__pyx_t_10);
2605  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
2606  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2607  __pyx_t_11 = PyTuple_New(7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 48, __pyx_L3_error)
2608  __Pyx_GOTREF(__pyx_t_11);
2609  __Pyx_INCREF(__pyx_slice_);
2610  __Pyx_GIVEREF(__pyx_slice_);
2611  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_slice_);
2612  __Pyx_INCREF(__pyx_slice_);
2613  __Pyx_GIVEREF(__pyx_slice_);
2614  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_slice_);
2615  __Pyx_GIVEREF(__pyx_t_10);
2616  PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_10);
2617  __Pyx_INCREF(__pyx_slice_);
2618  __Pyx_GIVEREF(__pyx_slice_);
2619  PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_slice_);
2620  __Pyx_INCREF(__pyx_slice_);
2621  __Pyx_GIVEREF(__pyx_slice_);
2622  PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_slice_);
2623  __Pyx_INCREF(__pyx_slice_);
2624  __Pyx_GIVEREF(__pyx_slice_);
2625  PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_slice_);
2626  __Pyx_INCREF(__pyx_slice_);
2627  __Pyx_GIVEREF(__pyx_slice_);
2628  PyTuple_SET_ITEM(__pyx_t_11, 6, __pyx_slice_);
2629  __pyx_t_10 = 0;
2630  if (unlikely(PyObject_SetItem(__pyx_t_3, __pyx_t_11, __pyx_t_2) < 0)) __PYX_ERR(0, 48, __pyx_L3_error)
2631  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2632  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2633  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2634 
2635  /* "dbocean.pyx":49
2636  * self.lut[W550][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m04']
2637  * self.lut[W550][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m04']
2638  * self.lut[W659][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m05'] # <<<<<<<<<<<<<<
2639  * self.lut[W659][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m05']
2640  * self.lut[W659][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m05']
2641  */
2642  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_xr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L3_error)
2643  __Pyx_GOTREF(__pyx_t_2);
2644  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 49, __pyx_L3_error)
2645  __Pyx_GOTREF(__pyx_t_11);
2646  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2647  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L3_error)
2648  __Pyx_GOTREF(__pyx_t_2);
2649  __Pyx_INCREF(__pyx_v_lut_filepath);
2650  __Pyx_GIVEREF(__pyx_v_lut_filepath);
2651  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lut_filepath);
2652  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 49, __pyx_L3_error)
2653  __Pyx_GOTREF(__pyx_t_3);
2654  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_DUST) < 0) __PYX_ERR(0, 49, __pyx_L3_error)
2655  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 49, __pyx_L3_error)
2656  __Pyx_GOTREF(__pyx_t_10);
2657  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2658  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2659  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2660  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_u_IoverF_m05); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 49, __pyx_L3_error)
2661  __Pyx_GOTREF(__pyx_t_3);
2662  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2663  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 49, __pyx_L3_error)
2664  __Pyx_GOTREF(__pyx_t_10);
2665  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_10, __pyx_v_7dbocean_W659, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L3_error)
2666  __Pyx_GOTREF(__pyx_t_2);
2667  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2668  __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NF1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 49, __pyx_L3_error)
2669  __Pyx_GOTREF(__pyx_t_10);
2670  __pyx_t_11 = PySlice_New(__pyx_int_0, __pyx_t_10, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 49, __pyx_L3_error)
2671  __Pyx_GOTREF(__pyx_t_11);
2672  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2673  __pyx_t_10 = PyTuple_New(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 49, __pyx_L3_error)
2674  __Pyx_GOTREF(__pyx_t_10);
2675  __Pyx_INCREF(__pyx_slice_);
2676  __Pyx_GIVEREF(__pyx_slice_);
2677  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_slice_);
2678  __Pyx_INCREF(__pyx_slice_);
2679  __Pyx_GIVEREF(__pyx_slice_);
2680  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_slice_);
2681  __Pyx_GIVEREF(__pyx_t_11);
2682  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_11);
2683  __Pyx_INCREF(__pyx_slice_);
2684  __Pyx_GIVEREF(__pyx_slice_);
2685  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_slice_);
2686  __Pyx_INCREF(__pyx_slice_);
2687  __Pyx_GIVEREF(__pyx_slice_);
2688  PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_slice_);
2689  __Pyx_INCREF(__pyx_slice_);
2690  __Pyx_GIVEREF(__pyx_slice_);
2691  PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_slice_);
2692  __Pyx_INCREF(__pyx_slice_);
2693  __Pyx_GIVEREF(__pyx_slice_);
2694  PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_slice_);
2695  __pyx_t_11 = 0;
2696  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_t_10, __pyx_t_3) < 0)) __PYX_ERR(0, 49, __pyx_L3_error)
2697  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2698  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2699  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2700 
2701  /* "dbocean.pyx":50
2702  * self.lut[W550][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m04']
2703  * self.lut[W659][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m05']
2704  * self.lut[W659][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m05'] # <<<<<<<<<<<<<<
2705  * self.lut[W659][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m05']
2706  * self.lut[W860][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m07']
2707  */
2708  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_xr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L3_error)
2709  __Pyx_GOTREF(__pyx_t_3);
2710  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 50, __pyx_L3_error)
2711  __Pyx_GOTREF(__pyx_t_10);
2712  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2713  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L3_error)
2714  __Pyx_GOTREF(__pyx_t_3);
2715  __Pyx_INCREF(__pyx_v_lut_filepath);
2716  __Pyx_GIVEREF(__pyx_v_lut_filepath);
2717  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lut_filepath);
2718  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L3_error)
2719  __Pyx_GOTREF(__pyx_t_2);
2720  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_MIXED) < 0) __PYX_ERR(0, 50, __pyx_L3_error)
2721  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 50, __pyx_L3_error)
2722  __Pyx_GOTREF(__pyx_t_11);
2723  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2724  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2725  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2726  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_11, __pyx_n_u_IoverF_m05); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L3_error)
2727  __Pyx_GOTREF(__pyx_t_2);
2728  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2729  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 50, __pyx_L3_error)
2730  __Pyx_GOTREF(__pyx_t_11);
2731  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_11, __pyx_v_7dbocean_W659, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L3_error)
2732  __Pyx_GOTREF(__pyx_t_3);
2733  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2734  __pyx_t_11 = __Pyx_PyInt_From_long((__pyx_v_7dbocean_NF1 - 1)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 50, __pyx_L3_error)
2735  __Pyx_GOTREF(__pyx_t_11);
2736  __pyx_t_10 = __Pyx_PyInt_From_long((__pyx_v_7dbocean_NF2 - 1)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 50, __pyx_L3_error)
2737  __Pyx_GOTREF(__pyx_t_10);
2738  __pyx_t_9 = PySlice_New(__pyx_t_11, __pyx_t_10, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 50, __pyx_L3_error)
2739  __Pyx_GOTREF(__pyx_t_9);
2740  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2741  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2742  __pyx_t_10 = PyTuple_New(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 50, __pyx_L3_error)
2743  __Pyx_GOTREF(__pyx_t_10);
2744  __Pyx_INCREF(__pyx_slice_);
2745  __Pyx_GIVEREF(__pyx_slice_);
2746  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_slice_);
2747  __Pyx_INCREF(__pyx_slice_);
2748  __Pyx_GIVEREF(__pyx_slice_);
2749  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_slice_);
2750  __Pyx_GIVEREF(__pyx_t_9);
2751  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_9);
2752  __Pyx_INCREF(__pyx_slice_);
2753  __Pyx_GIVEREF(__pyx_slice_);
2754  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_slice_);
2755  __Pyx_INCREF(__pyx_slice_);
2756  __Pyx_GIVEREF(__pyx_slice_);
2757  PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_slice_);
2758  __Pyx_INCREF(__pyx_slice_);
2759  __Pyx_GIVEREF(__pyx_slice_);
2760  PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_slice_);
2761  __Pyx_INCREF(__pyx_slice_);
2762  __Pyx_GIVEREF(__pyx_slice_);
2763  PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_slice_);
2764  __pyx_t_9 = 0;
2765  if (unlikely(PyObject_SetItem(__pyx_t_3, __pyx_t_10, __pyx_t_2) < 0)) __PYX_ERR(0, 50, __pyx_L3_error)
2766  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2767  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2768  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2769 
2770  /* "dbocean.pyx":51
2771  * self.lut[W659][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m05']
2772  * self.lut[W659][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m05']
2773  * self.lut[W659][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m05'] # <<<<<<<<<<<<<<
2774  * self.lut[W860][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m07']
2775  * self.lut[W860][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m07']
2776  */
2777  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_xr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L3_error)
2778  __Pyx_GOTREF(__pyx_t_2);
2779  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 51, __pyx_L3_error)
2780  __Pyx_GOTREF(__pyx_t_10);
2781  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2782  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L3_error)
2783  __Pyx_GOTREF(__pyx_t_2);
2784  __Pyx_INCREF(__pyx_v_lut_filepath);
2785  __Pyx_GIVEREF(__pyx_v_lut_filepath);
2786  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lut_filepath);
2787  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 51, __pyx_L3_error)
2788  __Pyx_GOTREF(__pyx_t_3);
2789  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_FINE) < 0) __PYX_ERR(0, 51, __pyx_L3_error)
2790  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 51, __pyx_L3_error)
2791  __Pyx_GOTREF(__pyx_t_9);
2792  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2793  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2794  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2795  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_9, __pyx_n_u_IoverF_m05); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 51, __pyx_L3_error)
2796  __Pyx_GOTREF(__pyx_t_3);
2797  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
2798  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 51, __pyx_L3_error)
2799  __Pyx_GOTREF(__pyx_t_9);
2800  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_9, __pyx_v_7dbocean_W659, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L3_error)
2801  __Pyx_GOTREF(__pyx_t_2);
2802  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
2803  __pyx_t_9 = __Pyx_PyInt_From_long((__pyx_v_7dbocean_NF2 - 2)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 51, __pyx_L3_error)
2804  __Pyx_GOTREF(__pyx_t_9);
2805  __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NFMF); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 51, __pyx_L3_error)
2806  __Pyx_GOTREF(__pyx_t_10);
2807  __pyx_t_11 = PySlice_New(__pyx_t_9, __pyx_t_10, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 51, __pyx_L3_error)
2808  __Pyx_GOTREF(__pyx_t_11);
2809  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
2810  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2811  __pyx_t_10 = PyTuple_New(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 51, __pyx_L3_error)
2812  __Pyx_GOTREF(__pyx_t_10);
2813  __Pyx_INCREF(__pyx_slice_);
2814  __Pyx_GIVEREF(__pyx_slice_);
2815  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_slice_);
2816  __Pyx_INCREF(__pyx_slice_);
2817  __Pyx_GIVEREF(__pyx_slice_);
2818  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_slice_);
2819  __Pyx_GIVEREF(__pyx_t_11);
2820  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_11);
2821  __Pyx_INCREF(__pyx_slice_);
2822  __Pyx_GIVEREF(__pyx_slice_);
2823  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_slice_);
2824  __Pyx_INCREF(__pyx_slice_);
2825  __Pyx_GIVEREF(__pyx_slice_);
2826  PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_slice_);
2827  __Pyx_INCREF(__pyx_slice_);
2828  __Pyx_GIVEREF(__pyx_slice_);
2829  PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_slice_);
2830  __Pyx_INCREF(__pyx_slice_);
2831  __Pyx_GIVEREF(__pyx_slice_);
2832  PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_slice_);
2833  __pyx_t_11 = 0;
2834  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_t_10, __pyx_t_3) < 0)) __PYX_ERR(0, 51, __pyx_L3_error)
2835  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2836  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2837  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2838 
2839  /* "dbocean.pyx":52
2840  * self.lut[W659][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m05']
2841  * self.lut[W659][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m05']
2842  * self.lut[W860][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m07'] # <<<<<<<<<<<<<<
2843  * self.lut[W860][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m07']
2844  * self.lut[W860][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m07']
2845  */
2846  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_xr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 52, __pyx_L3_error)
2847  __Pyx_GOTREF(__pyx_t_3);
2848  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 52, __pyx_L3_error)
2849  __Pyx_GOTREF(__pyx_t_10);
2850  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2851  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 52, __pyx_L3_error)
2852  __Pyx_GOTREF(__pyx_t_3);
2853  __Pyx_INCREF(__pyx_v_lut_filepath);
2854  __Pyx_GIVEREF(__pyx_v_lut_filepath);
2855  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lut_filepath);
2856  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L3_error)
2857  __Pyx_GOTREF(__pyx_t_2);
2858  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_DUST) < 0) __PYX_ERR(0, 52, __pyx_L3_error)
2859  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 52, __pyx_L3_error)
2860  __Pyx_GOTREF(__pyx_t_11);
2861  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2862  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2863  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2864  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_11, __pyx_n_u_IoverF_m07); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L3_error)
2865  __Pyx_GOTREF(__pyx_t_2);
2866  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2867  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 52, __pyx_L3_error)
2868  __Pyx_GOTREF(__pyx_t_11);
2869  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_11, __pyx_v_7dbocean_W860, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 52, __pyx_L3_error)
2870  __Pyx_GOTREF(__pyx_t_3);
2871  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2872  __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NF1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 52, __pyx_L3_error)
2873  __Pyx_GOTREF(__pyx_t_11);
2874  __pyx_t_10 = PySlice_New(__pyx_int_0, __pyx_t_11, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 52, __pyx_L3_error)
2875  __Pyx_GOTREF(__pyx_t_10);
2876  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2877  __pyx_t_11 = PyTuple_New(7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 52, __pyx_L3_error)
2878  __Pyx_GOTREF(__pyx_t_11);
2879  __Pyx_INCREF(__pyx_slice_);
2880  __Pyx_GIVEREF(__pyx_slice_);
2881  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_slice_);
2882  __Pyx_INCREF(__pyx_slice_);
2883  __Pyx_GIVEREF(__pyx_slice_);
2884  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_slice_);
2885  __Pyx_GIVEREF(__pyx_t_10);
2886  PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_10);
2887  __Pyx_INCREF(__pyx_slice_);
2888  __Pyx_GIVEREF(__pyx_slice_);
2889  PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_slice_);
2890  __Pyx_INCREF(__pyx_slice_);
2891  __Pyx_GIVEREF(__pyx_slice_);
2892  PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_slice_);
2893  __Pyx_INCREF(__pyx_slice_);
2894  __Pyx_GIVEREF(__pyx_slice_);
2895  PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_slice_);
2896  __Pyx_INCREF(__pyx_slice_);
2897  __Pyx_GIVEREF(__pyx_slice_);
2898  PyTuple_SET_ITEM(__pyx_t_11, 6, __pyx_slice_);
2899  __pyx_t_10 = 0;
2900  if (unlikely(PyObject_SetItem(__pyx_t_3, __pyx_t_11, __pyx_t_2) < 0)) __PYX_ERR(0, 52, __pyx_L3_error)
2901  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2902  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2903  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2904 
2905  /* "dbocean.pyx":53
2906  * self.lut[W659][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m05']
2907  * self.lut[W860][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m07']
2908  * self.lut[W860][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m07'] # <<<<<<<<<<<<<<
2909  * self.lut[W860][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m07']
2910  * self.lut[W124][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m08']
2911  */
2912  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_xr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L3_error)
2913  __Pyx_GOTREF(__pyx_t_2);
2914  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 53, __pyx_L3_error)
2915  __Pyx_GOTREF(__pyx_t_11);
2916  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2917  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L3_error)
2918  __Pyx_GOTREF(__pyx_t_2);
2919  __Pyx_INCREF(__pyx_v_lut_filepath);
2920  __Pyx_GIVEREF(__pyx_v_lut_filepath);
2921  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lut_filepath);
2922  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 53, __pyx_L3_error)
2923  __Pyx_GOTREF(__pyx_t_3);
2924  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_MIXED) < 0) __PYX_ERR(0, 53, __pyx_L3_error)
2925  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 53, __pyx_L3_error)
2926  __Pyx_GOTREF(__pyx_t_10);
2927  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2928  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2929  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2930  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_u_IoverF_m07); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 53, __pyx_L3_error)
2931  __Pyx_GOTREF(__pyx_t_3);
2932  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2933  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 53, __pyx_L3_error)
2934  __Pyx_GOTREF(__pyx_t_10);
2935  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_10, __pyx_v_7dbocean_W860, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L3_error)
2936  __Pyx_GOTREF(__pyx_t_2);
2937  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2938  __pyx_t_10 = __Pyx_PyInt_From_long((__pyx_v_7dbocean_NF1 - 1)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 53, __pyx_L3_error)
2939  __Pyx_GOTREF(__pyx_t_10);
2940  __pyx_t_11 = __Pyx_PyInt_From_long((__pyx_v_7dbocean_NF2 - 1)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 53, __pyx_L3_error)
2941  __Pyx_GOTREF(__pyx_t_11);
2942  __pyx_t_9 = PySlice_New(__pyx_t_10, __pyx_t_11, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 53, __pyx_L3_error)
2943  __Pyx_GOTREF(__pyx_t_9);
2944  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
2945  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2946  __pyx_t_11 = PyTuple_New(7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 53, __pyx_L3_error)
2947  __Pyx_GOTREF(__pyx_t_11);
2948  __Pyx_INCREF(__pyx_slice_);
2949  __Pyx_GIVEREF(__pyx_slice_);
2950  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_slice_);
2951  __Pyx_INCREF(__pyx_slice_);
2952  __Pyx_GIVEREF(__pyx_slice_);
2953  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_slice_);
2954  __Pyx_GIVEREF(__pyx_t_9);
2955  PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_9);
2956  __Pyx_INCREF(__pyx_slice_);
2957  __Pyx_GIVEREF(__pyx_slice_);
2958  PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_slice_);
2959  __Pyx_INCREF(__pyx_slice_);
2960  __Pyx_GIVEREF(__pyx_slice_);
2961  PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_slice_);
2962  __Pyx_INCREF(__pyx_slice_);
2963  __Pyx_GIVEREF(__pyx_slice_);
2964  PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_slice_);
2965  __Pyx_INCREF(__pyx_slice_);
2966  __Pyx_GIVEREF(__pyx_slice_);
2967  PyTuple_SET_ITEM(__pyx_t_11, 6, __pyx_slice_);
2968  __pyx_t_9 = 0;
2969  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_t_11, __pyx_t_3) < 0)) __PYX_ERR(0, 53, __pyx_L3_error)
2970  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2971  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2972  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2973 
2974  /* "dbocean.pyx":54
2975  * self.lut[W860][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m07']
2976  * self.lut[W860][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m07']
2977  * self.lut[W860][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m07'] # <<<<<<<<<<<<<<
2978  * self.lut[W124][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m08']
2979  * self.lut[W124][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m08']
2980  */
2981  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_xr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L3_error)
2982  __Pyx_GOTREF(__pyx_t_3);
2983  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 54, __pyx_L3_error)
2984  __Pyx_GOTREF(__pyx_t_11);
2985  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2986  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L3_error)
2987  __Pyx_GOTREF(__pyx_t_3);
2988  __Pyx_INCREF(__pyx_v_lut_filepath);
2989  __Pyx_GIVEREF(__pyx_v_lut_filepath);
2990  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lut_filepath);
2991  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L3_error)
2992  __Pyx_GOTREF(__pyx_t_2);
2993  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_FINE) < 0) __PYX_ERR(0, 54, __pyx_L3_error)
2994  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 54, __pyx_L3_error)
2995  __Pyx_GOTREF(__pyx_t_9);
2996  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2997  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2998  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2999  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_9, __pyx_n_u_IoverF_m07); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L3_error)
3000  __Pyx_GOTREF(__pyx_t_2);
3001  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
3002  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 54, __pyx_L3_error)
3003  __Pyx_GOTREF(__pyx_t_9);
3004  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_9, __pyx_v_7dbocean_W860, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L3_error)
3005  __Pyx_GOTREF(__pyx_t_3);
3006  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
3007  __pyx_t_9 = __Pyx_PyInt_From_long((__pyx_v_7dbocean_NF2 - 2)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 54, __pyx_L3_error)
3008  __Pyx_GOTREF(__pyx_t_9);
3009  __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NFMF); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 54, __pyx_L3_error)
3010  __Pyx_GOTREF(__pyx_t_11);
3011  __pyx_t_10 = PySlice_New(__pyx_t_9, __pyx_t_11, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 54, __pyx_L3_error)
3012  __Pyx_GOTREF(__pyx_t_10);
3013  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
3014  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3015  __pyx_t_11 = PyTuple_New(7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 54, __pyx_L3_error)
3016  __Pyx_GOTREF(__pyx_t_11);
3017  __Pyx_INCREF(__pyx_slice_);
3018  __Pyx_GIVEREF(__pyx_slice_);
3019  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_slice_);
3020  __Pyx_INCREF(__pyx_slice_);
3021  __Pyx_GIVEREF(__pyx_slice_);
3022  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_slice_);
3023  __Pyx_GIVEREF(__pyx_t_10);
3024  PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_10);
3025  __Pyx_INCREF(__pyx_slice_);
3026  __Pyx_GIVEREF(__pyx_slice_);
3027  PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_slice_);
3028  __Pyx_INCREF(__pyx_slice_);
3029  __Pyx_GIVEREF(__pyx_slice_);
3030  PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_slice_);
3031  __Pyx_INCREF(__pyx_slice_);
3032  __Pyx_GIVEREF(__pyx_slice_);
3033  PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_slice_);
3034  __Pyx_INCREF(__pyx_slice_);
3035  __Pyx_GIVEREF(__pyx_slice_);
3036  PyTuple_SET_ITEM(__pyx_t_11, 6, __pyx_slice_);
3037  __pyx_t_10 = 0;
3038  if (unlikely(PyObject_SetItem(__pyx_t_3, __pyx_t_11, __pyx_t_2) < 0)) __PYX_ERR(0, 54, __pyx_L3_error)
3039  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3040  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3041  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3042 
3043  /* "dbocean.pyx":55
3044  * self.lut[W860][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m07']
3045  * self.lut[W860][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m07']
3046  * self.lut[W124][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m08'] # <<<<<<<<<<<<<<
3047  * self.lut[W124][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m08']
3048  * self.lut[W124][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m08']
3049  */
3050  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_xr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L3_error)
3051  __Pyx_GOTREF(__pyx_t_2);
3052  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 55, __pyx_L3_error)
3053  __Pyx_GOTREF(__pyx_t_11);
3054  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3055  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L3_error)
3056  __Pyx_GOTREF(__pyx_t_2);
3057  __Pyx_INCREF(__pyx_v_lut_filepath);
3058  __Pyx_GIVEREF(__pyx_v_lut_filepath);
3059  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lut_filepath);
3060  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L3_error)
3061  __Pyx_GOTREF(__pyx_t_3);
3062  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_DUST) < 0) __PYX_ERR(0, 55, __pyx_L3_error)
3063  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 55, __pyx_L3_error)
3064  __Pyx_GOTREF(__pyx_t_10);
3065  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3066  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3067  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3068  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_u_IoverF_m08); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L3_error)
3069  __Pyx_GOTREF(__pyx_t_3);
3070  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3071  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 55, __pyx_L3_error)
3072  __Pyx_GOTREF(__pyx_t_10);
3073  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_10, __pyx_v_7dbocean_W124, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L3_error)
3074  __Pyx_GOTREF(__pyx_t_2);
3075  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3076  __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NF1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 55, __pyx_L3_error)
3077  __Pyx_GOTREF(__pyx_t_10);
3078  __pyx_t_11 = PySlice_New(__pyx_int_0, __pyx_t_10, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 55, __pyx_L3_error)
3079  __Pyx_GOTREF(__pyx_t_11);
3080  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3081  __pyx_t_10 = PyTuple_New(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 55, __pyx_L3_error)
3082  __Pyx_GOTREF(__pyx_t_10);
3083  __Pyx_INCREF(__pyx_slice_);
3084  __Pyx_GIVEREF(__pyx_slice_);
3085  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_slice_);
3086  __Pyx_INCREF(__pyx_slice_);
3087  __Pyx_GIVEREF(__pyx_slice_);
3088  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_slice_);
3089  __Pyx_GIVEREF(__pyx_t_11);
3090  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_11);
3091  __Pyx_INCREF(__pyx_slice_);
3092  __Pyx_GIVEREF(__pyx_slice_);
3093  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_slice_);
3094  __Pyx_INCREF(__pyx_slice_);
3095  __Pyx_GIVEREF(__pyx_slice_);
3096  PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_slice_);
3097  __Pyx_INCREF(__pyx_slice_);
3098  __Pyx_GIVEREF(__pyx_slice_);
3099  PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_slice_);
3100  __Pyx_INCREF(__pyx_slice_);
3101  __Pyx_GIVEREF(__pyx_slice_);
3102  PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_slice_);
3103  __pyx_t_11 = 0;
3104  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_t_10, __pyx_t_3) < 0)) __PYX_ERR(0, 55, __pyx_L3_error)
3105  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3106  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3107  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3108 
3109  /* "dbocean.pyx":56
3110  * self.lut[W860][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m07']
3111  * self.lut[W124][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m08']
3112  * self.lut[W124][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m08'] # <<<<<<<<<<<<<<
3113  * self.lut[W124][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m08']
3114  * self.lut[W164][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m10']
3115  */
3116  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_xr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L3_error)
3117  __Pyx_GOTREF(__pyx_t_3);
3118  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 56, __pyx_L3_error)
3119  __Pyx_GOTREF(__pyx_t_10);
3120  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3121  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L3_error)
3122  __Pyx_GOTREF(__pyx_t_3);
3123  __Pyx_INCREF(__pyx_v_lut_filepath);
3124  __Pyx_GIVEREF(__pyx_v_lut_filepath);
3125  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lut_filepath);
3126  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L3_error)
3127  __Pyx_GOTREF(__pyx_t_2);
3128  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_MIXED) < 0) __PYX_ERR(0, 56, __pyx_L3_error)
3129  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 56, __pyx_L3_error)
3130  __Pyx_GOTREF(__pyx_t_11);
3131  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3132  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3133  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3134  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_11, __pyx_n_u_IoverF_m08); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L3_error)
3135  __Pyx_GOTREF(__pyx_t_2);
3136  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3137  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 56, __pyx_L3_error)
3138  __Pyx_GOTREF(__pyx_t_11);
3139  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_11, __pyx_v_7dbocean_W124, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L3_error)
3140  __Pyx_GOTREF(__pyx_t_3);
3141  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3142  __pyx_t_11 = __Pyx_PyInt_From_long((__pyx_v_7dbocean_NF1 - 1)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 56, __pyx_L3_error)
3143  __Pyx_GOTREF(__pyx_t_11);
3144  __pyx_t_10 = __Pyx_PyInt_From_long((__pyx_v_7dbocean_NF2 - 1)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 56, __pyx_L3_error)
3145  __Pyx_GOTREF(__pyx_t_10);
3146  __pyx_t_9 = PySlice_New(__pyx_t_11, __pyx_t_10, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 56, __pyx_L3_error)
3147  __Pyx_GOTREF(__pyx_t_9);
3148  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3149  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3150  __pyx_t_10 = PyTuple_New(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 56, __pyx_L3_error)
3151  __Pyx_GOTREF(__pyx_t_10);
3152  __Pyx_INCREF(__pyx_slice_);
3153  __Pyx_GIVEREF(__pyx_slice_);
3154  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_slice_);
3155  __Pyx_INCREF(__pyx_slice_);
3156  __Pyx_GIVEREF(__pyx_slice_);
3157  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_slice_);
3158  __Pyx_GIVEREF(__pyx_t_9);
3159  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_9);
3160  __Pyx_INCREF(__pyx_slice_);
3161  __Pyx_GIVEREF(__pyx_slice_);
3162  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_slice_);
3163  __Pyx_INCREF(__pyx_slice_);
3164  __Pyx_GIVEREF(__pyx_slice_);
3165  PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_slice_);
3166  __Pyx_INCREF(__pyx_slice_);
3167  __Pyx_GIVEREF(__pyx_slice_);
3168  PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_slice_);
3169  __Pyx_INCREF(__pyx_slice_);
3170  __Pyx_GIVEREF(__pyx_slice_);
3171  PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_slice_);
3172  __pyx_t_9 = 0;
3173  if (unlikely(PyObject_SetItem(__pyx_t_3, __pyx_t_10, __pyx_t_2) < 0)) __PYX_ERR(0, 56, __pyx_L3_error)
3174  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3175  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3176  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3177 
3178  /* "dbocean.pyx":57
3179  * self.lut[W124][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m08']
3180  * self.lut[W124][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m08']
3181  * self.lut[W124][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m08'] # <<<<<<<<<<<<<<
3182  * self.lut[W164][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m10']
3183  * self.lut[W164][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m10']
3184  */
3185  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_xr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L3_error)
3186  __Pyx_GOTREF(__pyx_t_2);
3187  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 57, __pyx_L3_error)
3188  __Pyx_GOTREF(__pyx_t_10);
3189  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3190  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L3_error)
3191  __Pyx_GOTREF(__pyx_t_2);
3192  __Pyx_INCREF(__pyx_v_lut_filepath);
3193  __Pyx_GIVEREF(__pyx_v_lut_filepath);
3194  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lut_filepath);
3195  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 57, __pyx_L3_error)
3196  __Pyx_GOTREF(__pyx_t_3);
3197  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_FINE) < 0) __PYX_ERR(0, 57, __pyx_L3_error)
3198  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 57, __pyx_L3_error)
3199  __Pyx_GOTREF(__pyx_t_9);
3200  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3201  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3202  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3203  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_9, __pyx_n_u_IoverF_m08); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 57, __pyx_L3_error)
3204  __Pyx_GOTREF(__pyx_t_3);
3205  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
3206  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 57, __pyx_L3_error)
3207  __Pyx_GOTREF(__pyx_t_9);
3208  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_9, __pyx_v_7dbocean_W124, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L3_error)
3209  __Pyx_GOTREF(__pyx_t_2);
3210  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
3211  __pyx_t_9 = __Pyx_PyInt_From_long((__pyx_v_7dbocean_NF2 - 2)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 57, __pyx_L3_error)
3212  __Pyx_GOTREF(__pyx_t_9);
3213  __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NFMF); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 57, __pyx_L3_error)
3214  __Pyx_GOTREF(__pyx_t_10);
3215  __pyx_t_11 = PySlice_New(__pyx_t_9, __pyx_t_10, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 57, __pyx_L3_error)
3216  __Pyx_GOTREF(__pyx_t_11);
3217  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
3218  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3219  __pyx_t_10 = PyTuple_New(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 57, __pyx_L3_error)
3220  __Pyx_GOTREF(__pyx_t_10);
3221  __Pyx_INCREF(__pyx_slice_);
3222  __Pyx_GIVEREF(__pyx_slice_);
3223  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_slice_);
3224  __Pyx_INCREF(__pyx_slice_);
3225  __Pyx_GIVEREF(__pyx_slice_);
3226  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_slice_);
3227  __Pyx_GIVEREF(__pyx_t_11);
3228  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_11);
3229  __Pyx_INCREF(__pyx_slice_);
3230  __Pyx_GIVEREF(__pyx_slice_);
3231  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_slice_);
3232  __Pyx_INCREF(__pyx_slice_);
3233  __Pyx_GIVEREF(__pyx_slice_);
3234  PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_slice_);
3235  __Pyx_INCREF(__pyx_slice_);
3236  __Pyx_GIVEREF(__pyx_slice_);
3237  PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_slice_);
3238  __Pyx_INCREF(__pyx_slice_);
3239  __Pyx_GIVEREF(__pyx_slice_);
3240  PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_slice_);
3241  __pyx_t_11 = 0;
3242  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_t_10, __pyx_t_3) < 0)) __PYX_ERR(0, 57, __pyx_L3_error)
3243  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3244  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3245  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3246 
3247  /* "dbocean.pyx":58
3248  * self.lut[W124][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m08']
3249  * self.lut[W124][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m08']
3250  * self.lut[W164][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m10'] # <<<<<<<<<<<<<<
3251  * self.lut[W164][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m10']
3252  * self.lut[W164][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m10']
3253  */
3254  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_xr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 58, __pyx_L3_error)
3255  __Pyx_GOTREF(__pyx_t_3);
3256  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 58, __pyx_L3_error)
3257  __Pyx_GOTREF(__pyx_t_10);
3258  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3259  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 58, __pyx_L3_error)
3260  __Pyx_GOTREF(__pyx_t_3);
3261  __Pyx_INCREF(__pyx_v_lut_filepath);
3262  __Pyx_GIVEREF(__pyx_v_lut_filepath);
3263  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lut_filepath);
3264  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L3_error)
3265  __Pyx_GOTREF(__pyx_t_2);
3266  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_DUST) < 0) __PYX_ERR(0, 58, __pyx_L3_error)
3267  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 58, __pyx_L3_error)
3268  __Pyx_GOTREF(__pyx_t_11);
3269  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3270  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3271  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3272  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_11, __pyx_n_u_IoverF_m10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L3_error)
3273  __Pyx_GOTREF(__pyx_t_2);
3274  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3275  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 58, __pyx_L3_error)
3276  __Pyx_GOTREF(__pyx_t_11);
3277  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_11, __pyx_v_7dbocean_W164, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 58, __pyx_L3_error)
3278  __Pyx_GOTREF(__pyx_t_3);
3279  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3280  __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NF1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 58, __pyx_L3_error)
3281  __Pyx_GOTREF(__pyx_t_11);
3282  __pyx_t_10 = PySlice_New(__pyx_int_0, __pyx_t_11, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 58, __pyx_L3_error)
3283  __Pyx_GOTREF(__pyx_t_10);
3284  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3285  __pyx_t_11 = PyTuple_New(7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 58, __pyx_L3_error)
3286  __Pyx_GOTREF(__pyx_t_11);
3287  __Pyx_INCREF(__pyx_slice_);
3288  __Pyx_GIVEREF(__pyx_slice_);
3289  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_slice_);
3290  __Pyx_INCREF(__pyx_slice_);
3291  __Pyx_GIVEREF(__pyx_slice_);
3292  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_slice_);
3293  __Pyx_GIVEREF(__pyx_t_10);
3294  PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_10);
3295  __Pyx_INCREF(__pyx_slice_);
3296  __Pyx_GIVEREF(__pyx_slice_);
3297  PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_slice_);
3298  __Pyx_INCREF(__pyx_slice_);
3299  __Pyx_GIVEREF(__pyx_slice_);
3300  PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_slice_);
3301  __Pyx_INCREF(__pyx_slice_);
3302  __Pyx_GIVEREF(__pyx_slice_);
3303  PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_slice_);
3304  __Pyx_INCREF(__pyx_slice_);
3305  __Pyx_GIVEREF(__pyx_slice_);
3306  PyTuple_SET_ITEM(__pyx_t_11, 6, __pyx_slice_);
3307  __pyx_t_10 = 0;
3308  if (unlikely(PyObject_SetItem(__pyx_t_3, __pyx_t_11, __pyx_t_2) < 0)) __PYX_ERR(0, 58, __pyx_L3_error)
3309  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3310  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3311  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3312 
3313  /* "dbocean.pyx":59
3314  * self.lut[W124][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m08']
3315  * self.lut[W164][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m10']
3316  * self.lut[W164][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m10'] # <<<<<<<<<<<<<<
3317  * self.lut[W164][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m10']
3318  * self.lut[W213][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m11']
3319  */
3320  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_xr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L3_error)
3321  __Pyx_GOTREF(__pyx_t_2);
3322  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 59, __pyx_L3_error)
3323  __Pyx_GOTREF(__pyx_t_11);
3324  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3325  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L3_error)
3326  __Pyx_GOTREF(__pyx_t_2);
3327  __Pyx_INCREF(__pyx_v_lut_filepath);
3328  __Pyx_GIVEREF(__pyx_v_lut_filepath);
3329  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lut_filepath);
3330  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L3_error)
3331  __Pyx_GOTREF(__pyx_t_3);
3332  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_MIXED) < 0) __PYX_ERR(0, 59, __pyx_L3_error)
3333  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 59, __pyx_L3_error)
3334  __Pyx_GOTREF(__pyx_t_10);
3335  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3336  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3337  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3338  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_u_IoverF_m10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L3_error)
3339  __Pyx_GOTREF(__pyx_t_3);
3340  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3341  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 59, __pyx_L3_error)
3342  __Pyx_GOTREF(__pyx_t_10);
3343  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_10, __pyx_v_7dbocean_W164, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L3_error)
3344  __Pyx_GOTREF(__pyx_t_2);
3345  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3346  __pyx_t_10 = __Pyx_PyInt_From_long((__pyx_v_7dbocean_NF1 - 1)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 59, __pyx_L3_error)
3347  __Pyx_GOTREF(__pyx_t_10);
3348  __pyx_t_11 = __Pyx_PyInt_From_long((__pyx_v_7dbocean_NF2 - 1)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 59, __pyx_L3_error)
3349  __Pyx_GOTREF(__pyx_t_11);
3350  __pyx_t_9 = PySlice_New(__pyx_t_10, __pyx_t_11, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 59, __pyx_L3_error)
3351  __Pyx_GOTREF(__pyx_t_9);
3352  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3353  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3354  __pyx_t_11 = PyTuple_New(7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 59, __pyx_L3_error)
3355  __Pyx_GOTREF(__pyx_t_11);
3356  __Pyx_INCREF(__pyx_slice_);
3357  __Pyx_GIVEREF(__pyx_slice_);
3358  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_slice_);
3359  __Pyx_INCREF(__pyx_slice_);
3360  __Pyx_GIVEREF(__pyx_slice_);
3361  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_slice_);
3362  __Pyx_GIVEREF(__pyx_t_9);
3363  PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_9);
3364  __Pyx_INCREF(__pyx_slice_);
3365  __Pyx_GIVEREF(__pyx_slice_);
3366  PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_slice_);
3367  __Pyx_INCREF(__pyx_slice_);
3368  __Pyx_GIVEREF(__pyx_slice_);
3369  PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_slice_);
3370  __Pyx_INCREF(__pyx_slice_);
3371  __Pyx_GIVEREF(__pyx_slice_);
3372  PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_slice_);
3373  __Pyx_INCREF(__pyx_slice_);
3374  __Pyx_GIVEREF(__pyx_slice_);
3375  PyTuple_SET_ITEM(__pyx_t_11, 6, __pyx_slice_);
3376  __pyx_t_9 = 0;
3377  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_t_11, __pyx_t_3) < 0)) __PYX_ERR(0, 59, __pyx_L3_error)
3378  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3379  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3380  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3381 
3382  /* "dbocean.pyx":60
3383  * self.lut[W164][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m10']
3384  * self.lut[W164][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m10']
3385  * self.lut[W164][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m10'] # <<<<<<<<<<<<<<
3386  * self.lut[W213][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m11']
3387  * self.lut[W213][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m11']
3388  */
3389  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_xr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L3_error)
3390  __Pyx_GOTREF(__pyx_t_3);
3391  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 60, __pyx_L3_error)
3392  __Pyx_GOTREF(__pyx_t_11);
3393  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3394  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L3_error)
3395  __Pyx_GOTREF(__pyx_t_3);
3396  __Pyx_INCREF(__pyx_v_lut_filepath);
3397  __Pyx_GIVEREF(__pyx_v_lut_filepath);
3398  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lut_filepath);
3399  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L3_error)
3400  __Pyx_GOTREF(__pyx_t_2);
3401  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_FINE) < 0) __PYX_ERR(0, 60, __pyx_L3_error)
3402  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 60, __pyx_L3_error)
3403  __Pyx_GOTREF(__pyx_t_9);
3404  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3405  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3406  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3407  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_9, __pyx_n_u_IoverF_m10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L3_error)
3408  __Pyx_GOTREF(__pyx_t_2);
3409  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
3410  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 60, __pyx_L3_error)
3411  __Pyx_GOTREF(__pyx_t_9);
3412  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_9, __pyx_v_7dbocean_W164, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L3_error)
3413  __Pyx_GOTREF(__pyx_t_3);
3414  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
3415  __pyx_t_9 = __Pyx_PyInt_From_long((__pyx_v_7dbocean_NF2 - 2)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 60, __pyx_L3_error)
3416  __Pyx_GOTREF(__pyx_t_9);
3417  __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NFMF); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 60, __pyx_L3_error)
3418  __Pyx_GOTREF(__pyx_t_11);
3419  __pyx_t_10 = PySlice_New(__pyx_t_9, __pyx_t_11, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 60, __pyx_L3_error)
3420  __Pyx_GOTREF(__pyx_t_10);
3421  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
3422  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3423  __pyx_t_11 = PyTuple_New(7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 60, __pyx_L3_error)
3424  __Pyx_GOTREF(__pyx_t_11);
3425  __Pyx_INCREF(__pyx_slice_);
3426  __Pyx_GIVEREF(__pyx_slice_);
3427  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_slice_);
3428  __Pyx_INCREF(__pyx_slice_);
3429  __Pyx_GIVEREF(__pyx_slice_);
3430  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_slice_);
3431  __Pyx_GIVEREF(__pyx_t_10);
3432  PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_10);
3433  __Pyx_INCREF(__pyx_slice_);
3434  __Pyx_GIVEREF(__pyx_slice_);
3435  PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_slice_);
3436  __Pyx_INCREF(__pyx_slice_);
3437  __Pyx_GIVEREF(__pyx_slice_);
3438  PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_slice_);
3439  __Pyx_INCREF(__pyx_slice_);
3440  __Pyx_GIVEREF(__pyx_slice_);
3441  PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_slice_);
3442  __Pyx_INCREF(__pyx_slice_);
3443  __Pyx_GIVEREF(__pyx_slice_);
3444  PyTuple_SET_ITEM(__pyx_t_11, 6, __pyx_slice_);
3445  __pyx_t_10 = 0;
3446  if (unlikely(PyObject_SetItem(__pyx_t_3, __pyx_t_11, __pyx_t_2) < 0)) __PYX_ERR(0, 60, __pyx_L3_error)
3447  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3448  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3449  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3450 
3451  /* "dbocean.pyx":61
3452  * self.lut[W164][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m10']
3453  * self.lut[W164][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m10']
3454  * self.lut[W213][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m11'] # <<<<<<<<<<<<<<
3455  * self.lut[W213][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m11']
3456  * self.lut[W213][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m11']
3457  */
3458  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_xr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L3_error)
3459  __Pyx_GOTREF(__pyx_t_2);
3460  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 61, __pyx_L3_error)
3461  __Pyx_GOTREF(__pyx_t_11);
3462  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3463  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L3_error)
3464  __Pyx_GOTREF(__pyx_t_2);
3465  __Pyx_INCREF(__pyx_v_lut_filepath);
3466  __Pyx_GIVEREF(__pyx_v_lut_filepath);
3467  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lut_filepath);
3468  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L3_error)
3469  __Pyx_GOTREF(__pyx_t_3);
3470  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_DUST) < 0) __PYX_ERR(0, 61, __pyx_L3_error)
3471  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 61, __pyx_L3_error)
3472  __Pyx_GOTREF(__pyx_t_10);
3473  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3474  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3475  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3476  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_u_IoverF_m11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L3_error)
3477  __Pyx_GOTREF(__pyx_t_3);
3478  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3479  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 61, __pyx_L3_error)
3480  __Pyx_GOTREF(__pyx_t_10);
3481  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_10, __pyx_v_7dbocean_W213, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L3_error)
3482  __Pyx_GOTREF(__pyx_t_2);
3483  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3484  __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NF1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 61, __pyx_L3_error)
3485  __Pyx_GOTREF(__pyx_t_10);
3486  __pyx_t_11 = PySlice_New(__pyx_int_0, __pyx_t_10, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 61, __pyx_L3_error)
3487  __Pyx_GOTREF(__pyx_t_11);
3488  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3489  __pyx_t_10 = PyTuple_New(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 61, __pyx_L3_error)
3490  __Pyx_GOTREF(__pyx_t_10);
3491  __Pyx_INCREF(__pyx_slice_);
3492  __Pyx_GIVEREF(__pyx_slice_);
3493  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_slice_);
3494  __Pyx_INCREF(__pyx_slice_);
3495  __Pyx_GIVEREF(__pyx_slice_);
3496  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_slice_);
3497  __Pyx_GIVEREF(__pyx_t_11);
3498  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_11);
3499  __Pyx_INCREF(__pyx_slice_);
3500  __Pyx_GIVEREF(__pyx_slice_);
3501  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_slice_);
3502  __Pyx_INCREF(__pyx_slice_);
3503  __Pyx_GIVEREF(__pyx_slice_);
3504  PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_slice_);
3505  __Pyx_INCREF(__pyx_slice_);
3506  __Pyx_GIVEREF(__pyx_slice_);
3507  PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_slice_);
3508  __Pyx_INCREF(__pyx_slice_);
3509  __Pyx_GIVEREF(__pyx_slice_);
3510  PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_slice_);
3511  __pyx_t_11 = 0;
3512  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_t_10, __pyx_t_3) < 0)) __PYX_ERR(0, 61, __pyx_L3_error)
3513  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3514  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3515  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3516 
3517  /* "dbocean.pyx":62
3518  * self.lut[W164][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m10']
3519  * self.lut[W213][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m11']
3520  * self.lut[W213][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m11'] # <<<<<<<<<<<<<<
3521  * self.lut[W213][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m11']
3522  * self.chl_lut = xr.load_dataset(lut_filepath,group='/LOG_CHL')['LOG_CHL']
3523  */
3524  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_xr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L3_error)
3525  __Pyx_GOTREF(__pyx_t_3);
3526  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 62, __pyx_L3_error)
3527  __Pyx_GOTREF(__pyx_t_10);
3528  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3529  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L3_error)
3530  __Pyx_GOTREF(__pyx_t_3);
3531  __Pyx_INCREF(__pyx_v_lut_filepath);
3532  __Pyx_GIVEREF(__pyx_v_lut_filepath);
3533  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lut_filepath);
3534  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L3_error)
3535  __Pyx_GOTREF(__pyx_t_2);
3536  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_MIXED) < 0) __PYX_ERR(0, 62, __pyx_L3_error)
3537  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 62, __pyx_L3_error)
3538  __Pyx_GOTREF(__pyx_t_11);
3539  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3540  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3541  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3542  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_11, __pyx_n_u_IoverF_m11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L3_error)
3543  __Pyx_GOTREF(__pyx_t_2);
3544  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3545  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 62, __pyx_L3_error)
3546  __Pyx_GOTREF(__pyx_t_11);
3547  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_11, __pyx_v_7dbocean_W213, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L3_error)
3548  __Pyx_GOTREF(__pyx_t_3);
3549  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3550  __pyx_t_11 = __Pyx_PyInt_From_long((__pyx_v_7dbocean_NF1 - 1)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 62, __pyx_L3_error)
3551  __Pyx_GOTREF(__pyx_t_11);
3552  __pyx_t_10 = __Pyx_PyInt_From_long((__pyx_v_7dbocean_NF2 - 1)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 62, __pyx_L3_error)
3553  __Pyx_GOTREF(__pyx_t_10);
3554  __pyx_t_9 = PySlice_New(__pyx_t_11, __pyx_t_10, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 62, __pyx_L3_error)
3555  __Pyx_GOTREF(__pyx_t_9);
3556  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3557  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3558  __pyx_t_10 = PyTuple_New(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 62, __pyx_L3_error)
3559  __Pyx_GOTREF(__pyx_t_10);
3560  __Pyx_INCREF(__pyx_slice_);
3561  __Pyx_GIVEREF(__pyx_slice_);
3562  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_slice_);
3563  __Pyx_INCREF(__pyx_slice_);
3564  __Pyx_GIVEREF(__pyx_slice_);
3565  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_slice_);
3566  __Pyx_GIVEREF(__pyx_t_9);
3567  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_9);
3568  __Pyx_INCREF(__pyx_slice_);
3569  __Pyx_GIVEREF(__pyx_slice_);
3570  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_slice_);
3571  __Pyx_INCREF(__pyx_slice_);
3572  __Pyx_GIVEREF(__pyx_slice_);
3573  PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_slice_);
3574  __Pyx_INCREF(__pyx_slice_);
3575  __Pyx_GIVEREF(__pyx_slice_);
3576  PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_slice_);
3577  __Pyx_INCREF(__pyx_slice_);
3578  __Pyx_GIVEREF(__pyx_slice_);
3579  PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_slice_);
3580  __pyx_t_9 = 0;
3581  if (unlikely(PyObject_SetItem(__pyx_t_3, __pyx_t_10, __pyx_t_2) < 0)) __PYX_ERR(0, 62, __pyx_L3_error)
3582  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3583  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3584  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3585 
3586  /* "dbocean.pyx":63
3587  * self.lut[W213][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m11']
3588  * self.lut[W213][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m11']
3589  * self.lut[W213][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m11'] # <<<<<<<<<<<<<<
3590  * self.chl_lut = xr.load_dataset(lut_filepath,group='/LOG_CHL')['LOG_CHL']
3591  * raa_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Relative_Azimuth_Angle']
3592  */
3593  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_xr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L3_error)
3594  __Pyx_GOTREF(__pyx_t_2);
3595  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 63, __pyx_L3_error)
3596  __Pyx_GOTREF(__pyx_t_10);
3597  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3598  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L3_error)
3599  __Pyx_GOTREF(__pyx_t_2);
3600  __Pyx_INCREF(__pyx_v_lut_filepath);
3601  __Pyx_GIVEREF(__pyx_v_lut_filepath);
3602  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lut_filepath);
3603  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L3_error)
3604  __Pyx_GOTREF(__pyx_t_3);
3605  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_FINE) < 0) __PYX_ERR(0, 63, __pyx_L3_error)
3606  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 63, __pyx_L3_error)
3607  __Pyx_GOTREF(__pyx_t_9);
3608  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3609  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3610  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3611  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_9, __pyx_n_u_IoverF_m11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L3_error)
3612  __Pyx_GOTREF(__pyx_t_3);
3613  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
3614  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 63, __pyx_L3_error)
3615  __Pyx_GOTREF(__pyx_t_9);
3616  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_9, __pyx_v_7dbocean_W213, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L3_error)
3617  __Pyx_GOTREF(__pyx_t_2);
3618  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
3619  __pyx_t_9 = __Pyx_PyInt_From_long((__pyx_v_7dbocean_NF2 - 2)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 63, __pyx_L3_error)
3620  __Pyx_GOTREF(__pyx_t_9);
3621  __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NFMF); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 63, __pyx_L3_error)
3622  __Pyx_GOTREF(__pyx_t_10);
3623  __pyx_t_11 = PySlice_New(__pyx_t_9, __pyx_t_10, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 63, __pyx_L3_error)
3624  __Pyx_GOTREF(__pyx_t_11);
3625  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
3626  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3627  __pyx_t_10 = PyTuple_New(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 63, __pyx_L3_error)
3628  __Pyx_GOTREF(__pyx_t_10);
3629  __Pyx_INCREF(__pyx_slice_);
3630  __Pyx_GIVEREF(__pyx_slice_);
3631  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_slice_);
3632  __Pyx_INCREF(__pyx_slice_);
3633  __Pyx_GIVEREF(__pyx_slice_);
3634  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_slice_);
3635  __Pyx_GIVEREF(__pyx_t_11);
3636  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_11);
3637  __Pyx_INCREF(__pyx_slice_);
3638  __Pyx_GIVEREF(__pyx_slice_);
3639  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_slice_);
3640  __Pyx_INCREF(__pyx_slice_);
3641  __Pyx_GIVEREF(__pyx_slice_);
3642  PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_slice_);
3643  __Pyx_INCREF(__pyx_slice_);
3644  __Pyx_GIVEREF(__pyx_slice_);
3645  PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_slice_);
3646  __Pyx_INCREF(__pyx_slice_);
3647  __Pyx_GIVEREF(__pyx_slice_);
3648  PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_slice_);
3649  __pyx_t_11 = 0;
3650  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_t_10, __pyx_t_3) < 0)) __PYX_ERR(0, 63, __pyx_L3_error)
3651  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3652  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3653  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3654 
3655  /* "dbocean.pyx":64
3656  * self.lut[W213][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m11']
3657  * self.lut[W213][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m11']
3658  * self.chl_lut = xr.load_dataset(lut_filepath,group='/LOG_CHL')['LOG_CHL'] # <<<<<<<<<<<<<<
3659  * raa_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Relative_Azimuth_Angle']
3660  * vza_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['View_Zenith_Angle']
3661  */
3662  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_xr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L3_error)
3663  __Pyx_GOTREF(__pyx_t_3);
3664  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 64, __pyx_L3_error)
3665  __Pyx_GOTREF(__pyx_t_10);
3666  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3667  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L3_error)
3668  __Pyx_GOTREF(__pyx_t_3);
3669  __Pyx_INCREF(__pyx_v_lut_filepath);
3670  __Pyx_GIVEREF(__pyx_v_lut_filepath);
3671  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lut_filepath);
3672  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L3_error)
3673  __Pyx_GOTREF(__pyx_t_2);
3674  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_group, __pyx_kp_u_LOG_CHL) < 0) __PYX_ERR(0, 64, __pyx_L3_error)
3675  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 64, __pyx_L3_error)
3676  __Pyx_GOTREF(__pyx_t_11);
3677  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3678  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3679  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3680  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_11, __pyx_n_u_LOG_CHL_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L3_error)
3681  __Pyx_GOTREF(__pyx_t_2);
3682  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3683  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_chl_lut, __pyx_t_2) < 0) __PYX_ERR(0, 64, __pyx_L3_error)
3684  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3685 
3686  /* "dbocean.pyx":65
3687  * self.lut[W213][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m11']
3688  * self.chl_lut = xr.load_dataset(lut_filepath,group='/LOG_CHL')['LOG_CHL']
3689  * raa_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Relative_Azimuth_Angle'] # <<<<<<<<<<<<<<
3690  * vza_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['View_Zenith_Angle']
3691  * sza_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Solar_Zenith_Angle']
3692  */
3693  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_xr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L3_error)
3694  __Pyx_GOTREF(__pyx_t_2);
3695  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 65, __pyx_L3_error)
3696  __Pyx_GOTREF(__pyx_t_11);
3697  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3698  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L3_error)
3699  __Pyx_GOTREF(__pyx_t_2);
3700  __Pyx_INCREF(__pyx_v_lut_filepath);
3701  __Pyx_GIVEREF(__pyx_v_lut_filepath);
3702  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lut_filepath);
3703  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L3_error)
3704  __Pyx_GOTREF(__pyx_t_3);
3705  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_MIXED) < 0) __PYX_ERR(0, 65, __pyx_L3_error)
3706  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 65, __pyx_L3_error)
3707  __Pyx_GOTREF(__pyx_t_10);
3708  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3709  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3710  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3711  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_u_Relative_Azimuth_Angle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L3_error)
3712  __Pyx_GOTREF(__pyx_t_3);
3713  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3714  __pyx_v_raa_pts = __pyx_t_3;
3715  __pyx_t_3 = 0;
3716 
3717  /* "dbocean.pyx":66
3718  * self.chl_lut = xr.load_dataset(lut_filepath,group='/LOG_CHL')['LOG_CHL']
3719  * raa_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Relative_Azimuth_Angle']
3720  * vza_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['View_Zenith_Angle'] # <<<<<<<<<<<<<<
3721  * sza_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Solar_Zenith_Angle']
3722  * wnd_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Wind_Speed']
3723  */
3724  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_xr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L3_error)
3725  __Pyx_GOTREF(__pyx_t_3);
3726  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 66, __pyx_L3_error)
3727  __Pyx_GOTREF(__pyx_t_10);
3728  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3729  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L3_error)
3730  __Pyx_GOTREF(__pyx_t_3);
3731  __Pyx_INCREF(__pyx_v_lut_filepath);
3732  __Pyx_GIVEREF(__pyx_v_lut_filepath);
3733  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lut_filepath);
3734  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L3_error)
3735  __Pyx_GOTREF(__pyx_t_2);
3736  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_MIXED) < 0) __PYX_ERR(0, 66, __pyx_L3_error)
3737  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 66, __pyx_L3_error)
3738  __Pyx_GOTREF(__pyx_t_11);
3739  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3740  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3741  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3742  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_11, __pyx_n_u_View_Zenith_Angle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L3_error)
3743  __Pyx_GOTREF(__pyx_t_2);
3744  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3745  __pyx_v_vza_pts = __pyx_t_2;
3746  __pyx_t_2 = 0;
3747 
3748  /* "dbocean.pyx":67
3749  * raa_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Relative_Azimuth_Angle']
3750  * vza_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['View_Zenith_Angle']
3751  * sza_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Solar_Zenith_Angle'] # <<<<<<<<<<<<<<
3752  * wnd_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Wind_Speed']
3753  * chl_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Chl_Conc']
3754  */
3755  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_xr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L3_error)
3756  __Pyx_GOTREF(__pyx_t_2);
3757  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 67, __pyx_L3_error)
3758  __Pyx_GOTREF(__pyx_t_11);
3759  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3760  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L3_error)
3761  __Pyx_GOTREF(__pyx_t_2);
3762  __Pyx_INCREF(__pyx_v_lut_filepath);
3763  __Pyx_GIVEREF(__pyx_v_lut_filepath);
3764  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lut_filepath);
3765  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L3_error)
3766  __Pyx_GOTREF(__pyx_t_3);
3767  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_MIXED) < 0) __PYX_ERR(0, 67, __pyx_L3_error)
3768  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 67, __pyx_L3_error)
3769  __Pyx_GOTREF(__pyx_t_10);
3770  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3771  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3772  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3773  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_u_Solar_Zenith_Angle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L3_error)
3774  __Pyx_GOTREF(__pyx_t_3);
3775  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3776  __pyx_v_sza_pts = __pyx_t_3;
3777  __pyx_t_3 = 0;
3778 
3779  /* "dbocean.pyx":68
3780  * vza_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['View_Zenith_Angle']
3781  * sza_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Solar_Zenith_Angle']
3782  * wnd_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Wind_Speed'] # <<<<<<<<<<<<<<
3783  * chl_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Chl_Conc']
3784  * aot_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Aerosol_Optical_Depth_550']
3785  */
3786  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_xr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L3_error)
3787  __Pyx_GOTREF(__pyx_t_3);
3788  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 68, __pyx_L3_error)
3789  __Pyx_GOTREF(__pyx_t_10);
3790  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3791  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L3_error)
3792  __Pyx_GOTREF(__pyx_t_3);
3793  __Pyx_INCREF(__pyx_v_lut_filepath);
3794  __Pyx_GIVEREF(__pyx_v_lut_filepath);
3795  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lut_filepath);
3796  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L3_error)
3797  __Pyx_GOTREF(__pyx_t_2);
3798  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_MIXED) < 0) __PYX_ERR(0, 68, __pyx_L3_error)
3799  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 68, __pyx_L3_error)
3800  __Pyx_GOTREF(__pyx_t_11);
3801  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3802  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3803  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3804  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_11, __pyx_n_u_Wind_Speed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L3_error)
3805  __Pyx_GOTREF(__pyx_t_2);
3806  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3807  __pyx_v_wnd_pts = __pyx_t_2;
3808  __pyx_t_2 = 0;
3809 
3810  /* "dbocean.pyx":69
3811  * sza_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Solar_Zenith_Angle']
3812  * wnd_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Wind_Speed']
3813  * chl_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Chl_Conc'] # <<<<<<<<<<<<<<
3814  * aot_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Aerosol_Optical_Depth_550']
3815  * fmf_pts[0:NF1] = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['Fine_Mode_Fraction_550']
3816  */
3817  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_xr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L3_error)
3818  __Pyx_GOTREF(__pyx_t_2);
3819  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 69, __pyx_L3_error)
3820  __Pyx_GOTREF(__pyx_t_11);
3821  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3822  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L3_error)
3823  __Pyx_GOTREF(__pyx_t_2);
3824  __Pyx_INCREF(__pyx_v_lut_filepath);
3825  __Pyx_GIVEREF(__pyx_v_lut_filepath);
3826  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lut_filepath);
3827  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L3_error)
3828  __Pyx_GOTREF(__pyx_t_3);
3829  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_MIXED) < 0) __PYX_ERR(0, 69, __pyx_L3_error)
3830  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 69, __pyx_L3_error)
3831  __Pyx_GOTREF(__pyx_t_10);
3832  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3833  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3834  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3835  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_u_Chl_Conc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L3_error)
3836  __Pyx_GOTREF(__pyx_t_3);
3837  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3838  __pyx_v_chl_pts = __pyx_t_3;
3839  __pyx_t_3 = 0;
3840 
3841  /* "dbocean.pyx":70
3842  * wnd_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Wind_Speed']
3843  * chl_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Chl_Conc']
3844  * aot_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Aerosol_Optical_Depth_550'] # <<<<<<<<<<<<<<
3845  * fmf_pts[0:NF1] = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['Fine_Mode_Fraction_550']
3846  * fmf_pts[NF1-1:NF2-1] = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Fine_Mode_Fraction_550']
3847  */
3848  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_xr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 70, __pyx_L3_error)
3849  __Pyx_GOTREF(__pyx_t_3);
3850  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 70, __pyx_L3_error)
3851  __Pyx_GOTREF(__pyx_t_10);
3852  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3853  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 70, __pyx_L3_error)
3854  __Pyx_GOTREF(__pyx_t_3);
3855  __Pyx_INCREF(__pyx_v_lut_filepath);
3856  __Pyx_GIVEREF(__pyx_v_lut_filepath);
3857  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lut_filepath);
3858  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L3_error)
3859  __Pyx_GOTREF(__pyx_t_2);
3860  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_MIXED) < 0) __PYX_ERR(0, 70, __pyx_L3_error)
3861  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 70, __pyx_L3_error)
3862  __Pyx_GOTREF(__pyx_t_11);
3863  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3864  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3865  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3866  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_11, __pyx_n_u_Aerosol_Optical_Depth_550); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L3_error)
3867  __Pyx_GOTREF(__pyx_t_2);
3868  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3869  __pyx_v_aot_pts = __pyx_t_2;
3870  __pyx_t_2 = 0;
3871 
3872  /* "dbocean.pyx":71
3873  * chl_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Chl_Conc']
3874  * aot_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Aerosol_Optical_Depth_550']
3875  * fmf_pts[0:NF1] = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['Fine_Mode_Fraction_550'] # <<<<<<<<<<<<<<
3876  * fmf_pts[NF1-1:NF2-1] = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Fine_Mode_Fraction_550']
3877  * fmf_pts[NF2-2:NFMF] = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['Fine_Mode_Fraction_550']
3878  */
3879  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_xr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L3_error)
3880  __Pyx_GOTREF(__pyx_t_2);
3881  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 71, __pyx_L3_error)
3882  __Pyx_GOTREF(__pyx_t_11);
3883  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3884  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L3_error)
3885  __Pyx_GOTREF(__pyx_t_2);
3886  __Pyx_INCREF(__pyx_v_lut_filepath);
3887  __Pyx_GIVEREF(__pyx_v_lut_filepath);
3888  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lut_filepath);
3889  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 71, __pyx_L3_error)
3890  __Pyx_GOTREF(__pyx_t_3);
3891  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_DUST) < 0) __PYX_ERR(0, 71, __pyx_L3_error)
3892  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 71, __pyx_L3_error)
3893  __Pyx_GOTREF(__pyx_t_10);
3894  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3895  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3896  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3897  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_u_Fine_Mode_Fraction_550); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 71, __pyx_L3_error)
3898  __Pyx_GOTREF(__pyx_t_3);
3899  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3900  if (__Pyx_PyObject_SetSlice(__pyx_v_fmf_pts, __pyx_t_3, 0, __pyx_v_7dbocean_NF1, NULL, NULL, NULL, 1, 1, 1) < 0) __PYX_ERR(0, 71, __pyx_L3_error)
3901  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3902 
3903  /* "dbocean.pyx":72
3904  * aot_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Aerosol_Optical_Depth_550']
3905  * fmf_pts[0:NF1] = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['Fine_Mode_Fraction_550']
3906  * fmf_pts[NF1-1:NF2-1] = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Fine_Mode_Fraction_550'] # <<<<<<<<<<<<<<
3907  * fmf_pts[NF2-2:NFMF] = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['Fine_Mode_Fraction_550']
3908  * self.wl_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Band_Central_Wavelength']
3909  */
3910  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_xr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 72, __pyx_L3_error)
3911  __Pyx_GOTREF(__pyx_t_3);
3912  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 72, __pyx_L3_error)
3913  __Pyx_GOTREF(__pyx_t_10);
3914  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3915  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 72, __pyx_L3_error)
3916  __Pyx_GOTREF(__pyx_t_3);
3917  __Pyx_INCREF(__pyx_v_lut_filepath);
3918  __Pyx_GIVEREF(__pyx_v_lut_filepath);
3919  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lut_filepath);
3920  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L3_error)
3921  __Pyx_GOTREF(__pyx_t_2);
3922  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_MIXED) < 0) __PYX_ERR(0, 72, __pyx_L3_error)
3923  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 72, __pyx_L3_error)
3924  __Pyx_GOTREF(__pyx_t_11);
3925  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3926  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3927  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3928  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_11, __pyx_n_u_Fine_Mode_Fraction_550); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L3_error)
3929  __Pyx_GOTREF(__pyx_t_2);
3930  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3931  if (__Pyx_PyObject_SetSlice(__pyx_v_fmf_pts, __pyx_t_2, (__pyx_v_7dbocean_NF1 - 1), (__pyx_v_7dbocean_NF2 - 1), NULL, NULL, NULL, 1, 1, 1) < 0) __PYX_ERR(0, 72, __pyx_L3_error)
3932  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3933 
3934  /* "dbocean.pyx":73
3935  * fmf_pts[0:NF1] = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['Fine_Mode_Fraction_550']
3936  * fmf_pts[NF1-1:NF2-1] = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Fine_Mode_Fraction_550']
3937  * fmf_pts[NF2-2:NFMF] = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['Fine_Mode_Fraction_550'] # <<<<<<<<<<<<<<
3938  * self.wl_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Band_Central_Wavelength']
3939  * self.coef = np.array([0.06,0.06,0.04,0.04,0.07,0.06,0.1])
3940  */
3941  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_xr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L3_error)
3942  __Pyx_GOTREF(__pyx_t_2);
3943  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 73, __pyx_L3_error)
3944  __Pyx_GOTREF(__pyx_t_11);
3945  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3946  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L3_error)
3947  __Pyx_GOTREF(__pyx_t_2);
3948  __Pyx_INCREF(__pyx_v_lut_filepath);
3949  __Pyx_GIVEREF(__pyx_v_lut_filepath);
3950  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lut_filepath);
3951  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 73, __pyx_L3_error)
3952  __Pyx_GOTREF(__pyx_t_3);
3953  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_FINE) < 0) __PYX_ERR(0, 73, __pyx_L3_error)
3954  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 73, __pyx_L3_error)
3955  __Pyx_GOTREF(__pyx_t_10);
3956  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3957  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3958  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3959  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_u_Fine_Mode_Fraction_550); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 73, __pyx_L3_error)
3960  __Pyx_GOTREF(__pyx_t_3);
3961  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3962  if (__Pyx_PyObject_SetSlice(__pyx_v_fmf_pts, __pyx_t_3, (__pyx_v_7dbocean_NF2 - 2), __pyx_v_7dbocean_NFMF, NULL, NULL, NULL, 1, 1, 1) < 0) __PYX_ERR(0, 73, __pyx_L3_error)
3963  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3964 
3965  /* "dbocean.pyx":74
3966  * fmf_pts[NF1-1:NF2-1] = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Fine_Mode_Fraction_550']
3967  * fmf_pts[NF2-2:NFMF] = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['Fine_Mode_Fraction_550']
3968  * self.wl_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Band_Central_Wavelength'] # <<<<<<<<<<<<<<
3969  * self.coef = np.array([0.06,0.06,0.04,0.04,0.07,0.06,0.1])
3970  * self.pars = lm.Parameters()
3971  */
3972  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_xr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 74, __pyx_L3_error)
3973  __Pyx_GOTREF(__pyx_t_3);
3974  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 74, __pyx_L3_error)
3975  __Pyx_GOTREF(__pyx_t_10);
3976  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3977  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 74, __pyx_L3_error)
3978  __Pyx_GOTREF(__pyx_t_3);
3979  __Pyx_INCREF(__pyx_v_lut_filepath);
3980  __Pyx_GIVEREF(__pyx_v_lut_filepath);
3981  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lut_filepath);
3982  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L3_error)
3983  __Pyx_GOTREF(__pyx_t_2);
3984  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_group, __pyx_kp_u_OCEAN_AEROSOL_MIXED) < 0) __PYX_ERR(0, 74, __pyx_L3_error)
3985  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 74, __pyx_L3_error)
3986  __Pyx_GOTREF(__pyx_t_11);
3987  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3988  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3989  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3990  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_11, __pyx_n_u_Band_Central_Wavelength); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L3_error)
3991  __Pyx_GOTREF(__pyx_t_2);
3992  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3993  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wl_pts, __pyx_t_2) < 0) __PYX_ERR(0, 74, __pyx_L3_error)
3994  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3995 
3996  /* "dbocean.pyx":75
3997  * fmf_pts[NF2-2:NFMF] = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['Fine_Mode_Fraction_550']
3998  * self.wl_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Band_Central_Wavelength']
3999  * self.coef = np.array([0.06,0.06,0.04,0.04,0.07,0.06,0.1]) # <<<<<<<<<<<<<<
4000  * self.pars = lm.Parameters()
4001  * self.pars.add(name='fmf', value=0.5, min=0, max=1)
4002  */
4003  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 75, __pyx_L3_error)
4004  __Pyx_GOTREF(__pyx_t_11);
4005  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 75, __pyx_L3_error)
4006  __Pyx_GOTREF(__pyx_t_3);
4007  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
4008  __pyx_t_11 = PyList_New(7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 75, __pyx_L3_error)
4009  __Pyx_GOTREF(__pyx_t_11);
4010  __Pyx_INCREF(__pyx_float_0_06);
4011  __Pyx_GIVEREF(__pyx_float_0_06);
4012  PyList_SET_ITEM(__pyx_t_11, 0, __pyx_float_0_06);
4013  __Pyx_INCREF(__pyx_float_0_06);
4014  __Pyx_GIVEREF(__pyx_float_0_06);
4015  PyList_SET_ITEM(__pyx_t_11, 1, __pyx_float_0_06);
4016  __Pyx_INCREF(__pyx_float_0_04);
4017  __Pyx_GIVEREF(__pyx_float_0_04);
4018  PyList_SET_ITEM(__pyx_t_11, 2, __pyx_float_0_04);
4019  __Pyx_INCREF(__pyx_float_0_04);
4020  __Pyx_GIVEREF(__pyx_float_0_04);
4021  PyList_SET_ITEM(__pyx_t_11, 3, __pyx_float_0_04);
4022  __Pyx_INCREF(__pyx_float_0_07);
4023  __Pyx_GIVEREF(__pyx_float_0_07);
4024  PyList_SET_ITEM(__pyx_t_11, 4, __pyx_float_0_07);
4025  __Pyx_INCREF(__pyx_float_0_06);
4026  __Pyx_GIVEREF(__pyx_float_0_06);
4027  PyList_SET_ITEM(__pyx_t_11, 5, __pyx_float_0_06);
4028  __Pyx_INCREF(__pyx_float_0_1);
4029  __Pyx_GIVEREF(__pyx_float_0_1);
4030  PyList_SET_ITEM(__pyx_t_11, 6, __pyx_float_0_1);
4031  __pyx_t_10 = NULL;
4032  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4033  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
4034  if (likely(__pyx_t_10)) {
4035  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4036  __Pyx_INCREF(__pyx_t_10);
4037  __Pyx_INCREF(function);
4038  __Pyx_DECREF_SET(__pyx_t_3, function);
4039  }
4040  }
4041  __pyx_t_2 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_11);
4042  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
4043  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
4044  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L3_error)
4045  __Pyx_GOTREF(__pyx_t_2);
4046  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4047  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_coef, __pyx_t_2) < 0) __PYX_ERR(0, 75, __pyx_L3_error)
4048  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4049 
4050  /* "dbocean.pyx":76
4051  * self.wl_pts = xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['Band_Central_Wavelength']
4052  * self.coef = np.array([0.06,0.06,0.04,0.04,0.07,0.06,0.1])
4053  * self.pars = lm.Parameters() # <<<<<<<<<<<<<<
4054  * self.pars.add(name='fmf', value=0.5, min=0, max=1)
4055  * self.pars.add(name='aot', value=1.0, min=0, max=100)
4056  */
4057  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_lm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __pyx_L3_error)
4058  __Pyx_GOTREF(__pyx_t_3);
4059  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Parameters); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 76, __pyx_L3_error)
4060  __Pyx_GOTREF(__pyx_t_11);
4061  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4062  __pyx_t_3 = NULL;
4063  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
4064  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_11);
4065  if (likely(__pyx_t_3)) {
4066  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
4067  __Pyx_INCREF(__pyx_t_3);
4068  __Pyx_INCREF(function);
4069  __Pyx_DECREF_SET(__pyx_t_11, function);
4070  }
4071  }
4072  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
4073  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4074  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L3_error)
4075  __Pyx_GOTREF(__pyx_t_2);
4076  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
4077  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pars, __pyx_t_2) < 0) __PYX_ERR(0, 76, __pyx_L3_error)
4078  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4079 
4080  /* "dbocean.pyx":77
4081  * self.coef = np.array([0.06,0.06,0.04,0.04,0.07,0.06,0.1])
4082  * self.pars = lm.Parameters()
4083  * self.pars.add(name='fmf', value=0.5, min=0, max=1) # <<<<<<<<<<<<<<
4084  * self.pars.add(name='aot', value=1.0, min=0, max=100)
4085  * if(self.mode==0 or self.mode==1):
4086  */
4087  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L3_error)
4088  __Pyx_GOTREF(__pyx_t_2);
4089  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_add); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 77, __pyx_L3_error)
4090  __Pyx_GOTREF(__pyx_t_11);
4091  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4092  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L3_error)
4093  __Pyx_GOTREF(__pyx_t_2);
4094  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_n_u_fmf) < 0) __PYX_ERR(0, 77, __pyx_L3_error)
4095  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_value, __pyx_float_0_5) < 0) __PYX_ERR(0, 77, __pyx_L3_error)
4096  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_min, __pyx_int_0) < 0) __PYX_ERR(0, 77, __pyx_L3_error)
4097  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_max, __pyx_int_1) < 0) __PYX_ERR(0, 77, __pyx_L3_error)
4098  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L3_error)
4099  __Pyx_GOTREF(__pyx_t_3);
4100  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
4101  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4102  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4103 
4104  /* "dbocean.pyx":78
4105  * self.pars = lm.Parameters()
4106  * self.pars.add(name='fmf', value=0.5, min=0, max=1)
4107  * self.pars.add(name='aot', value=1.0, min=0, max=100) # <<<<<<<<<<<<<<
4108  * if(self.mode==0 or self.mode==1):
4109  * self.rpts = (chl_pts, wnd_pts, raa_pts, vza_pts, sza_pts)
4110  */
4111  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L3_error)
4112  __Pyx_GOTREF(__pyx_t_3);
4113  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L3_error)
4114  __Pyx_GOTREF(__pyx_t_2);
4115  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4116  __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L3_error)
4117  __Pyx_GOTREF(__pyx_t_3);
4118  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_n_u_aot) < 0) __PYX_ERR(0, 78, __pyx_L3_error)
4119  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_value, __pyx_float_1_0) < 0) __PYX_ERR(0, 78, __pyx_L3_error)
4120  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_min, __pyx_int_0) < 0) __PYX_ERR(0, 78, __pyx_L3_error)
4121  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_max, __pyx_int_100) < 0) __PYX_ERR(0, 78, __pyx_L3_error)
4122  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 78, __pyx_L3_error)
4123  __Pyx_GOTREF(__pyx_t_11);
4124  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4125  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4126  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
4127 
4128  /* "dbocean.pyx":79
4129  * self.pars.add(name='fmf', value=0.5, min=0, max=1)
4130  * self.pars.add(name='aot', value=1.0, min=0, max=100)
4131  * if(self.mode==0 or self.mode==1): # <<<<<<<<<<<<<<
4132  * self.rpts = (chl_pts, wnd_pts, raa_pts, vza_pts, sza_pts)
4133  * self.mpts = (fmf_pts, aot_pts)
4134  */
4135  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 79, __pyx_L3_error)
4136  __Pyx_GOTREF(__pyx_t_11);
4137  __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_11, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 79, __pyx_L3_error)
4138  __Pyx_GOTREF(__pyx_t_3);
4139  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
4140  __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 79, __pyx_L3_error)
4141  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4142  if (!__pyx_t_16) {
4143  } else {
4144  __pyx_t_15 = __pyx_t_16;
4145  goto __pyx_L10_bool_binop_done;
4146  }
4147  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 79, __pyx_L3_error)
4148  __Pyx_GOTREF(__pyx_t_3);
4149  __pyx_t_11 = __Pyx_PyInt_EqObjC(__pyx_t_3, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 79, __pyx_L3_error)
4150  __Pyx_GOTREF(__pyx_t_11);
4151  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4152  __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 79, __pyx_L3_error)
4153  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
4154  __pyx_t_15 = __pyx_t_16;
4155  __pyx_L10_bool_binop_done:;
4156  if (__pyx_t_15) {
4157 
4158  /* "dbocean.pyx":80
4159  * self.pars.add(name='aot', value=1.0, min=0, max=100)
4160  * if(self.mode==0 or self.mode==1):
4161  * self.rpts = (chl_pts, wnd_pts, raa_pts, vza_pts, sza_pts) # <<<<<<<<<<<<<<
4162  * self.mpts = (fmf_pts, aot_pts)
4163  * self.lut = np.transpose(self.lut, (1,2,5,6,7,3,4,0))
4164  */
4165  __pyx_t_11 = PyTuple_New(5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 80, __pyx_L3_error)
4166  __Pyx_GOTREF(__pyx_t_11);
4167  __Pyx_INCREF(__pyx_v_chl_pts);
4168  __Pyx_GIVEREF(__pyx_v_chl_pts);
4169  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_chl_pts);
4170  __Pyx_INCREF(__pyx_v_wnd_pts);
4171  __Pyx_GIVEREF(__pyx_v_wnd_pts);
4172  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_wnd_pts);
4173  __Pyx_INCREF(__pyx_v_raa_pts);
4174  __Pyx_GIVEREF(__pyx_v_raa_pts);
4175  PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_v_raa_pts);
4176  __Pyx_INCREF(__pyx_v_vza_pts);
4177  __Pyx_GIVEREF(__pyx_v_vza_pts);
4178  PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_v_vza_pts);
4179  __Pyx_INCREF(__pyx_v_sza_pts);
4180  __Pyx_GIVEREF(__pyx_v_sza_pts);
4181  PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_v_sza_pts);
4182  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rpts, __pyx_t_11) < 0) __PYX_ERR(0, 80, __pyx_L3_error)
4183  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
4184 
4185  /* "dbocean.pyx":81
4186  * if(self.mode==0 or self.mode==1):
4187  * self.rpts = (chl_pts, wnd_pts, raa_pts, vza_pts, sza_pts)
4188  * self.mpts = (fmf_pts, aot_pts) # <<<<<<<<<<<<<<
4189  * self.lut = np.transpose(self.lut, (1,2,5,6,7,3,4,0))
4190  * elif(self.mode==2):
4191  */
4192  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 81, __pyx_L3_error)
4193  __Pyx_GOTREF(__pyx_t_11);
4194  __Pyx_INCREF(__pyx_v_fmf_pts);
4195  __Pyx_GIVEREF(__pyx_v_fmf_pts);
4196  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_fmf_pts);
4197  __Pyx_INCREF(__pyx_v_aot_pts);
4198  __Pyx_GIVEREF(__pyx_v_aot_pts);
4199  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_aot_pts);
4200  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mpts, __pyx_t_11) < 0) __PYX_ERR(0, 81, __pyx_L3_error)
4201  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
4202 
4203  /* "dbocean.pyx":82
4204  * self.rpts = (chl_pts, wnd_pts, raa_pts, vza_pts, sza_pts)
4205  * self.mpts = (fmf_pts, aot_pts)
4206  * self.lut = np.transpose(self.lut, (1,2,5,6,7,3,4,0)) # <<<<<<<<<<<<<<
4207  * elif(self.mode==2):
4208  * self.rpts = (wnd_pts, raa_pts, vza_pts, sza_pts)
4209  */
4210  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L3_error)
4211  __Pyx_GOTREF(__pyx_t_3);
4212  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_transpose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L3_error)
4213  __Pyx_GOTREF(__pyx_t_2);
4214  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4215  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L3_error)
4216  __Pyx_GOTREF(__pyx_t_3);
4217  __pyx_t_10 = NULL;
4218  __pyx_t_17 = 0;
4219  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
4220  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
4221  if (likely(__pyx_t_10)) {
4222  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4223  __Pyx_INCREF(__pyx_t_10);
4224  __Pyx_INCREF(function);
4225  __Pyx_DECREF_SET(__pyx_t_2, function);
4226  __pyx_t_17 = 1;
4227  }
4228  }
4229  #if CYTHON_FAST_PYCALL
4230  if (PyFunction_Check(__pyx_t_2)) {
4231  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_3, __pyx_tuple__2};
4232  __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 82, __pyx_L3_error)
4233  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
4234  __Pyx_GOTREF(__pyx_t_11);
4235  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4236  } else
4237  #endif
4238  #if CYTHON_FAST_PYCCALL
4239  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
4240  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_3, __pyx_tuple__2};
4241  __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 82, __pyx_L3_error)
4242  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
4243  __Pyx_GOTREF(__pyx_t_11);
4244  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4245  } else
4246  #endif
4247  {
4248  __pyx_t_9 = PyTuple_New(2+__pyx_t_17); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 82, __pyx_L3_error)
4249  __Pyx_GOTREF(__pyx_t_9);
4250  if (__pyx_t_10) {
4251  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL;
4252  }
4253  __Pyx_GIVEREF(__pyx_t_3);
4254  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_17, __pyx_t_3);
4255  __Pyx_INCREF(__pyx_tuple__2);
4256  __Pyx_GIVEREF(__pyx_tuple__2);
4257  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_17, __pyx_tuple__2);
4258  __pyx_t_3 = 0;
4259  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 82, __pyx_L3_error)
4260  __Pyx_GOTREF(__pyx_t_11);
4261  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
4262  }
4263  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4264  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lut, __pyx_t_11) < 0) __PYX_ERR(0, 82, __pyx_L3_error)
4265  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
4266 
4267  /* "dbocean.pyx":79
4268  * self.pars.add(name='fmf', value=0.5, min=0, max=1)
4269  * self.pars.add(name='aot', value=1.0, min=0, max=100)
4270  * if(self.mode==0 or self.mode==1): # <<<<<<<<<<<<<<
4271  * self.rpts = (chl_pts, wnd_pts, raa_pts, vza_pts, sza_pts)
4272  * self.mpts = (fmf_pts, aot_pts)
4273  */
4274  goto __pyx_L9;
4275  }
4276 
4277  /* "dbocean.pyx":83
4278  * self.mpts = (fmf_pts, aot_pts)
4279  * self.lut = np.transpose(self.lut, (1,2,5,6,7,3,4,0))
4280  * elif(self.mode==2): # <<<<<<<<<<<<<<
4281  * self.rpts = (wnd_pts, raa_pts, vza_pts, sza_pts)
4282  * self.mpts = (fmf_pts, aot_pts, chl_pts)
4283  */
4284  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 83, __pyx_L3_error)
4285  __Pyx_GOTREF(__pyx_t_11);
4286  __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_11, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L3_error)
4287  __Pyx_GOTREF(__pyx_t_2);
4288  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
4289  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 83, __pyx_L3_error)
4290  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4291  if (__pyx_t_15) {
4292 
4293  /* "dbocean.pyx":84
4294  * self.lut = np.transpose(self.lut, (1,2,5,6,7,3,4,0))
4295  * elif(self.mode==2):
4296  * self.rpts = (wnd_pts, raa_pts, vza_pts, sza_pts) # <<<<<<<<<<<<<<
4297  * self.mpts = (fmf_pts, aot_pts, chl_pts)
4298  * self.lut = np.transpose(self.lut, (2,5,6,7,3,4,1,0))
4299  */
4300  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L3_error)
4301  __Pyx_GOTREF(__pyx_t_2);
4302  __Pyx_INCREF(__pyx_v_wnd_pts);
4303  __Pyx_GIVEREF(__pyx_v_wnd_pts);
4304  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_wnd_pts);
4305  __Pyx_INCREF(__pyx_v_raa_pts);
4306  __Pyx_GIVEREF(__pyx_v_raa_pts);
4307  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_raa_pts);
4308  __Pyx_INCREF(__pyx_v_vza_pts);
4309  __Pyx_GIVEREF(__pyx_v_vza_pts);
4310  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_vza_pts);
4311  __Pyx_INCREF(__pyx_v_sza_pts);
4312  __Pyx_GIVEREF(__pyx_v_sza_pts);
4313  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_sza_pts);
4314  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rpts, __pyx_t_2) < 0) __PYX_ERR(0, 84, __pyx_L3_error)
4315  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4316 
4317  /* "dbocean.pyx":85
4318  * elif(self.mode==2):
4319  * self.rpts = (wnd_pts, raa_pts, vza_pts, sza_pts)
4320  * self.mpts = (fmf_pts, aot_pts, chl_pts) # <<<<<<<<<<<<<<
4321  * self.lut = np.transpose(self.lut, (2,5,6,7,3,4,1,0))
4322  * self.pars.add(name='chl', value=-2.0, min=-10.0, max=2.0)
4323  */
4324  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L3_error)
4325  __Pyx_GOTREF(__pyx_t_2);
4326  __Pyx_INCREF(__pyx_v_fmf_pts);
4327  __Pyx_GIVEREF(__pyx_v_fmf_pts);
4328  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_fmf_pts);
4329  __Pyx_INCREF(__pyx_v_aot_pts);
4330  __Pyx_GIVEREF(__pyx_v_aot_pts);
4331  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_aot_pts);
4332  __Pyx_INCREF(__pyx_v_chl_pts);
4333  __Pyx_GIVEREF(__pyx_v_chl_pts);
4334  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_chl_pts);
4335  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mpts, __pyx_t_2) < 0) __PYX_ERR(0, 85, __pyx_L3_error)
4336  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4337 
4338  /* "dbocean.pyx":86
4339  * self.rpts = (wnd_pts, raa_pts, vza_pts, sza_pts)
4340  * self.mpts = (fmf_pts, aot_pts, chl_pts)
4341  * self.lut = np.transpose(self.lut, (2,5,6,7,3,4,1,0)) # <<<<<<<<<<<<<<
4342  * self.pars.add(name='chl', value=-2.0, min=-10.0, max=2.0)
4343  * elif(self.mode==3):
4344  */
4345  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 86, __pyx_L3_error)
4346  __Pyx_GOTREF(__pyx_t_11);
4347  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_transpose); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 86, __pyx_L3_error)
4348  __Pyx_GOTREF(__pyx_t_9);
4349  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
4350  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 86, __pyx_L3_error)
4351  __Pyx_GOTREF(__pyx_t_11);
4352  __pyx_t_3 = NULL;
4353  __pyx_t_17 = 0;
4354  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
4355  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
4356  if (likely(__pyx_t_3)) {
4357  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
4358  __Pyx_INCREF(__pyx_t_3);
4359  __Pyx_INCREF(function);
4360  __Pyx_DECREF_SET(__pyx_t_9, function);
4361  __pyx_t_17 = 1;
4362  }
4363  }
4364  #if CYTHON_FAST_PYCALL
4365  if (PyFunction_Check(__pyx_t_9)) {
4366  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_11, __pyx_tuple__3};
4367  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L3_error)
4368  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4369  __Pyx_GOTREF(__pyx_t_2);
4370  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
4371  } else
4372  #endif
4373  #if CYTHON_FAST_PYCCALL
4374  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
4375  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_11, __pyx_tuple__3};
4376  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L3_error)
4377  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4378  __Pyx_GOTREF(__pyx_t_2);
4379  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
4380  } else
4381  #endif
4382  {
4383  __pyx_t_10 = PyTuple_New(2+__pyx_t_17); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 86, __pyx_L3_error)
4384  __Pyx_GOTREF(__pyx_t_10);
4385  if (__pyx_t_3) {
4386  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
4387  }
4388  __Pyx_GIVEREF(__pyx_t_11);
4389  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_17, __pyx_t_11);
4390  __Pyx_INCREF(__pyx_tuple__3);
4391  __Pyx_GIVEREF(__pyx_tuple__3);
4392  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_17, __pyx_tuple__3);
4393  __pyx_t_11 = 0;
4394  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L3_error)
4395  __Pyx_GOTREF(__pyx_t_2);
4396  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
4397  }
4398  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
4399  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lut, __pyx_t_2) < 0) __PYX_ERR(0, 86, __pyx_L3_error)
4400  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4401 
4402  /* "dbocean.pyx":87
4403  * self.mpts = (fmf_pts, aot_pts, chl_pts)
4404  * self.lut = np.transpose(self.lut, (2,5,6,7,3,4,1,0))
4405  * self.pars.add(name='chl', value=-2.0, min=-10.0, max=2.0) # <<<<<<<<<<<<<<
4406  * elif(self.mode==3):
4407  * self.rpts = (chl_pts, raa_pts, vza_pts, sza_pts)
4408  */
4409  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L3_error)
4410  __Pyx_GOTREF(__pyx_t_2);
4411  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_add); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 87, __pyx_L3_error)
4412  __Pyx_GOTREF(__pyx_t_9);
4413  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4414  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L3_error)
4415  __Pyx_GOTREF(__pyx_t_2);
4416  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_n_u_chl) < 0) __PYX_ERR(0, 87, __pyx_L3_error)
4417  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_value, __pyx_float_neg_2_0) < 0) __PYX_ERR(0, 87, __pyx_L3_error)
4418  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_min, __pyx_float_neg_10_0) < 0) __PYX_ERR(0, 87, __pyx_L3_error)
4419  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_max, __pyx_float_2_0) < 0) __PYX_ERR(0, 87, __pyx_L3_error)
4420  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 87, __pyx_L3_error)
4421  __Pyx_GOTREF(__pyx_t_10);
4422  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
4423  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4424  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
4425 
4426  /* "dbocean.pyx":83
4427  * self.mpts = (fmf_pts, aot_pts)
4428  * self.lut = np.transpose(self.lut, (1,2,5,6,7,3,4,0))
4429  * elif(self.mode==2): # <<<<<<<<<<<<<<
4430  * self.rpts = (wnd_pts, raa_pts, vza_pts, sza_pts)
4431  * self.mpts = (fmf_pts, aot_pts, chl_pts)
4432  */
4433  goto __pyx_L9;
4434  }
4435 
4436  /* "dbocean.pyx":88
4437  * self.lut = np.transpose(self.lut, (2,5,6,7,3,4,1,0))
4438  * self.pars.add(name='chl', value=-2.0, min=-10.0, max=2.0)
4439  * elif(self.mode==3): # <<<<<<<<<<<<<<
4440  * self.rpts = (chl_pts, raa_pts, vza_pts, sza_pts)
4441  * self.mpts = (fmf_pts, aot_pts, wnd_pts)
4442  */
4443  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 88, __pyx_L3_error)
4444  __Pyx_GOTREF(__pyx_t_10);
4445  __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_10, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L3_error)
4446  __Pyx_GOTREF(__pyx_t_2);
4447  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
4448  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 88, __pyx_L3_error)
4449  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4450  if (__pyx_t_15) {
4451 
4452  /* "dbocean.pyx":89
4453  * self.pars.add(name='chl', value=-2.0, min=-10.0, max=2.0)
4454  * elif(self.mode==3):
4455  * self.rpts = (chl_pts, raa_pts, vza_pts, sza_pts) # <<<<<<<<<<<<<<
4456  * self.mpts = (fmf_pts, aot_pts, wnd_pts)
4457  * self.lut = np.transpose(self.lut, (1,5,6,7,3,4,2,0))
4458  */
4459  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L3_error)
4460  __Pyx_GOTREF(__pyx_t_2);
4461  __Pyx_INCREF(__pyx_v_chl_pts);
4462  __Pyx_GIVEREF(__pyx_v_chl_pts);
4463  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_chl_pts);
4464  __Pyx_INCREF(__pyx_v_raa_pts);
4465  __Pyx_GIVEREF(__pyx_v_raa_pts);
4466  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_raa_pts);
4467  __Pyx_INCREF(__pyx_v_vza_pts);
4468  __Pyx_GIVEREF(__pyx_v_vza_pts);
4469  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_vza_pts);
4470  __Pyx_INCREF(__pyx_v_sza_pts);
4471  __Pyx_GIVEREF(__pyx_v_sza_pts);
4472  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_sza_pts);
4473  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rpts, __pyx_t_2) < 0) __PYX_ERR(0, 89, __pyx_L3_error)
4474  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4475 
4476  /* "dbocean.pyx":90
4477  * elif(self.mode==3):
4478  * self.rpts = (chl_pts, raa_pts, vza_pts, sza_pts)
4479  * self.mpts = (fmf_pts, aot_pts, wnd_pts) # <<<<<<<<<<<<<<
4480  * self.lut = np.transpose(self.lut, (1,5,6,7,3,4,2,0))
4481  * self.pars.add(name='wnd', value=1.0, min=0, max=100)
4482  */
4483  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L3_error)
4484  __Pyx_GOTREF(__pyx_t_2);
4485  __Pyx_INCREF(__pyx_v_fmf_pts);
4486  __Pyx_GIVEREF(__pyx_v_fmf_pts);
4487  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_fmf_pts);
4488  __Pyx_INCREF(__pyx_v_aot_pts);
4489  __Pyx_GIVEREF(__pyx_v_aot_pts);
4490  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_aot_pts);
4491  __Pyx_INCREF(__pyx_v_wnd_pts);
4492  __Pyx_GIVEREF(__pyx_v_wnd_pts);
4493  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_wnd_pts);
4494  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mpts, __pyx_t_2) < 0) __PYX_ERR(0, 90, __pyx_L3_error)
4495  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4496 
4497  /* "dbocean.pyx":91
4498  * self.rpts = (chl_pts, raa_pts, vza_pts, sza_pts)
4499  * self.mpts = (fmf_pts, aot_pts, wnd_pts)
4500  * self.lut = np.transpose(self.lut, (1,5,6,7,3,4,2,0)) # <<<<<<<<<<<<<<
4501  * self.pars.add(name='wnd', value=1.0, min=0, max=100)
4502  * elif(self.mode==4):
4503  */
4504  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 91, __pyx_L3_error)
4505  __Pyx_GOTREF(__pyx_t_10);
4506  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_transpose); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 91, __pyx_L3_error)
4507  __Pyx_GOTREF(__pyx_t_9);
4508  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
4509  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 91, __pyx_L3_error)
4510  __Pyx_GOTREF(__pyx_t_10);
4511  __pyx_t_11 = NULL;
4512  __pyx_t_17 = 0;
4513  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
4514  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
4515  if (likely(__pyx_t_11)) {
4516  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
4517  __Pyx_INCREF(__pyx_t_11);
4518  __Pyx_INCREF(function);
4519  __Pyx_DECREF_SET(__pyx_t_9, function);
4520  __pyx_t_17 = 1;
4521  }
4522  }
4523  #if CYTHON_FAST_PYCALL
4524  if (PyFunction_Check(__pyx_t_9)) {
4525  PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_10, __pyx_tuple__4};
4526  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L3_error)
4527  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
4528  __Pyx_GOTREF(__pyx_t_2);
4529  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
4530  } else
4531  #endif
4532  #if CYTHON_FAST_PYCCALL
4533  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
4534  PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_10, __pyx_tuple__4};
4535  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L3_error)
4536  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
4537  __Pyx_GOTREF(__pyx_t_2);
4538  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
4539  } else
4540  #endif
4541  {
4542  __pyx_t_3 = PyTuple_New(2+__pyx_t_17); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 91, __pyx_L3_error)
4543  __Pyx_GOTREF(__pyx_t_3);
4544  if (__pyx_t_11) {
4545  __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11); __pyx_t_11 = NULL;
4546  }
4547  __Pyx_GIVEREF(__pyx_t_10);
4548  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_17, __pyx_t_10);
4549  __Pyx_INCREF(__pyx_tuple__4);
4550  __Pyx_GIVEREF(__pyx_tuple__4);
4551  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_17, __pyx_tuple__4);
4552  __pyx_t_10 = 0;
4553  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L3_error)
4554  __Pyx_GOTREF(__pyx_t_2);
4555  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4556  }
4557  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
4558  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lut, __pyx_t_2) < 0) __PYX_ERR(0, 91, __pyx_L3_error)
4559  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4560 
4561  /* "dbocean.pyx":92
4562  * self.mpts = (fmf_pts, aot_pts, wnd_pts)
4563  * self.lut = np.transpose(self.lut, (1,5,6,7,3,4,2,0))
4564  * self.pars.add(name='wnd', value=1.0, min=0, max=100) # <<<<<<<<<<<<<<
4565  * elif(self.mode==4):
4566  * self.rpts = (raa_pts, vza_pts, sza_pts)
4567  */
4568  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L3_error)
4569  __Pyx_GOTREF(__pyx_t_2);
4570  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_add); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 92, __pyx_L3_error)
4571  __Pyx_GOTREF(__pyx_t_9);
4572  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4573  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L3_error)
4574  __Pyx_GOTREF(__pyx_t_2);
4575  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_n_u_wnd) < 0) __PYX_ERR(0, 92, __pyx_L3_error)
4576  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_value, __pyx_float_1_0) < 0) __PYX_ERR(0, 92, __pyx_L3_error)
4577  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_min, __pyx_int_0) < 0) __PYX_ERR(0, 92, __pyx_L3_error)
4578  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_max, __pyx_int_100) < 0) __PYX_ERR(0, 92, __pyx_L3_error)
4579  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 92, __pyx_L3_error)
4580  __Pyx_GOTREF(__pyx_t_3);
4581  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
4582  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4583  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4584 
4585  /* "dbocean.pyx":88
4586  * self.lut = np.transpose(self.lut, (2,5,6,7,3,4,1,0))
4587  * self.pars.add(name='chl', value=-2.0, min=-10.0, max=2.0)
4588  * elif(self.mode==3): # <<<<<<<<<<<<<<
4589  * self.rpts = (chl_pts, raa_pts, vza_pts, sza_pts)
4590  * self.mpts = (fmf_pts, aot_pts, wnd_pts)
4591  */
4592  goto __pyx_L9;
4593  }
4594 
4595  /* "dbocean.pyx":93
4596  * self.lut = np.transpose(self.lut, (1,5,6,7,3,4,2,0))
4597  * self.pars.add(name='wnd', value=1.0, min=0, max=100)
4598  * elif(self.mode==4): # <<<<<<<<<<<<<<
4599  * self.rpts = (raa_pts, vza_pts, sza_pts)
4600  * self.mpts = (fmf_pts, aot_pts, chl_pts, wnd_pts)
4601  */
4602  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L3_error)
4603  __Pyx_GOTREF(__pyx_t_3);
4604  __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_3, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L3_error)
4605  __Pyx_GOTREF(__pyx_t_2);
4606  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4607  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 93, __pyx_L3_error)
4608  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4609  if (__pyx_t_15) {
4610 
4611  /* "dbocean.pyx":94
4612  * self.pars.add(name='wnd', value=1.0, min=0, max=100)
4613  * elif(self.mode==4):
4614  * self.rpts = (raa_pts, vza_pts, sza_pts) # <<<<<<<<<<<<<<
4615  * self.mpts = (fmf_pts, aot_pts, chl_pts, wnd_pts)
4616  * self.lut = np.transpose(self.lut, (5,6,7,3,4,1,2,0))
4617  */
4618  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L3_error)
4619  __Pyx_GOTREF(__pyx_t_2);
4620  __Pyx_INCREF(__pyx_v_raa_pts);
4621  __Pyx_GIVEREF(__pyx_v_raa_pts);
4622  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_raa_pts);
4623  __Pyx_INCREF(__pyx_v_vza_pts);
4624  __Pyx_GIVEREF(__pyx_v_vza_pts);
4625  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_vza_pts);
4626  __Pyx_INCREF(__pyx_v_sza_pts);
4627  __Pyx_GIVEREF(__pyx_v_sza_pts);
4628  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_sza_pts);
4629  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rpts, __pyx_t_2) < 0) __PYX_ERR(0, 94, __pyx_L3_error)
4630  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4631 
4632  /* "dbocean.pyx":95
4633  * elif(self.mode==4):
4634  * self.rpts = (raa_pts, vza_pts, sza_pts)
4635  * self.mpts = (fmf_pts, aot_pts, chl_pts, wnd_pts) # <<<<<<<<<<<<<<
4636  * self.lut = np.transpose(self.lut, (5,6,7,3,4,1,2,0))
4637  * self.pars.add(name='chl', value=-2.0, min=-10.0, max=2.0)
4638  */
4639  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L3_error)
4640  __Pyx_GOTREF(__pyx_t_2);
4641  __Pyx_INCREF(__pyx_v_fmf_pts);
4642  __Pyx_GIVEREF(__pyx_v_fmf_pts);
4643  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_fmf_pts);
4644  __Pyx_INCREF(__pyx_v_aot_pts);
4645  __Pyx_GIVEREF(__pyx_v_aot_pts);
4646  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_aot_pts);
4647  __Pyx_INCREF(__pyx_v_chl_pts);
4648  __Pyx_GIVEREF(__pyx_v_chl_pts);
4649  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_chl_pts);
4650  __Pyx_INCREF(__pyx_v_wnd_pts);
4651  __Pyx_GIVEREF(__pyx_v_wnd_pts);
4652  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_wnd_pts);
4653  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mpts, __pyx_t_2) < 0) __PYX_ERR(0, 95, __pyx_L3_error)
4654  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4655 
4656  /* "dbocean.pyx":96
4657  * self.rpts = (raa_pts, vza_pts, sza_pts)
4658  * self.mpts = (fmf_pts, aot_pts, chl_pts, wnd_pts)
4659  * self.lut = np.transpose(self.lut, (5,6,7,3,4,1,2,0)) # <<<<<<<<<<<<<<
4660  * self.pars.add(name='chl', value=-2.0, min=-10.0, max=2.0)
4661  * self.pars.add(name='wnd', value=1.0, min=0, max=100)
4662  */
4663  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L3_error)
4664  __Pyx_GOTREF(__pyx_t_3);
4665  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_transpose); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 96, __pyx_L3_error)
4666  __Pyx_GOTREF(__pyx_t_9);
4667  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4668  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L3_error)
4669  __Pyx_GOTREF(__pyx_t_3);
4670  __pyx_t_10 = NULL;
4671  __pyx_t_17 = 0;
4672  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
4673  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
4674  if (likely(__pyx_t_10)) {
4675  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
4676  __Pyx_INCREF(__pyx_t_10);
4677  __Pyx_INCREF(function);
4678  __Pyx_DECREF_SET(__pyx_t_9, function);
4679  __pyx_t_17 = 1;
4680  }
4681  }
4682  #if CYTHON_FAST_PYCALL
4683  if (PyFunction_Check(__pyx_t_9)) {
4684  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_3, __pyx_tuple__5};
4685  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L3_error)
4686  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
4687  __Pyx_GOTREF(__pyx_t_2);
4688  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4689  } else
4690  #endif
4691  #if CYTHON_FAST_PYCCALL
4692  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
4693  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_3, __pyx_tuple__5};
4694  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L3_error)
4695  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
4696  __Pyx_GOTREF(__pyx_t_2);
4697  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4698  } else
4699  #endif
4700  {
4701  __pyx_t_11 = PyTuple_New(2+__pyx_t_17); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 96, __pyx_L3_error)
4702  __Pyx_GOTREF(__pyx_t_11);
4703  if (__pyx_t_10) {
4704  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
4705  }
4706  __Pyx_GIVEREF(__pyx_t_3);
4707  PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_17, __pyx_t_3);
4708  __Pyx_INCREF(__pyx_tuple__5);
4709  __Pyx_GIVEREF(__pyx_tuple__5);
4710  PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_17, __pyx_tuple__5);
4711  __pyx_t_3 = 0;
4712  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L3_error)
4713  __Pyx_GOTREF(__pyx_t_2);
4714  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
4715  }
4716  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
4717  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lut, __pyx_t_2) < 0) __PYX_ERR(0, 96, __pyx_L3_error)
4718  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4719 
4720  /* "dbocean.pyx":97
4721  * self.mpts = (fmf_pts, aot_pts, chl_pts, wnd_pts)
4722  * self.lut = np.transpose(self.lut, (5,6,7,3,4,1,2,0))
4723  * self.pars.add(name='chl', value=-2.0, min=-10.0, max=2.0) # <<<<<<<<<<<<<<
4724  * self.pars.add(name='wnd', value=1.0, min=0, max=100)
4725  * except Exception as inst:
4726  */
4727  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L3_error)
4728  __Pyx_GOTREF(__pyx_t_2);
4729  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_add); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 97, __pyx_L3_error)
4730  __Pyx_GOTREF(__pyx_t_9);
4731  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4732  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L3_error)
4733  __Pyx_GOTREF(__pyx_t_2);
4734  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_n_u_chl) < 0) __PYX_ERR(0, 97, __pyx_L3_error)
4735  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_value, __pyx_float_neg_2_0) < 0) __PYX_ERR(0, 97, __pyx_L3_error)
4736  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_min, __pyx_float_neg_10_0) < 0) __PYX_ERR(0, 97, __pyx_L3_error)
4737  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_max, __pyx_float_2_0) < 0) __PYX_ERR(0, 97, __pyx_L3_error)
4738  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 97, __pyx_L3_error)
4739  __Pyx_GOTREF(__pyx_t_11);
4740  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
4741  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4742  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
4743 
4744  /* "dbocean.pyx":98
4745  * self.lut = np.transpose(self.lut, (5,6,7,3,4,1,2,0))
4746  * self.pars.add(name='chl', value=-2.0, min=-10.0, max=2.0)
4747  * self.pars.add(name='wnd', value=1.0, min=0, max=100) # <<<<<<<<<<<<<<
4748  * except Exception as inst:
4749  * print(type(inst))
4750  */
4751  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pars); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 98, __pyx_L3_error)
4752  __Pyx_GOTREF(__pyx_t_11);
4753  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L3_error)
4754  __Pyx_GOTREF(__pyx_t_2);
4755  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
4756  __pyx_t_11 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 98, __pyx_L3_error)
4757  __Pyx_GOTREF(__pyx_t_11);
4758  if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_name, __pyx_n_u_wnd) < 0) __PYX_ERR(0, 98, __pyx_L3_error)
4759  if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_value, __pyx_float_1_0) < 0) __PYX_ERR(0, 98, __pyx_L3_error)
4760  if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_min, __pyx_int_0) < 0) __PYX_ERR(0, 98, __pyx_L3_error)
4761  if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_max, __pyx_int_100) < 0) __PYX_ERR(0, 98, __pyx_L3_error)
4762  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 98, __pyx_L3_error)
4763  __Pyx_GOTREF(__pyx_t_9);
4764  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4765  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
4766  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
4767 
4768  /* "dbocean.pyx":93
4769  * self.lut = np.transpose(self.lut, (1,5,6,7,3,4,2,0))
4770  * self.pars.add(name='wnd', value=1.0, min=0, max=100)
4771  * elif(self.mode==4): # <<<<<<<<<<<<<<
4772  * self.rpts = (raa_pts, vza_pts, sza_pts)
4773  * self.mpts = (fmf_pts, aot_pts, chl_pts, wnd_pts)
4774  */
4775  }
4776  __pyx_L9:;
4777 
4778  /* "dbocean.pyx":42
4779  * self.lut = np.zeros((NWL,NCHL,NWS,NFMF,NAOT,NRAA,NVZA,NSZA))
4780  * fmf_pts = np.zeros((NFMF))
4781  * try: # <<<<<<<<<<<<<<
4782  * self.lut[W470][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m03']
4783  * self.lut[W470][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m03']
4784  */
4785  }
4786  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
4787  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
4788  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
4789  goto __pyx_L8_try_end;
4790  __pyx_L3_error:;
4791  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
4792  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
4793  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
4794  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4795  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4796  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4797  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
4798  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
4799  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
4800  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
4801  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
4802 
4803  /* "dbocean.pyx":99
4804  * self.pars.add(name='chl', value=-2.0, min=-10.0, max=2.0)
4805  * self.pars.add(name='wnd', value=1.0, min=0, max=100)
4806  * except Exception as inst: # <<<<<<<<<<<<<<
4807  * print(type(inst))
4808  * print(inst)
4809  */
4810  __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
4811  if (__pyx_t_17) {
4812  __Pyx_AddTraceback("dbocean.dbocean.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4813  if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_11, &__pyx_t_2) < 0) __PYX_ERR(0, 99, __pyx_L5_except_error)
4814  __Pyx_GOTREF(__pyx_t_9);
4815  __Pyx_GOTREF(__pyx_t_11);
4816  __Pyx_GOTREF(__pyx_t_2);
4817  __Pyx_INCREF(__pyx_t_11);
4818  __pyx_v_inst = __pyx_t_11;
4819  /*try:*/ {
4820 
4821  /* "dbocean.pyx":100
4822  * self.pars.add(name='wnd', value=1.0, min=0, max=100)
4823  * except Exception as inst:
4824  * print(type(inst)) # <<<<<<<<<<<<<<
4825  * print(inst)
4826  * print ("Unable to read LUT file ... exiting")
4827  */
4828  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, ((PyObject *)Py_TYPE(__pyx_v_inst))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 100, __pyx_L17_error)
4829  __Pyx_GOTREF(__pyx_t_3);
4830  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4831 
4832  /* "dbocean.pyx":101
4833  * except Exception as inst:
4834  * print(type(inst))
4835  * print(inst) # <<<<<<<<<<<<<<
4836  * print ("Unable to read LUT file ... exiting")
4837  * sys.exit()
4838  */
4839  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v_inst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 101, __pyx_L17_error)
4840  __Pyx_GOTREF(__pyx_t_3);
4841  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4842 
4843  /* "dbocean.pyx":102
4844  * print(type(inst))
4845  * print(inst)
4846  * print ("Unable to read LUT file ... exiting") # <<<<<<<<<<<<<<
4847  * sys.exit()
4848  *
4849  */
4850  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L17_error)
4851  __Pyx_GOTREF(__pyx_t_3);
4852  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4853 
4854  /* "dbocean.pyx":103
4855  * print(inst)
4856  * print ("Unable to read LUT file ... exiting")
4857  * sys.exit() # <<<<<<<<<<<<<<
4858  *
4859  * def minfun(self, pars, data, scale, rlut):
4860  */
4861  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_sys); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 103, __pyx_L17_error)
4862  __Pyx_GOTREF(__pyx_t_10);
4863  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_exit); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 103, __pyx_L17_error)
4864  __Pyx_GOTREF(__pyx_t_8);
4865  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
4866  __pyx_t_10 = NULL;
4867  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
4868  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
4869  if (likely(__pyx_t_10)) {
4870  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
4871  __Pyx_INCREF(__pyx_t_10);
4872  __Pyx_INCREF(function);
4873  __Pyx_DECREF_SET(__pyx_t_8, function);
4874  }
4875  }
4876  __pyx_t_3 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
4877  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
4878  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 103, __pyx_L17_error)
4879  __Pyx_GOTREF(__pyx_t_3);
4880  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
4881  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4882  }
4883 
4884  /* "dbocean.pyx":99
4885  * self.pars.add(name='chl', value=-2.0, min=-10.0, max=2.0)
4886  * self.pars.add(name='wnd', value=1.0, min=0, max=100)
4887  * except Exception as inst: # <<<<<<<<<<<<<<
4888  * print(type(inst))
4889  * print(inst)
4890  */
4891  /*finally:*/ {
4892  /*normal exit:*/{
4893  __Pyx_DECREF(__pyx_v_inst);
4894  __pyx_v_inst = NULL;
4895  goto __pyx_L18;
4896  }
4897  __pyx_L17_error:;
4898  /*exception exit:*/{
4899  __Pyx_PyThreadState_declare
4900  __Pyx_PyThreadState_assign
4901  __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
4902  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
4903  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
4904  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4905  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4906  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
4907  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
4908  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
4909  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
4910  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25);
4911  if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
4912  __Pyx_XGOTREF(__pyx_t_20);
4913  __Pyx_XGOTREF(__pyx_t_21);
4914  __Pyx_XGOTREF(__pyx_t_22);
4915  __Pyx_XGOTREF(__pyx_t_23);
4916  __Pyx_XGOTREF(__pyx_t_24);
4917  __Pyx_XGOTREF(__pyx_t_25);
4918  __pyx_t_17 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_19 = __pyx_filename;
4919  {
4920  __Pyx_DECREF(__pyx_v_inst);
4921  __pyx_v_inst = NULL;
4922  }
4923  if (PY_MAJOR_VERSION >= 3) {
4924  __Pyx_XGIVEREF(__pyx_t_23);
4925  __Pyx_XGIVEREF(__pyx_t_24);
4926  __Pyx_XGIVEREF(__pyx_t_25);
4927  __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25);
4928  }
4929  __Pyx_XGIVEREF(__pyx_t_20);
4930  __Pyx_XGIVEREF(__pyx_t_21);
4931  __Pyx_XGIVEREF(__pyx_t_22);
4932  __Pyx_ErrRestore(__pyx_t_20, __pyx_t_21, __pyx_t_22);
4933  __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
4934  __pyx_lineno = __pyx_t_17; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_19;
4935  goto __pyx_L5_except_error;
4936  }
4937  __pyx_L18:;
4938  }
4939  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
4940  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
4941  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4942  goto __pyx_L4_exception_handled;
4943  }
4944  goto __pyx_L5_except_error;
4945  __pyx_L5_except_error:;
4946 
4947  /* "dbocean.pyx":42
4948  * self.lut = np.zeros((NWL,NCHL,NWS,NFMF,NAOT,NRAA,NVZA,NSZA))
4949  * fmf_pts = np.zeros((NFMF))
4950  * try: # <<<<<<<<<<<<<<
4951  * self.lut[W470][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m03']
4952  * self.lut[W470][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m03']
4953  */
4954  __Pyx_XGIVEREF(__pyx_t_12);
4955  __Pyx_XGIVEREF(__pyx_t_13);
4956  __Pyx_XGIVEREF(__pyx_t_14);
4957  __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
4958  goto __pyx_L1_error;
4959  __pyx_L4_exception_handled:;
4960  __Pyx_XGIVEREF(__pyx_t_12);
4961  __Pyx_XGIVEREF(__pyx_t_13);
4962  __Pyx_XGIVEREF(__pyx_t_14);
4963  __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
4964  __pyx_L8_try_end:;
4965  }
4966 
4967  /* "dbocean.pyx":35
4968  * class dbocean(object):
4969  *
4970  * def __init__(self, lut_filepath, mode): # <<<<<<<<<<<<<<
4971  * print ("Reading Deepblue LUT: " + lut_filepath)
4972  * self.mode = mode
4973  */
4974 
4975  /* function exit code */
4976  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4977  goto __pyx_L0;
4978  __pyx_L1_error:;
4979  __Pyx_XDECREF(__pyx_t_1);
4980  __Pyx_XDECREF(__pyx_t_2);
4981  __Pyx_XDECREF(__pyx_t_3);
4982  __Pyx_XDECREF(__pyx_t_4);
4983  __Pyx_XDECREF(__pyx_t_5);
4984  __Pyx_XDECREF(__pyx_t_6);
4985  __Pyx_XDECREF(__pyx_t_7);
4986  __Pyx_XDECREF(__pyx_t_8);
4987  __Pyx_XDECREF(__pyx_t_9);
4988  __Pyx_XDECREF(__pyx_t_10);
4989  __Pyx_XDECREF(__pyx_t_11);
4990  __Pyx_AddTraceback("dbocean.dbocean.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4991  __pyx_r = NULL;
4992  __pyx_L0:;
4993  __Pyx_XDECREF(__pyx_v_fmf_pts);
4994  __Pyx_XDECREF(__pyx_v_raa_pts);
4995  __Pyx_XDECREF(__pyx_v_vza_pts);
4996  __Pyx_XDECREF(__pyx_v_sza_pts);
4997  __Pyx_XDECREF(__pyx_v_wnd_pts);
4998  __Pyx_XDECREF(__pyx_v_chl_pts);
4999  __Pyx_XDECREF(__pyx_v_aot_pts);
5000  __Pyx_XDECREF(__pyx_v_inst);
5001  __Pyx_XGIVEREF(__pyx_r);
5002  __Pyx_RefNannyFinishContext();
5003  return __pyx_r;
5004 }
5005 
5006 /* "dbocean.pyx":105
5007  * sys.exit()
5008  *
5009  * def minfun(self, pars, data, scale, rlut): # <<<<<<<<<<<<<<
5010  * if(self.mode==0 or self.mode==1):
5011  * rxi = np.stack((pars['fmf'], pars['aot']))
5012  */
5013 
5014 /* Python wrapper */
5015 static PyObject *__pyx_pw_7dbocean_7dbocean_3minfun(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5016 static PyMethodDef __pyx_mdef_7dbocean_7dbocean_3minfun = {"minfun", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7dbocean_7dbocean_3minfun, METH_VARARGS|METH_KEYWORDS, 0};
5017 static PyObject *__pyx_pw_7dbocean_7dbocean_3minfun(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5018  PyObject *__pyx_v_self = 0;
5019  PyObject *__pyx_v_pars = 0;
5020  PyObject *__pyx_v_data = 0;
5021  PyObject *__pyx_v_scale = 0;
5022  PyObject *__pyx_v_rlut = 0;
5023  int __pyx_lineno = 0;
5024  const char *__pyx_filename = NULL;
5025  int __pyx_clineno = 0;
5026  PyObject *__pyx_r = 0;
5027  __Pyx_RefNannyDeclarations
5028  __Pyx_RefNannySetupContext("minfun (wrapper)", 0);
5029  {
5030  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_pars,&__pyx_n_s_data,&__pyx_n_s_scale,&__pyx_n_s_rlut,0};
5031  PyObject* values[5] = {0,0,0,0,0};
5032  if (unlikely(__pyx_kwds)) {
5033  Py_ssize_t kw_args;
5034  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5035  switch (pos_args) {
5036  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5037  CYTHON_FALLTHROUGH;
5038  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5039  CYTHON_FALLTHROUGH;
5040  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5041  CYTHON_FALLTHROUGH;
5042  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5043  CYTHON_FALLTHROUGH;
5044  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5045  CYTHON_FALLTHROUGH;
5046  case 0: break;
5047  default: goto __pyx_L5_argtuple_error;
5048  }
5049  kw_args = PyDict_Size(__pyx_kwds);
5050  switch (pos_args) {
5051  case 0:
5052  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
5053  else goto __pyx_L5_argtuple_error;
5054  CYTHON_FALLTHROUGH;
5055  case 1:
5056  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pars)) != 0)) kw_args--;
5057  else {
5058  __Pyx_RaiseArgtupleInvalid("minfun", 1, 5, 5, 1); __PYX_ERR(0, 105, __pyx_L3_error)
5059  }
5060  CYTHON_FALLTHROUGH;
5061  case 2:
5062  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
5063  else {
5064  __Pyx_RaiseArgtupleInvalid("minfun", 1, 5, 5, 2); __PYX_ERR(0, 105, __pyx_L3_error)
5065  }
5066  CYTHON_FALLTHROUGH;
5067  case 3:
5068  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_scale)) != 0)) kw_args--;
5069  else {
5070  __Pyx_RaiseArgtupleInvalid("minfun", 1, 5, 5, 3); __PYX_ERR(0, 105, __pyx_L3_error)
5071  }
5072  CYTHON_FALLTHROUGH;
5073  case 4:
5074  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rlut)) != 0)) kw_args--;
5075  else {
5076  __Pyx_RaiseArgtupleInvalid("minfun", 1, 5, 5, 4); __PYX_ERR(0, 105, __pyx_L3_error)
5077  }
5078  }
5079  if (unlikely(kw_args > 0)) {
5080  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "minfun") < 0)) __PYX_ERR(0, 105, __pyx_L3_error)
5081  }
5082  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
5083  goto __pyx_L5_argtuple_error;
5084  } else {
5085  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5086  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5087  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5088  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5089  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5090  }
5091  __pyx_v_self = values[0];
5092  __pyx_v_pars = values[1];
5093  __pyx_v_data = values[2];
5094  __pyx_v_scale = values[3];
5095  __pyx_v_rlut = values[4];
5096  }
5097  goto __pyx_L4_argument_unpacking_done;
5098  __pyx_L5_argtuple_error:;
5099  __Pyx_RaiseArgtupleInvalid("minfun", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 105, __pyx_L3_error)
5100  __pyx_L3_error:;
5101  __Pyx_AddTraceback("dbocean.dbocean.minfun", __pyx_clineno, __pyx_lineno, __pyx_filename);
5102  __Pyx_RefNannyFinishContext();
5103  return NULL;
5104  __pyx_L4_argument_unpacking_done:;
5105  __pyx_r = __pyx_pf_7dbocean_7dbocean_2minfun(__pyx_self, __pyx_v_self, __pyx_v_pars, __pyx_v_data, __pyx_v_scale, __pyx_v_rlut);
5106 
5107  /* function exit code */
5108  __Pyx_RefNannyFinishContext();
5109  return __pyx_r;
5110 }
5111 
5112 static PyObject *__pyx_pf_7dbocean_7dbocean_2minfun(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pars, PyObject *__pyx_v_data, PyObject *__pyx_v_scale, PyObject *__pyx_v_rlut) {
5113  PyObject *__pyx_v_rxi = NULL;
5114  PyObject *__pyx_v_model = NULL;
5115  PyObject *__pyx_r = NULL;
5116  __Pyx_RefNannyDeclarations
5117  int __pyx_t_1;
5118  PyObject *__pyx_t_2 = NULL;
5119  PyObject *__pyx_t_3 = NULL;
5120  int __pyx_t_4;
5121  PyObject *__pyx_t_5 = NULL;
5122  PyObject *__pyx_t_6 = NULL;
5123  PyObject *__pyx_t_7 = NULL;
5124  PyObject *__pyx_t_8 = NULL;
5125  PyObject *__pyx_t_9 = NULL;
5126  int __pyx_lineno = 0;
5127  const char *__pyx_filename = NULL;
5128  int __pyx_clineno = 0;
5129  __Pyx_RefNannySetupContext("minfun", 0);
5130 
5131  /* "dbocean.pyx":106
5132  *
5133  * def minfun(self, pars, data, scale, rlut):
5134  * if(self.mode==0 or self.mode==1): # <<<<<<<<<<<<<<
5135  * rxi = np.stack((pars['fmf'], pars['aot']))
5136  * elif(self.mode==2):
5137  */
5138  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error)
5139  __Pyx_GOTREF(__pyx_t_2);
5140  __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 106, __pyx_L1_error)
5141  __Pyx_GOTREF(__pyx_t_3);
5142  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5143  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 106, __pyx_L1_error)
5144  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5145  if (!__pyx_t_4) {
5146  } else {
5147  __pyx_t_1 = __pyx_t_4;
5148  goto __pyx_L4_bool_binop_done;
5149  }
5150  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 106, __pyx_L1_error)
5151  __Pyx_GOTREF(__pyx_t_3);
5152  __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_3, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error)
5153  __Pyx_GOTREF(__pyx_t_2);
5154  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5155  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 106, __pyx_L1_error)
5156  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5157  __pyx_t_1 = __pyx_t_4;
5158  __pyx_L4_bool_binop_done:;
5159  if (__pyx_t_1) {
5160 
5161  /* "dbocean.pyx":107
5162  * def minfun(self, pars, data, scale, rlut):
5163  * if(self.mode==0 or self.mode==1):
5164  * rxi = np.stack((pars['fmf'], pars['aot'])) # <<<<<<<<<<<<<<
5165  * elif(self.mode==2):
5166  * rxi = np.stack((pars['fmf'], pars['aot'], pars['chl']))
5167  */
5168  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
5169  __Pyx_GOTREF(__pyx_t_3);
5170  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_stack); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 107, __pyx_L1_error)
5171  __Pyx_GOTREF(__pyx_t_5);
5172  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5173  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_pars, __pyx_n_u_fmf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
5174  __Pyx_GOTREF(__pyx_t_3);
5175  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_pars, __pyx_n_u_aot); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 107, __pyx_L1_error)
5176  __Pyx_GOTREF(__pyx_t_6);
5177  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 107, __pyx_L1_error)
5178  __Pyx_GOTREF(__pyx_t_7);
5179  __Pyx_GIVEREF(__pyx_t_3);
5180  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
5181  __Pyx_GIVEREF(__pyx_t_6);
5182  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
5183  __pyx_t_3 = 0;
5184  __pyx_t_6 = 0;
5185  __pyx_t_6 = NULL;
5186  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
5187  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
5188  if (likely(__pyx_t_6)) {
5189  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
5190  __Pyx_INCREF(__pyx_t_6);
5191  __Pyx_INCREF(function);
5192  __Pyx_DECREF_SET(__pyx_t_5, function);
5193  }
5194  }
5195  __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
5196  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
5197  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5198  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
5199  __Pyx_GOTREF(__pyx_t_2);
5200  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5201  __pyx_v_rxi = __pyx_t_2;
5202  __pyx_t_2 = 0;
5203 
5204  /* "dbocean.pyx":106
5205  *
5206  * def minfun(self, pars, data, scale, rlut):
5207  * if(self.mode==0 or self.mode==1): # <<<<<<<<<<<<<<
5208  * rxi = np.stack((pars['fmf'], pars['aot']))
5209  * elif(self.mode==2):
5210  */
5211  goto __pyx_L3;
5212  }
5213 
5214  /* "dbocean.pyx":108
5215  * if(self.mode==0 or self.mode==1):
5216  * rxi = np.stack((pars['fmf'], pars['aot']))
5217  * elif(self.mode==2): # <<<<<<<<<<<<<<
5218  * rxi = np.stack((pars['fmf'], pars['aot'], pars['chl']))
5219  * elif(self.mode==3):
5220  */
5221  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error)
5222  __Pyx_GOTREF(__pyx_t_2);
5223  __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 108, __pyx_L1_error)
5224  __Pyx_GOTREF(__pyx_t_5);
5225  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5226  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 108, __pyx_L1_error)
5227  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5228  if (__pyx_t_1) {
5229 
5230  /* "dbocean.pyx":109
5231  * rxi = np.stack((pars['fmf'], pars['aot']))
5232  * elif(self.mode==2):
5233  * rxi = np.stack((pars['fmf'], pars['aot'], pars['chl'])) # <<<<<<<<<<<<<<
5234  * elif(self.mode==3):
5235  * rxi = np.stack((pars['fmf'], pars['aot'], pars['wnd']))
5236  */
5237  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error)
5238  __Pyx_GOTREF(__pyx_t_2);
5239  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stack); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 109, __pyx_L1_error)
5240  __Pyx_GOTREF(__pyx_t_7);
5241  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5242  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_pars, __pyx_n_u_fmf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error)
5243  __Pyx_GOTREF(__pyx_t_2);
5244  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_pars, __pyx_n_u_aot); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 109, __pyx_L1_error)
5245  __Pyx_GOTREF(__pyx_t_6);
5246  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_pars, __pyx_n_u_chl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 109, __pyx_L1_error)
5247  __Pyx_GOTREF(__pyx_t_3);
5248  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 109, __pyx_L1_error)
5249  __Pyx_GOTREF(__pyx_t_8);
5250  __Pyx_GIVEREF(__pyx_t_2);
5251  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
5252  __Pyx_GIVEREF(__pyx_t_6);
5253  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
5254  __Pyx_GIVEREF(__pyx_t_3);
5255  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_3);
5256  __pyx_t_2 = 0;
5257  __pyx_t_6 = 0;
5258  __pyx_t_3 = 0;
5259  __pyx_t_3 = NULL;
5260  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
5261  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
5262  if (likely(__pyx_t_3)) {
5263  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
5264  __Pyx_INCREF(__pyx_t_3);
5265  __Pyx_INCREF(function);
5266  __Pyx_DECREF_SET(__pyx_t_7, function);
5267  }
5268  }
5269  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
5270  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5271  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5272  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 109, __pyx_L1_error)
5273  __Pyx_GOTREF(__pyx_t_5);
5274  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5275  __pyx_v_rxi = __pyx_t_5;
5276  __pyx_t_5 = 0;
5277 
5278  /* "dbocean.pyx":108
5279  * if(self.mode==0 or self.mode==1):
5280  * rxi = np.stack((pars['fmf'], pars['aot']))
5281  * elif(self.mode==2): # <<<<<<<<<<<<<<
5282  * rxi = np.stack((pars['fmf'], pars['aot'], pars['chl']))
5283  * elif(self.mode==3):
5284  */
5285  goto __pyx_L3;
5286  }
5287 
5288  /* "dbocean.pyx":110
5289  * elif(self.mode==2):
5290  * rxi = np.stack((pars['fmf'], pars['aot'], pars['chl']))
5291  * elif(self.mode==3): # <<<<<<<<<<<<<<
5292  * rxi = np.stack((pars['fmf'], pars['aot'], pars['wnd']))
5293  * elif(self.mode==4):
5294  */
5295  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 110, __pyx_L1_error)
5296  __Pyx_GOTREF(__pyx_t_5);
5297  __pyx_t_7 = __Pyx_PyInt_EqObjC(__pyx_t_5, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 110, __pyx_L1_error)
5298  __Pyx_GOTREF(__pyx_t_7);
5299  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5300  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 110, __pyx_L1_error)
5301  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5302  if (__pyx_t_1) {
5303 
5304  /* "dbocean.pyx":111
5305  * rxi = np.stack((pars['fmf'], pars['aot'], pars['chl']))
5306  * elif(self.mode==3):
5307  * rxi = np.stack((pars['fmf'], pars['aot'], pars['wnd'])) # <<<<<<<<<<<<<<
5308  * elif(self.mode==4):
5309  * rxi = np.stack((pars['fmf'], pars['aot'], pars['chl'], pars['wnd']))
5310  */
5311  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 111, __pyx_L1_error)
5312  __Pyx_GOTREF(__pyx_t_5);
5313  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_stack); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 111, __pyx_L1_error)
5314  __Pyx_GOTREF(__pyx_t_8);
5315  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5316  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_pars, __pyx_n_u_fmf); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 111, __pyx_L1_error)
5317  __Pyx_GOTREF(__pyx_t_5);
5318  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_pars, __pyx_n_u_aot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error)
5319  __Pyx_GOTREF(__pyx_t_3);
5320  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_pars, __pyx_n_u_wnd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 111, __pyx_L1_error)
5321  __Pyx_GOTREF(__pyx_t_6);
5322  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
5323  __Pyx_GOTREF(__pyx_t_2);
5324  __Pyx_GIVEREF(__pyx_t_5);
5325  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
5326  __Pyx_GIVEREF(__pyx_t_3);
5327  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
5328  __Pyx_GIVEREF(__pyx_t_6);
5329  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_6);
5330  __pyx_t_5 = 0;
5331  __pyx_t_3 = 0;
5332  __pyx_t_6 = 0;
5333  __pyx_t_6 = NULL;
5334  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
5335  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
5336  if (likely(__pyx_t_6)) {
5337  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
5338  __Pyx_INCREF(__pyx_t_6);
5339  __Pyx_INCREF(function);
5340  __Pyx_DECREF_SET(__pyx_t_8, function);
5341  }
5342  }
5343  __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_2);
5344  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
5345  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5346  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 111, __pyx_L1_error)
5347  __Pyx_GOTREF(__pyx_t_7);
5348  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5349  __pyx_v_rxi = __pyx_t_7;
5350  __pyx_t_7 = 0;
5351 
5352  /* "dbocean.pyx":110
5353  * elif(self.mode==2):
5354  * rxi = np.stack((pars['fmf'], pars['aot'], pars['chl']))
5355  * elif(self.mode==3): # <<<<<<<<<<<<<<
5356  * rxi = np.stack((pars['fmf'], pars['aot'], pars['wnd']))
5357  * elif(self.mode==4):
5358  */
5359  goto __pyx_L3;
5360  }
5361 
5362  /* "dbocean.pyx":112
5363  * elif(self.mode==3):
5364  * rxi = np.stack((pars['fmf'], pars['aot'], pars['wnd']))
5365  * elif(self.mode==4): # <<<<<<<<<<<<<<
5366  * rxi = np.stack((pars['fmf'], pars['aot'], pars['chl'], pars['wnd']))
5367  * model = trp.interpn(self.mpts,rlut,rxi,
5368  */
5369  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 112, __pyx_L1_error)
5370  __Pyx_GOTREF(__pyx_t_7);
5371  __pyx_t_8 = __Pyx_PyInt_EqObjC(__pyx_t_7, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 112, __pyx_L1_error)
5372  __Pyx_GOTREF(__pyx_t_8);
5373  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5374  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 112, __pyx_L1_error)
5375  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5376  if (__pyx_t_1) {
5377 
5378  /* "dbocean.pyx":113
5379  * rxi = np.stack((pars['fmf'], pars['aot'], pars['wnd']))
5380  * elif(self.mode==4):
5381  * rxi = np.stack((pars['fmf'], pars['aot'], pars['chl'], pars['wnd'])) # <<<<<<<<<<<<<<
5382  * model = trp.interpn(self.mpts,rlut,rxi,
5383  * bounds_error=False,fill_value=None )[0]
5384  */
5385  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 113, __pyx_L1_error)
5386  __Pyx_GOTREF(__pyx_t_7);
5387  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_stack); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
5388  __Pyx_GOTREF(__pyx_t_2);
5389  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5390  __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_pars, __pyx_n_u_fmf); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 113, __pyx_L1_error)
5391  __Pyx_GOTREF(__pyx_t_7);
5392  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_pars, __pyx_n_u_aot); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error)
5393  __Pyx_GOTREF(__pyx_t_6);
5394  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_pars, __pyx_n_u_chl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error)
5395  __Pyx_GOTREF(__pyx_t_3);
5396  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_pars, __pyx_n_u_wnd); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 113, __pyx_L1_error)
5397  __Pyx_GOTREF(__pyx_t_5);
5398  __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 113, __pyx_L1_error)
5399  __Pyx_GOTREF(__pyx_t_9);
5400  __Pyx_GIVEREF(__pyx_t_7);
5401  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7);
5402  __Pyx_GIVEREF(__pyx_t_6);
5403  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6);
5404  __Pyx_GIVEREF(__pyx_t_3);
5405  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_3);
5406  __Pyx_GIVEREF(__pyx_t_5);
5407  PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_5);
5408  __pyx_t_7 = 0;
5409  __pyx_t_6 = 0;
5410  __pyx_t_3 = 0;
5411  __pyx_t_5 = 0;
5412  __pyx_t_5 = NULL;
5413  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
5414  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
5415  if (likely(__pyx_t_5)) {
5416  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5417  __Pyx_INCREF(__pyx_t_5);
5418  __Pyx_INCREF(function);
5419  __Pyx_DECREF_SET(__pyx_t_2, function);
5420  }
5421  }
5422  __pyx_t_8 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_9);
5423  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
5424  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5425  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 113, __pyx_L1_error)
5426  __Pyx_GOTREF(__pyx_t_8);
5427  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5428  __pyx_v_rxi = __pyx_t_8;
5429  __pyx_t_8 = 0;
5430 
5431  /* "dbocean.pyx":112
5432  * elif(self.mode==3):
5433  * rxi = np.stack((pars['fmf'], pars['aot'], pars['wnd']))
5434  * elif(self.mode==4): # <<<<<<<<<<<<<<
5435  * rxi = np.stack((pars['fmf'], pars['aot'], pars['chl'], pars['wnd']))
5436  * model = trp.interpn(self.mpts,rlut,rxi,
5437  */
5438  }
5439  __pyx_L3:;
5440 
5441  /* "dbocean.pyx":114
5442  * elif(self.mode==4):
5443  * rxi = np.stack((pars['fmf'], pars['aot'], pars['chl'], pars['wnd']))
5444  * model = trp.interpn(self.mpts,rlut,rxi, # <<<<<<<<<<<<<<
5445  * bounds_error=False,fill_value=None )[0]
5446  * return (model - data)*scale
5447  */
5448  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_trp); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 114, __pyx_L1_error)
5449  __Pyx_GOTREF(__pyx_t_8);
5450  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_interpn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error)
5451  __Pyx_GOTREF(__pyx_t_2);
5452  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5453  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mpts); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 114, __pyx_L1_error)
5454  __Pyx_GOTREF(__pyx_t_8);
5455  if (unlikely(!__pyx_v_rxi)) { __Pyx_RaiseUnboundLocalError("rxi"); __PYX_ERR(0, 114, __pyx_L1_error) }
5456  __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 114, __pyx_L1_error)
5457  __Pyx_GOTREF(__pyx_t_9);
5458  __Pyx_GIVEREF(__pyx_t_8);
5459  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
5460  __Pyx_INCREF(__pyx_v_rlut);
5461  __Pyx_GIVEREF(__pyx_v_rlut);
5462  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_rlut);
5463  __Pyx_INCREF(__pyx_v_rxi);
5464  __Pyx_GIVEREF(__pyx_v_rxi);
5465  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_rxi);
5466  __pyx_t_8 = 0;
5467 
5468  /* "dbocean.pyx":115
5469  * rxi = np.stack((pars['fmf'], pars['aot'], pars['chl'], pars['wnd']))
5470  * model = trp.interpn(self.mpts,rlut,rxi,
5471  * bounds_error=False,fill_value=None )[0] # <<<<<<<<<<<<<<
5472  * return (model - data)*scale
5473  *
5474  */
5475  __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 115, __pyx_L1_error)
5476  __Pyx_GOTREF(__pyx_t_8);
5477  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_bounds_error, Py_False) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
5478  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_fill_value, Py_None) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
5479 
5480  /* "dbocean.pyx":114
5481  * elif(self.mode==4):
5482  * rxi = np.stack((pars['fmf'], pars['aot'], pars['chl'], pars['wnd']))
5483  * model = trp.interpn(self.mpts,rlut,rxi, # <<<<<<<<<<<<<<
5484  * bounds_error=False,fill_value=None )[0]
5485  * return (model - data)*scale
5486  */
5487  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 114, __pyx_L1_error)
5488  __Pyx_GOTREF(__pyx_t_5);
5489  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5490  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5491  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5492 
5493  /* "dbocean.pyx":115
5494  * rxi = np.stack((pars['fmf'], pars['aot'], pars['chl'], pars['wnd']))
5495  * model = trp.interpn(self.mpts,rlut,rxi,
5496  * bounds_error=False,fill_value=None )[0] # <<<<<<<<<<<<<<
5497  * return (model - data)*scale
5498  *
5499  */
5500  __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 115, __pyx_L1_error)
5501  __Pyx_GOTREF(__pyx_t_8);
5502  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5503  __pyx_v_model = __pyx_t_8;
5504  __pyx_t_8 = 0;
5505 
5506  /* "dbocean.pyx":116
5507  * model = trp.interpn(self.mpts,rlut,rxi,
5508  * bounds_error=False,fill_value=None )[0]
5509  * return (model - data)*scale # <<<<<<<<<<<<<<
5510  *
5511  * def process(self,rfl,sza,vza,raa,wnd,chl):
5512  */
5513  __Pyx_XDECREF(__pyx_r);
5514  __pyx_t_8 = PyNumber_Subtract(__pyx_v_model, __pyx_v_data); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 116, __pyx_L1_error)
5515  __Pyx_GOTREF(__pyx_t_8);
5516  __pyx_t_5 = PyNumber_Multiply(__pyx_t_8, __pyx_v_scale); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 116, __pyx_L1_error)
5517  __Pyx_GOTREF(__pyx_t_5);
5518  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5519  __pyx_r = __pyx_t_5;
5520  __pyx_t_5 = 0;
5521  goto __pyx_L0;
5522 
5523  /* "dbocean.pyx":105
5524  * sys.exit()
5525  *
5526  * def minfun(self, pars, data, scale, rlut): # <<<<<<<<<<<<<<
5527  * if(self.mode==0 or self.mode==1):
5528  * rxi = np.stack((pars['fmf'], pars['aot']))
5529  */
5530 
5531  /* function exit code */
5532  __pyx_L1_error:;
5533  __Pyx_XDECREF(__pyx_t_2);
5534  __Pyx_XDECREF(__pyx_t_3);
5535  __Pyx_XDECREF(__pyx_t_5);
5536  __Pyx_XDECREF(__pyx_t_6);
5537  __Pyx_XDECREF(__pyx_t_7);
5538  __Pyx_XDECREF(__pyx_t_8);
5539  __Pyx_XDECREF(__pyx_t_9);
5540  __Pyx_AddTraceback("dbocean.dbocean.minfun", __pyx_clineno, __pyx_lineno, __pyx_filename);
5541  __pyx_r = NULL;
5542  __pyx_L0:;
5543  __Pyx_XDECREF(__pyx_v_rxi);
5544  __Pyx_XDECREF(__pyx_v_model);
5545  __Pyx_XGIVEREF(__pyx_r);
5546  __Pyx_RefNannyFinishContext();
5547  return __pyx_r;
5548 }
5549 
5550 /* "dbocean.pyx":118
5551  * return (model - data)*scale
5552  *
5553  * def process(self,rfl,sza,vza,raa,wnd,chl): # <<<<<<<<<<<<<<
5554  * if(self.mode==0 or self.mode==1):
5555  * if(self.mode==1):
5556  */
5557 
5558 /* Python wrapper */
5559 static PyObject *__pyx_pw_7dbocean_7dbocean_5process(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5560 static PyMethodDef __pyx_mdef_7dbocean_7dbocean_5process = {"process", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7dbocean_7dbocean_5process, METH_VARARGS|METH_KEYWORDS, 0};
5561 static PyObject *__pyx_pw_7dbocean_7dbocean_5process(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5562  PyObject *__pyx_v_self = 0;
5563  PyObject *__pyx_v_rfl = 0;
5564  PyObject *__pyx_v_sza = 0;
5565  PyObject *__pyx_v_vza = 0;
5566  PyObject *__pyx_v_raa = 0;
5567  PyObject *__pyx_v_wnd = 0;
5568  PyObject *__pyx_v_chl = 0;
5569  int __pyx_lineno = 0;
5570  const char *__pyx_filename = NULL;
5571  int __pyx_clineno = 0;
5572  PyObject *__pyx_r = 0;
5573  __Pyx_RefNannyDeclarations
5574  __Pyx_RefNannySetupContext("process (wrapper)", 0);
5575  {
5576  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,&__pyx_n_s_chl,0};
5577  PyObject* values[7] = {0,0,0,0,0,0,0};
5578  if (unlikely(__pyx_kwds)) {
5579  Py_ssize_t kw_args;
5580  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5581  switch (pos_args) {
5582  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
5583  CYTHON_FALLTHROUGH;
5584  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5585  CYTHON_FALLTHROUGH;
5586  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5587  CYTHON_FALLTHROUGH;
5588  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5589  CYTHON_FALLTHROUGH;
5590  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5591  CYTHON_FALLTHROUGH;
5592  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5593  CYTHON_FALLTHROUGH;
5594  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5595  CYTHON_FALLTHROUGH;
5596  case 0: break;
5597  default: goto __pyx_L5_argtuple_error;
5598  }
5599  kw_args = PyDict_Size(__pyx_kwds);
5600  switch (pos_args) {
5601  case 0:
5602  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
5603  else goto __pyx_L5_argtuple_error;
5604  CYTHON_FALLTHROUGH;
5605  case 1:
5606  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rfl)) != 0)) kw_args--;
5607  else {
5608  __Pyx_RaiseArgtupleInvalid("process", 1, 7, 7, 1); __PYX_ERR(0, 118, __pyx_L3_error)
5609  }
5610  CYTHON_FALLTHROUGH;
5611  case 2:
5612  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sza)) != 0)) kw_args--;
5613  else {
5614  __Pyx_RaiseArgtupleInvalid("process", 1, 7, 7, 2); __PYX_ERR(0, 118, __pyx_L3_error)
5615  }
5616  CYTHON_FALLTHROUGH;
5617  case 3:
5618  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vza)) != 0)) kw_args--;
5619  else {
5620  __Pyx_RaiseArgtupleInvalid("process", 1, 7, 7, 3); __PYX_ERR(0, 118, __pyx_L3_error)
5621  }
5622  CYTHON_FALLTHROUGH;
5623  case 4:
5624  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_raa)) != 0)) kw_args--;
5625  else {
5626  __Pyx_RaiseArgtupleInvalid("process", 1, 7, 7, 4); __PYX_ERR(0, 118, __pyx_L3_error)
5627  }
5628  CYTHON_FALLTHROUGH;
5629  case 5:
5630  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_wnd)) != 0)) kw_args--;
5631  else {
5632  __Pyx_RaiseArgtupleInvalid("process", 1, 7, 7, 5); __PYX_ERR(0, 118, __pyx_L3_error)
5633  }
5634  CYTHON_FALLTHROUGH;
5635  case 6:
5636  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_chl)) != 0)) kw_args--;
5637  else {
5638  __Pyx_RaiseArgtupleInvalid("process", 1, 7, 7, 6); __PYX_ERR(0, 118, __pyx_L3_error)
5639  }
5640  }
5641  if (unlikely(kw_args > 0)) {
5642  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "process") < 0)) __PYX_ERR(0, 118, __pyx_L3_error)
5643  }
5644  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
5645  goto __pyx_L5_argtuple_error;
5646  } else {
5647  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5648  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5649  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5650  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5651  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5652  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5653  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
5654  }
5655  __pyx_v_self = values[0];
5656  __pyx_v_rfl = values[1];
5657  __pyx_v_sza = values[2];
5658  __pyx_v_vza = values[3];
5659  __pyx_v_raa = values[4];
5660  __pyx_v_wnd = values[5];
5661  __pyx_v_chl = values[6];
5662  }
5663  goto __pyx_L4_argument_unpacking_done;
5664  __pyx_L5_argtuple_error:;
5665  __Pyx_RaiseArgtupleInvalid("process", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 118, __pyx_L3_error)
5666  __pyx_L3_error:;
5667  __Pyx_AddTraceback("dbocean.dbocean.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
5668  __Pyx_RefNannyFinishContext();
5669  return NULL;
5670  __pyx_L4_argument_unpacking_done:;
5671  __pyx_r = __pyx_pf_7dbocean_7dbocean_4process(__pyx_self, __pyx_v_self, __pyx_v_rfl, __pyx_v_sza, __pyx_v_vza, __pyx_v_raa, __pyx_v_wnd, __pyx_v_chl);
5672 
5673  /* function exit code */
5674  __Pyx_RefNannyFinishContext();
5675  return __pyx_r;
5676 }
5677 
5678 static PyObject *__pyx_pf_7dbocean_7dbocean_4process(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, PyObject *__pyx_v_chl) {
5679  PyObject *__pyx_v_xi = NULL;
5680  PyObject *__pyx_v_tlut = NULL;
5681  PyObject *__pyx_v_scale = NULL;
5682  PyObject *__pyx_v_mfit = NULL;
5683  PyObject *__pyx_v_mxi = NULL;
5684  PyObject *__pyx_v_mrfl = NULL;
5685  PyObject *__pyx_r = NULL;
5686  __Pyx_RefNannyDeclarations
5687  int __pyx_t_1;
5688  PyObject *__pyx_t_2 = NULL;
5689  PyObject *__pyx_t_3 = NULL;
5690  int __pyx_t_4;
5691  PyObject *__pyx_t_5 = NULL;
5692  PyObject *__pyx_t_6 = NULL;
5693  PyObject *__pyx_t_7 = NULL;
5694  int __pyx_t_8;
5695  PyObject *__pyx_t_9 = NULL;
5696  PyObject *__pyx_t_10 = NULL;
5697  int __pyx_lineno = 0;
5698  const char *__pyx_filename = NULL;
5699  int __pyx_clineno = 0;
5700  __Pyx_RefNannySetupContext("process", 0);
5701  __Pyx_INCREF(__pyx_v_wnd);
5702  __Pyx_INCREF(__pyx_v_chl);
5703 
5704  /* "dbocean.pyx":119
5705  *
5706  * def process(self,rfl,sza,vza,raa,wnd,chl):
5707  * if(self.mode==0 or self.mode==1): # <<<<<<<<<<<<<<
5708  * if(self.mode==1):
5709  * chl, wnd = self.chlc, self.wndc
5710  */
5711  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
5712  __Pyx_GOTREF(__pyx_t_2);
5713  __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 119, __pyx_L1_error)
5714  __Pyx_GOTREF(__pyx_t_3);
5715  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5716  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
5717  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5718  if (!__pyx_t_4) {
5719  } else {
5720  __pyx_t_1 = __pyx_t_4;
5721  goto __pyx_L4_bool_binop_done;
5722  }
5723  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 119, __pyx_L1_error)
5724  __Pyx_GOTREF(__pyx_t_3);
5725  __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_3, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
5726  __Pyx_GOTREF(__pyx_t_2);
5727  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5728  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
5729  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5730  __pyx_t_1 = __pyx_t_4;
5731  __pyx_L4_bool_binop_done:;
5732  if (__pyx_t_1) {
5733 
5734  /* "dbocean.pyx":120
5735  * def process(self,rfl,sza,vza,raa,wnd,chl):
5736  * if(self.mode==0 or self.mode==1):
5737  * if(self.mode==1): # <<<<<<<<<<<<<<
5738  * chl, wnd = self.chlc, self.wndc
5739  * xi = np.stack((chl, wnd, raa, vza, sza))
5740  */
5741  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
5742  __Pyx_GOTREF(__pyx_t_2);
5743  __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 120, __pyx_L1_error)
5744  __Pyx_GOTREF(__pyx_t_3);
5745  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5746  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 120, __pyx_L1_error)
5747  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5748  if (__pyx_t_1) {
5749 
5750  /* "dbocean.pyx":121
5751  * if(self.mode==0 or self.mode==1):
5752  * if(self.mode==1):
5753  * chl, wnd = self.chlc, self.wndc # <<<<<<<<<<<<<<
5754  * xi = np.stack((chl, wnd, raa, vza, sza))
5755  * elif(self.mode==2):
5756  */
5757  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_chlc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 121, __pyx_L1_error)
5758  __Pyx_GOTREF(__pyx_t_3);
5759  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wndc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 121, __pyx_L1_error)
5760  __Pyx_GOTREF(__pyx_t_2);
5761  __Pyx_DECREF_SET(__pyx_v_chl, __pyx_t_3);
5762  __pyx_t_3 = 0;
5763  __Pyx_DECREF_SET(__pyx_v_wnd, __pyx_t_2);
5764  __pyx_t_2 = 0;
5765 
5766  /* "dbocean.pyx":120
5767  * def process(self,rfl,sza,vza,raa,wnd,chl):
5768  * if(self.mode==0 or self.mode==1):
5769  * if(self.mode==1): # <<<<<<<<<<<<<<
5770  * chl, wnd = self.chlc, self.wndc
5771  * xi = np.stack((chl, wnd, raa, vza, sza))
5772  */
5773  }
5774 
5775  /* "dbocean.pyx":122
5776  * if(self.mode==1):
5777  * chl, wnd = self.chlc, self.wndc
5778  * xi = np.stack((chl, wnd, raa, vza, sza)) # <<<<<<<<<<<<<<
5779  * elif(self.mode==2):
5780  * wnd = self.wndc
5781  */
5782  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 122, __pyx_L1_error)
5783  __Pyx_GOTREF(__pyx_t_3);
5784  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_stack); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 122, __pyx_L1_error)
5785  __Pyx_GOTREF(__pyx_t_5);
5786  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5787  __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 122, __pyx_L1_error)
5788  __Pyx_GOTREF(__pyx_t_3);
5789  __Pyx_INCREF(__pyx_v_chl);
5790  __Pyx_GIVEREF(__pyx_v_chl);
5791  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_chl);
5792  __Pyx_INCREF(__pyx_v_wnd);
5793  __Pyx_GIVEREF(__pyx_v_wnd);
5794  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_wnd);
5795  __Pyx_INCREF(__pyx_v_raa);
5796  __Pyx_GIVEREF(__pyx_v_raa);
5797  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_raa);
5798  __Pyx_INCREF(__pyx_v_vza);
5799  __Pyx_GIVEREF(__pyx_v_vza);
5800  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_vza);
5801  __Pyx_INCREF(__pyx_v_sza);
5802  __Pyx_GIVEREF(__pyx_v_sza);
5803  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_sza);
5804  __pyx_t_6 = NULL;
5805  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
5806  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
5807  if (likely(__pyx_t_6)) {
5808  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
5809  __Pyx_INCREF(__pyx_t_6);
5810  __Pyx_INCREF(function);
5811  __Pyx_DECREF_SET(__pyx_t_5, function);
5812  }
5813  }
5814  __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3);
5815  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
5816  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5817  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error)
5818  __Pyx_GOTREF(__pyx_t_2);
5819  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5820  __pyx_v_xi = __pyx_t_2;
5821  __pyx_t_2 = 0;
5822 
5823  /* "dbocean.pyx":119
5824  *
5825  * def process(self,rfl,sza,vza,raa,wnd,chl):
5826  * if(self.mode==0 or self.mode==1): # <<<<<<<<<<<<<<
5827  * if(self.mode==1):
5828  * chl, wnd = self.chlc, self.wndc
5829  */
5830  goto __pyx_L3;
5831  }
5832 
5833  /* "dbocean.pyx":123
5834  * chl, wnd = self.chlc, self.wndc
5835  * xi = np.stack((chl, wnd, raa, vza, sza))
5836  * elif(self.mode==2): # <<<<<<<<<<<<<<
5837  * wnd = self.wndc
5838  * xi = np.stack((wnd, raa, vza, sza))
5839  */
5840  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)
5841  __Pyx_GOTREF(__pyx_t_2);
5842  __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 123, __pyx_L1_error)
5843  __Pyx_GOTREF(__pyx_t_5);
5844  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5845  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 123, __pyx_L1_error)
5846  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5847  if (__pyx_t_1) {
5848 
5849  /* "dbocean.pyx":124
5850  * xi = np.stack((chl, wnd, raa, vza, sza))
5851  * elif(self.mode==2):
5852  * wnd = self.wndc # <<<<<<<<<<<<<<
5853  * xi = np.stack((wnd, raa, vza, sza))
5854  * elif(self.mode==3):
5855  */
5856  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wndc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 124, __pyx_L1_error)
5857  __Pyx_GOTREF(__pyx_t_5);
5858  __Pyx_DECREF_SET(__pyx_v_wnd, __pyx_t_5);
5859  __pyx_t_5 = 0;
5860 
5861  /* "dbocean.pyx":125
5862  * elif(self.mode==2):
5863  * wnd = self.wndc
5864  * xi = np.stack((wnd, raa, vza, sza)) # <<<<<<<<<<<<<<
5865  * elif(self.mode==3):
5866  * chl = self.chlc
5867  */
5868  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error)
5869  __Pyx_GOTREF(__pyx_t_2);
5870  __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)
5871  __Pyx_GOTREF(__pyx_t_3);
5872  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5873  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error)
5874  __Pyx_GOTREF(__pyx_t_2);
5875  __Pyx_INCREF(__pyx_v_wnd);
5876  __Pyx_GIVEREF(__pyx_v_wnd);
5877  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_wnd);
5878  __Pyx_INCREF(__pyx_v_raa);
5879  __Pyx_GIVEREF(__pyx_v_raa);
5880  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_raa);
5881  __Pyx_INCREF(__pyx_v_vza);
5882  __Pyx_GIVEREF(__pyx_v_vza);
5883  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_vza);
5884  __Pyx_INCREF(__pyx_v_sza);
5885  __Pyx_GIVEREF(__pyx_v_sza);
5886  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_sza);
5887  __pyx_t_6 = NULL;
5888  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
5889  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
5890  if (likely(__pyx_t_6)) {
5891  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
5892  __Pyx_INCREF(__pyx_t_6);
5893  __Pyx_INCREF(function);
5894  __Pyx_DECREF_SET(__pyx_t_3, function);
5895  }
5896  }
5897  __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
5898  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
5899  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5900  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 125, __pyx_L1_error)
5901  __Pyx_GOTREF(__pyx_t_5);
5902  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5903  __pyx_v_xi = __pyx_t_5;
5904  __pyx_t_5 = 0;
5905 
5906  /* "dbocean.pyx":123
5907  * chl, wnd = self.chlc, self.wndc
5908  * xi = np.stack((chl, wnd, raa, vza, sza))
5909  * elif(self.mode==2): # <<<<<<<<<<<<<<
5910  * wnd = self.wndc
5911  * xi = np.stack((wnd, raa, vza, sza))
5912  */
5913  goto __pyx_L3;
5914  }
5915 
5916  /* "dbocean.pyx":126
5917  * wnd = self.wndc
5918  * xi = np.stack((wnd, raa, vza, sza))
5919  * elif(self.mode==3): # <<<<<<<<<<<<<<
5920  * chl = self.chlc
5921  * xi = np.stack((chl, raa, vza, sza))
5922  */
5923  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 126, __pyx_L1_error)
5924  __Pyx_GOTREF(__pyx_t_5);
5925  __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_5, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 126, __pyx_L1_error)
5926  __Pyx_GOTREF(__pyx_t_3);
5927  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5928  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 126, __pyx_L1_error)
5929  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5930  if (__pyx_t_1) {
5931 
5932  /* "dbocean.pyx":127
5933  * xi = np.stack((wnd, raa, vza, sza))
5934  * elif(self.mode==3):
5935  * chl = self.chlc # <<<<<<<<<<<<<<
5936  * xi = np.stack((chl, raa, vza, sza))
5937  * elif(self.mode==4):
5938  */
5939  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_chlc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 127, __pyx_L1_error)
5940  __Pyx_GOTREF(__pyx_t_3);
5941  __Pyx_DECREF_SET(__pyx_v_chl, __pyx_t_3);
5942  __pyx_t_3 = 0;
5943 
5944  /* "dbocean.pyx":128
5945  * elif(self.mode==3):
5946  * chl = self.chlc
5947  * xi = np.stack((chl, raa, vza, sza)) # <<<<<<<<<<<<<<
5948  * elif(self.mode==4):
5949  * xi = np.stack((raa, vza, sza))
5950  */
5951  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 128, __pyx_L1_error)
5952  __Pyx_GOTREF(__pyx_t_5);
5953  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_stack); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error)
5954  __Pyx_GOTREF(__pyx_t_2);
5955  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5956  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 128, __pyx_L1_error)
5957  __Pyx_GOTREF(__pyx_t_5);
5958  __Pyx_INCREF(__pyx_v_chl);
5959  __Pyx_GIVEREF(__pyx_v_chl);
5960  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_chl);
5961  __Pyx_INCREF(__pyx_v_raa);
5962  __Pyx_GIVEREF(__pyx_v_raa);
5963  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_raa);
5964  __Pyx_INCREF(__pyx_v_vza);
5965  __Pyx_GIVEREF(__pyx_v_vza);
5966  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_vza);
5967  __Pyx_INCREF(__pyx_v_sza);
5968  __Pyx_GIVEREF(__pyx_v_sza);
5969  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_sza);
5970  __pyx_t_6 = NULL;
5971  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
5972  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
5973  if (likely(__pyx_t_6)) {
5974  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5975  __Pyx_INCREF(__pyx_t_6);
5976  __Pyx_INCREF(function);
5977  __Pyx_DECREF_SET(__pyx_t_2, function);
5978  }
5979  }
5980  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5);
5981  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
5982  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5983  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L1_error)
5984  __Pyx_GOTREF(__pyx_t_3);
5985  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5986  __pyx_v_xi = __pyx_t_3;
5987  __pyx_t_3 = 0;
5988 
5989  /* "dbocean.pyx":126
5990  * wnd = self.wndc
5991  * xi = np.stack((wnd, raa, vza, sza))
5992  * elif(self.mode==3): # <<<<<<<<<<<<<<
5993  * chl = self.chlc
5994  * xi = np.stack((chl, raa, vza, sza))
5995  */
5996  goto __pyx_L3;
5997  }
5998 
5999  /* "dbocean.pyx":129
6000  * chl = self.chlc
6001  * xi = np.stack((chl, raa, vza, sza))
6002  * elif(self.mode==4): # <<<<<<<<<<<<<<
6003  * xi = np.stack((raa, vza, sza))
6004  * tlut = trp.interpn(self.rpts, self.lut, xi)[0]
6005  */
6006  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 129, __pyx_L1_error)
6007  __Pyx_GOTREF(__pyx_t_3);
6008  __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_3, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 129, __pyx_L1_error)
6009  __Pyx_GOTREF(__pyx_t_2);
6010  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6011  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 129, __pyx_L1_error)
6012  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6013  if (__pyx_t_1) {
6014 
6015  /* "dbocean.pyx":130
6016  * xi = np.stack((chl, raa, vza, sza))
6017  * elif(self.mode==4):
6018  * xi = np.stack((raa, vza, sza)) # <<<<<<<<<<<<<<
6019  * tlut = trp.interpn(self.rpts, self.lut, xi)[0]
6020  * scale = 1.0/(self.coef*(rfl + 0.00001))
6021  */
6022  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error)
6023  __Pyx_GOTREF(__pyx_t_3);
6024  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_stack); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 130, __pyx_L1_error)
6025  __Pyx_GOTREF(__pyx_t_5);
6026  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6027  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error)
6028  __Pyx_GOTREF(__pyx_t_3);
6029  __Pyx_INCREF(__pyx_v_raa);
6030  __Pyx_GIVEREF(__pyx_v_raa);
6031  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_raa);
6032  __Pyx_INCREF(__pyx_v_vza);
6033  __Pyx_GIVEREF(__pyx_v_vza);
6034  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_vza);
6035  __Pyx_INCREF(__pyx_v_sza);
6036  __Pyx_GIVEREF(__pyx_v_sza);
6037  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_sza);
6038  __pyx_t_6 = NULL;
6039  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
6040  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
6041  if (likely(__pyx_t_6)) {
6042  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
6043  __Pyx_INCREF(__pyx_t_6);
6044  __Pyx_INCREF(function);
6045  __Pyx_DECREF_SET(__pyx_t_5, function);
6046  }
6047  }
6048  __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3);
6049  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6050  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6051  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)
6052  __Pyx_GOTREF(__pyx_t_2);
6053  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6054  __pyx_v_xi = __pyx_t_2;
6055  __pyx_t_2 = 0;
6056 
6057  /* "dbocean.pyx":129
6058  * chl = self.chlc
6059  * xi = np.stack((chl, raa, vza, sza))
6060  * elif(self.mode==4): # <<<<<<<<<<<<<<
6061  * xi = np.stack((raa, vza, sza))
6062  * tlut = trp.interpn(self.rpts, self.lut, xi)[0]
6063  */
6064  }
6065  __pyx_L3:;
6066 
6067  /* "dbocean.pyx":131
6068  * elif(self.mode==4):
6069  * xi = np.stack((raa, vza, sza))
6070  * tlut = trp.interpn(self.rpts, self.lut, xi)[0] # <<<<<<<<<<<<<<
6071  * scale = 1.0/(self.coef*(rfl + 0.00001))
6072  * mfit = lm.minimize(self.minfun, self.pars, args=(rfl, scale, tlut))
6073  */
6074  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_trp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 131, __pyx_L1_error)
6075  __Pyx_GOTREF(__pyx_t_5);
6076  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_interpn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
6077  __Pyx_GOTREF(__pyx_t_3);
6078  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6079  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rpts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 131, __pyx_L1_error)
6080  __Pyx_GOTREF(__pyx_t_5);
6081  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lut); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 131, __pyx_L1_error)
6082  __Pyx_GOTREF(__pyx_t_6);
6083  if (unlikely(!__pyx_v_xi)) { __Pyx_RaiseUnboundLocalError("xi"); __PYX_ERR(0, 131, __pyx_L1_error) }
6084  __pyx_t_7 = NULL;
6085  __pyx_t_8 = 0;
6086  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
6087  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
6088  if (likely(__pyx_t_7)) {
6089  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6090  __Pyx_INCREF(__pyx_t_7);
6091  __Pyx_INCREF(function);
6092  __Pyx_DECREF_SET(__pyx_t_3, function);
6093  __pyx_t_8 = 1;
6094  }
6095  }
6096  #if CYTHON_FAST_PYCALL
6097  if (PyFunction_Check(__pyx_t_3)) {
6098  PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_5, __pyx_t_6, __pyx_v_xi};
6099  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
6100  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6101  __Pyx_GOTREF(__pyx_t_2);
6102  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6103  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6104  } else
6105  #endif
6106  #if CYTHON_FAST_PYCCALL
6107  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
6108  PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_5, __pyx_t_6, __pyx_v_xi};
6109  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
6110  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6111  __Pyx_GOTREF(__pyx_t_2);
6112  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6113  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6114  } else
6115  #endif
6116  {
6117  __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 131, __pyx_L1_error)
6118  __Pyx_GOTREF(__pyx_t_9);
6119  if (__pyx_t_7) {
6120  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
6121  }
6122  __Pyx_GIVEREF(__pyx_t_5);
6123  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_5);
6124  __Pyx_GIVEREF(__pyx_t_6);
6125  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
6126  __Pyx_INCREF(__pyx_v_xi);
6127  __Pyx_GIVEREF(__pyx_v_xi);
6128  PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_v_xi);
6129  __pyx_t_5 = 0;
6130  __pyx_t_6 = 0;
6131  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
6132  __Pyx_GOTREF(__pyx_t_2);
6133  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6134  }
6135  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6136  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
6137  __Pyx_GOTREF(__pyx_t_3);
6138  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6139  __pyx_v_tlut = __pyx_t_3;
6140  __pyx_t_3 = 0;
6141 
6142  /* "dbocean.pyx":132
6143  * xi = np.stack((raa, vza, sza))
6144  * tlut = trp.interpn(self.rpts, self.lut, xi)[0]
6145  * scale = 1.0/(self.coef*(rfl + 0.00001)) # <<<<<<<<<<<<<<
6146  * mfit = lm.minimize(self.minfun, self.pars, args=(rfl, scale, tlut))
6147  * self.fmf = mfit.params['fmf'].value
6148  */
6149  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 132, __pyx_L1_error)
6150  __Pyx_GOTREF(__pyx_t_3);
6151  __pyx_t_2 = __Pyx_PyFloat_AddObjC(__pyx_v_rfl, __pyx_float_0_00001, 0.00001, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __pyx_L1_error)
6152  __Pyx_GOTREF(__pyx_t_2);
6153  __pyx_t_9 = PyNumber_Multiply(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 132, __pyx_L1_error)
6154  __Pyx_GOTREF(__pyx_t_9);
6155  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6156  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6157  __pyx_t_2 = __Pyx_PyFloat_TrueDivideCObj(__pyx_float_1_0, __pyx_t_9, 1.0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __pyx_L1_error)
6158  __Pyx_GOTREF(__pyx_t_2);
6159  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6160  __pyx_v_scale = __pyx_t_2;
6161  __pyx_t_2 = 0;
6162 
6163  /* "dbocean.pyx":133
6164  * tlut = trp.interpn(self.rpts, self.lut, xi)[0]
6165  * scale = 1.0/(self.coef*(rfl + 0.00001))
6166  * mfit = lm.minimize(self.minfun, self.pars, args=(rfl, scale, tlut)) # <<<<<<<<<<<<<<
6167  * self.fmf = mfit.params['fmf'].value
6168  * self.aot = mfit.params['aot'].value
6169  */
6170  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_lm); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
6171  __Pyx_GOTREF(__pyx_t_2);
6172  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_minimize); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 133, __pyx_L1_error)
6173  __Pyx_GOTREF(__pyx_t_9);
6174  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6175  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_minfun); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
6176  __Pyx_GOTREF(__pyx_t_2);
6177  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error)
6178  __Pyx_GOTREF(__pyx_t_3);
6179  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 133, __pyx_L1_error)
6180  __Pyx_GOTREF(__pyx_t_6);
6181  __Pyx_GIVEREF(__pyx_t_2);
6182  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
6183  __Pyx_GIVEREF(__pyx_t_3);
6184  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
6185  __pyx_t_2 = 0;
6186  __pyx_t_3 = 0;
6187  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error)
6188  __Pyx_GOTREF(__pyx_t_3);
6189  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
6190  __Pyx_GOTREF(__pyx_t_2);
6191  __Pyx_INCREF(__pyx_v_rfl);
6192  __Pyx_GIVEREF(__pyx_v_rfl);
6193  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_rfl);
6194  __Pyx_INCREF(__pyx_v_scale);
6195  __Pyx_GIVEREF(__pyx_v_scale);
6196  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_scale);
6197  __Pyx_INCREF(__pyx_v_tlut);
6198  __Pyx_GIVEREF(__pyx_v_tlut);
6199  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_tlut);
6200  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_args, __pyx_t_2) < 0) __PYX_ERR(0, 133, __pyx_L1_error)
6201  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6202  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
6203  __Pyx_GOTREF(__pyx_t_2);
6204  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6205  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6206  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6207  __pyx_v_mfit = __pyx_t_2;
6208  __pyx_t_2 = 0;
6209 
6210  /* "dbocean.pyx":134
6211  * scale = 1.0/(self.coef*(rfl + 0.00001))
6212  * mfit = lm.minimize(self.minfun, self.pars, args=(rfl, scale, tlut))
6213  * self.fmf = mfit.params['fmf'].value # <<<<<<<<<<<<<<
6214  * self.aot = mfit.params['aot'].value
6215  * self.sse = mfit.redchi
6216  */
6217  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_mfit, __pyx_n_s_params); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error)
6218  __Pyx_GOTREF(__pyx_t_2);
6219  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_fmf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error)
6220  __Pyx_GOTREF(__pyx_t_3);
6221  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6222  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error)
6223  __Pyx_GOTREF(__pyx_t_2);
6224  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6225  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fmf, __pyx_t_2) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
6226  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6227 
6228  /* "dbocean.pyx":135
6229  * mfit = lm.minimize(self.minfun, self.pars, args=(rfl, scale, tlut))
6230  * self.fmf = mfit.params['fmf'].value
6231  * self.aot = mfit.params['aot'].value # <<<<<<<<<<<<<<
6232  * self.sse = mfit.redchi
6233  * if(self.mode==0 or self.mode==1):
6234  */
6235  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_mfit, __pyx_n_s_params); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
6236  __Pyx_GOTREF(__pyx_t_2);
6237  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_aot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error)
6238  __Pyx_GOTREF(__pyx_t_3);
6239  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6240  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
6241  __Pyx_GOTREF(__pyx_t_2);
6242  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6243  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_aot, __pyx_t_2) < 0) __PYX_ERR(0, 135, __pyx_L1_error)
6244  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6245 
6246  /* "dbocean.pyx":136
6247  * self.fmf = mfit.params['fmf'].value
6248  * self.aot = mfit.params['aot'].value
6249  * self.sse = mfit.redchi # <<<<<<<<<<<<<<
6250  * if(self.mode==0 or self.mode==1):
6251  * self.chl = float(chl)
6252  */
6253  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_mfit, __pyx_n_s_redchi); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error)
6254  __Pyx_GOTREF(__pyx_t_2);
6255  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sse, __pyx_t_2) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
6256  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6257 
6258  /* "dbocean.pyx":137
6259  * self.aot = mfit.params['aot'].value
6260  * self.sse = mfit.redchi
6261  * if(self.mode==0 or self.mode==1): # <<<<<<<<<<<<<<
6262  * self.chl = float(chl)
6263  * self.wnd = float(wnd)
6264  */
6265  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error)
6266  __Pyx_GOTREF(__pyx_t_2);
6267  __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 137, __pyx_L1_error)
6268  __Pyx_GOTREF(__pyx_t_3);
6269  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6270  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 137, __pyx_L1_error)
6271  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6272  if (!__pyx_t_4) {
6273  } else {
6274  __pyx_t_1 = __pyx_t_4;
6275  goto __pyx_L8_bool_binop_done;
6276  }
6277  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 137, __pyx_L1_error)
6278  __Pyx_GOTREF(__pyx_t_3);
6279  __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_3, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error)
6280  __Pyx_GOTREF(__pyx_t_2);
6281  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6282  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 137, __pyx_L1_error)
6283  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6284  __pyx_t_1 = __pyx_t_4;
6285  __pyx_L8_bool_binop_done:;
6286  if (__pyx_t_1) {
6287 
6288  /* "dbocean.pyx":138
6289  * self.sse = mfit.redchi
6290  * if(self.mode==0 or self.mode==1):
6291  * self.chl = float(chl) # <<<<<<<<<<<<<<
6292  * self.wnd = float(wnd)
6293  * mxi = np.stack((self.fmf,self.aot))
6294  */
6295  __pyx_t_2 = __Pyx_PyNumber_Float(__pyx_v_chl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error)
6296  __Pyx_GOTREF(__pyx_t_2);
6297  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_chl, __pyx_t_2) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
6298  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6299 
6300  /* "dbocean.pyx":139
6301  * if(self.mode==0 or self.mode==1):
6302  * self.chl = float(chl)
6303  * self.wnd = float(wnd) # <<<<<<<<<<<<<<
6304  * mxi = np.stack((self.fmf,self.aot))
6305  * elif(self.mode==2):
6306  */
6307  __pyx_t_2 = __Pyx_PyNumber_Float(__pyx_v_wnd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error)
6308  __Pyx_GOTREF(__pyx_t_2);
6309  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wnd, __pyx_t_2) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
6310  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6311 
6312  /* "dbocean.pyx":140
6313  * self.chl = float(chl)
6314  * self.wnd = float(wnd)
6315  * mxi = np.stack((self.fmf,self.aot)) # <<<<<<<<<<<<<<
6316  * elif(self.mode==2):
6317  * self.wnd = float(wnd)
6318  */
6319  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __pyx_L1_error)
6320  __Pyx_GOTREF(__pyx_t_3);
6321  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_stack); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error)
6322  __Pyx_GOTREF(__pyx_t_6);
6323  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6324  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fmf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __pyx_L1_error)
6325  __Pyx_GOTREF(__pyx_t_3);
6326  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_aot); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 140, __pyx_L1_error)
6327  __Pyx_GOTREF(__pyx_t_9);
6328  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 140, __pyx_L1_error)
6329  __Pyx_GOTREF(__pyx_t_5);
6330  __Pyx_GIVEREF(__pyx_t_3);
6331  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
6332  __Pyx_GIVEREF(__pyx_t_9);
6333  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_9);
6334  __pyx_t_3 = 0;
6335  __pyx_t_9 = 0;
6336  __pyx_t_9 = NULL;
6337  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
6338  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
6339  if (likely(__pyx_t_9)) {
6340  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
6341  __Pyx_INCREF(__pyx_t_9);
6342  __Pyx_INCREF(function);
6343  __Pyx_DECREF_SET(__pyx_t_6, function);
6344  }
6345  }
6346  __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_9, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
6347  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
6348  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6349  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error)
6350  __Pyx_GOTREF(__pyx_t_2);
6351  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6352  __pyx_v_mxi = __pyx_t_2;
6353  __pyx_t_2 = 0;
6354 
6355  /* "dbocean.pyx":137
6356  * self.aot = mfit.params['aot'].value
6357  * self.sse = mfit.redchi
6358  * if(self.mode==0 or self.mode==1): # <<<<<<<<<<<<<<
6359  * self.chl = float(chl)
6360  * self.wnd = float(wnd)
6361  */
6362  goto __pyx_L7;
6363  }
6364 
6365  /* "dbocean.pyx":141
6366  * self.wnd = float(wnd)
6367  * mxi = np.stack((self.fmf,self.aot))
6368  * elif(self.mode==2): # <<<<<<<<<<<<<<
6369  * self.wnd = float(wnd)
6370  * self.chl = mfit.params['chl'].value
6371  */
6372  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error)
6373  __Pyx_GOTREF(__pyx_t_2);
6374  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 141, __pyx_L1_error)
6375  __Pyx_GOTREF(__pyx_t_6);
6376  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6377  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 141, __pyx_L1_error)
6378  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6379  if (__pyx_t_1) {
6380 
6381  /* "dbocean.pyx":142
6382  * mxi = np.stack((self.fmf,self.aot))
6383  * elif(self.mode==2):
6384  * self.wnd = float(wnd) # <<<<<<<<<<<<<<
6385  * self.chl = mfit.params['chl'].value
6386  * mxi = np.stack((self.fmf,self.aot,self.chl))
6387  */
6388  __pyx_t_6 = __Pyx_PyNumber_Float(__pyx_v_wnd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 142, __pyx_L1_error)
6389  __Pyx_GOTREF(__pyx_t_6);
6390  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wnd, __pyx_t_6) < 0) __PYX_ERR(0, 142, __pyx_L1_error)
6391  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6392 
6393  /* "dbocean.pyx":143
6394  * elif(self.mode==2):
6395  * self.wnd = float(wnd)
6396  * self.chl = mfit.params['chl'].value # <<<<<<<<<<<<<<
6397  * mxi = np.stack((self.fmf,self.aot,self.chl))
6398  * elif(self.mode==3):
6399  */
6400  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_mfit, __pyx_n_s_params); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 143, __pyx_L1_error)
6401  __Pyx_GOTREF(__pyx_t_6);
6402  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_chl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error)
6403  __Pyx_GOTREF(__pyx_t_2);
6404  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6405  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 143, __pyx_L1_error)
6406  __Pyx_GOTREF(__pyx_t_6);
6407  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6408  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_chl, __pyx_t_6) < 0) __PYX_ERR(0, 143, __pyx_L1_error)
6409  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6410 
6411  /* "dbocean.pyx":144
6412  * self.wnd = float(wnd)
6413  * self.chl = mfit.params['chl'].value
6414  * mxi = np.stack((self.fmf,self.aot,self.chl)) # <<<<<<<<<<<<<<
6415  * elif(self.mode==3):
6416  * self.chl = float(chl)
6417  */
6418  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
6419  __Pyx_GOTREF(__pyx_t_2);
6420  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stack); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 144, __pyx_L1_error)
6421  __Pyx_GOTREF(__pyx_t_5);
6422  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6423  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fmf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
6424  __Pyx_GOTREF(__pyx_t_2);
6425  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_aot); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 144, __pyx_L1_error)
6426  __Pyx_GOTREF(__pyx_t_9);
6427  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_chl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error)
6428  __Pyx_GOTREF(__pyx_t_3);
6429  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 144, __pyx_L1_error)
6430  __Pyx_GOTREF(__pyx_t_7);
6431  __Pyx_GIVEREF(__pyx_t_2);
6432  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
6433  __Pyx_GIVEREF(__pyx_t_9);
6434  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9);
6435  __Pyx_GIVEREF(__pyx_t_3);
6436  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3);
6437  __pyx_t_2 = 0;
6438  __pyx_t_9 = 0;
6439  __pyx_t_3 = 0;
6440  __pyx_t_3 = NULL;
6441  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
6442  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
6443  if (likely(__pyx_t_3)) {
6444  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
6445  __Pyx_INCREF(__pyx_t_3);
6446  __Pyx_INCREF(function);
6447  __Pyx_DECREF_SET(__pyx_t_5, function);
6448  }
6449  }
6450  __pyx_t_6 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
6451  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6452  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6453  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 144, __pyx_L1_error)
6454  __Pyx_GOTREF(__pyx_t_6);
6455  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6456  __pyx_v_mxi = __pyx_t_6;
6457  __pyx_t_6 = 0;
6458 
6459  /* "dbocean.pyx":141
6460  * self.wnd = float(wnd)
6461  * mxi = np.stack((self.fmf,self.aot))
6462  * elif(self.mode==2): # <<<<<<<<<<<<<<
6463  * self.wnd = float(wnd)
6464  * self.chl = mfit.params['chl'].value
6465  */
6466  goto __pyx_L7;
6467  }
6468 
6469  /* "dbocean.pyx":145
6470  * self.chl = mfit.params['chl'].value
6471  * mxi = np.stack((self.fmf,self.aot,self.chl))
6472  * elif(self.mode==3): # <<<<<<<<<<<<<<
6473  * self.chl = float(chl)
6474  * self.wnd = mfit.params['wnd'].value
6475  */
6476  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 145, __pyx_L1_error)
6477  __Pyx_GOTREF(__pyx_t_6);
6478  __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 145, __pyx_L1_error)
6479  __Pyx_GOTREF(__pyx_t_5);
6480  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6481  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 145, __pyx_L1_error)
6482  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6483  if (__pyx_t_1) {
6484 
6485  /* "dbocean.pyx":146
6486  * mxi = np.stack((self.fmf,self.aot,self.chl))
6487  * elif(self.mode==3):
6488  * self.chl = float(chl) # <<<<<<<<<<<<<<
6489  * self.wnd = mfit.params['wnd'].value
6490  * mxi = np.stack((self.fmf,self.aot,self.wnd))
6491  */
6492  __pyx_t_5 = __Pyx_PyNumber_Float(__pyx_v_chl); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 146, __pyx_L1_error)
6493  __Pyx_GOTREF(__pyx_t_5);
6494  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_chl, __pyx_t_5) < 0) __PYX_ERR(0, 146, __pyx_L1_error)
6495  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6496 
6497  /* "dbocean.pyx":147
6498  * elif(self.mode==3):
6499  * self.chl = float(chl)
6500  * self.wnd = mfit.params['wnd'].value # <<<<<<<<<<<<<<
6501  * mxi = np.stack((self.fmf,self.aot,self.wnd))
6502  * elif(self.mode==4):
6503  */
6504  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_mfit, __pyx_n_s_params); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 147, __pyx_L1_error)
6505  __Pyx_GOTREF(__pyx_t_5);
6506  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_n_u_wnd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 147, __pyx_L1_error)
6507  __Pyx_GOTREF(__pyx_t_6);
6508  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6509  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 147, __pyx_L1_error)
6510  __Pyx_GOTREF(__pyx_t_5);
6511  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6512  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wnd, __pyx_t_5) < 0) __PYX_ERR(0, 147, __pyx_L1_error)
6513  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6514 
6515  /* "dbocean.pyx":148
6516  * self.chl = float(chl)
6517  * self.wnd = mfit.params['wnd'].value
6518  * mxi = np.stack((self.fmf,self.aot,self.wnd)) # <<<<<<<<<<<<<<
6519  * elif(self.mode==4):
6520  * self.chl = mfit.params['chl'].value
6521  */
6522  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 148, __pyx_L1_error)
6523  __Pyx_GOTREF(__pyx_t_6);
6524  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_stack); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 148, __pyx_L1_error)
6525  __Pyx_GOTREF(__pyx_t_7);
6526  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6527  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fmf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 148, __pyx_L1_error)
6528  __Pyx_GOTREF(__pyx_t_6);
6529  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_aot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error)
6530  __Pyx_GOTREF(__pyx_t_3);
6531  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wnd); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 148, __pyx_L1_error)
6532  __Pyx_GOTREF(__pyx_t_9);
6533  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 148, __pyx_L1_error)
6534  __Pyx_GOTREF(__pyx_t_2);
6535  __Pyx_GIVEREF(__pyx_t_6);
6536  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
6537  __Pyx_GIVEREF(__pyx_t_3);
6538  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
6539  __Pyx_GIVEREF(__pyx_t_9);
6540  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_9);
6541  __pyx_t_6 = 0;
6542  __pyx_t_3 = 0;
6543  __pyx_t_9 = 0;
6544  __pyx_t_9 = NULL;
6545  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
6546  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
6547  if (likely(__pyx_t_9)) {
6548  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
6549  __Pyx_INCREF(__pyx_t_9);
6550  __Pyx_INCREF(function);
6551  __Pyx_DECREF_SET(__pyx_t_7, function);
6552  }
6553  }
6554  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2);
6555  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
6556  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6557  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 148, __pyx_L1_error)
6558  __Pyx_GOTREF(__pyx_t_5);
6559  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6560  __pyx_v_mxi = __pyx_t_5;
6561  __pyx_t_5 = 0;
6562 
6563  /* "dbocean.pyx":145
6564  * self.chl = mfit.params['chl'].value
6565  * mxi = np.stack((self.fmf,self.aot,self.chl))
6566  * elif(self.mode==3): # <<<<<<<<<<<<<<
6567  * self.chl = float(chl)
6568  * self.wnd = mfit.params['wnd'].value
6569  */
6570  goto __pyx_L7;
6571  }
6572 
6573  /* "dbocean.pyx":149
6574  * self.wnd = mfit.params['wnd'].value
6575  * mxi = np.stack((self.fmf,self.aot,self.wnd))
6576  * elif(self.mode==4): # <<<<<<<<<<<<<<
6577  * self.chl = mfit.params['chl'].value
6578  * self.wnd = mfit.params['wnd'].value
6579  */
6580  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 149, __pyx_L1_error)
6581  __Pyx_GOTREF(__pyx_t_5);
6582  __pyx_t_7 = __Pyx_PyInt_EqObjC(__pyx_t_5, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 149, __pyx_L1_error)
6583  __Pyx_GOTREF(__pyx_t_7);
6584  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6585  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 149, __pyx_L1_error)
6586  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6587  if (__pyx_t_1) {
6588 
6589  /* "dbocean.pyx":150
6590  * mxi = np.stack((self.fmf,self.aot,self.wnd))
6591  * elif(self.mode==4):
6592  * self.chl = mfit.params['chl'].value # <<<<<<<<<<<<<<
6593  * self.wnd = mfit.params['wnd'].value
6594  * mxi = np.stack((self.fmf,self.aot,self.chl,self.wnd))
6595  */
6596  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_mfit, __pyx_n_s_params); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 150, __pyx_L1_error)
6597  __Pyx_GOTREF(__pyx_t_7);
6598  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_7, __pyx_n_u_chl); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 150, __pyx_L1_error)
6599  __Pyx_GOTREF(__pyx_t_5);
6600  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6601  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 150, __pyx_L1_error)
6602  __Pyx_GOTREF(__pyx_t_7);
6603  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6604  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_chl, __pyx_t_7) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
6605  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6606 
6607  /* "dbocean.pyx":151
6608  * elif(self.mode==4):
6609  * self.chl = mfit.params['chl'].value
6610  * self.wnd = mfit.params['wnd'].value # <<<<<<<<<<<<<<
6611  * mxi = np.stack((self.fmf,self.aot,self.chl,self.wnd))
6612  * mrfl = trp.interpn(self.mpts, tlut, mxi,
6613  */
6614  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_mfit, __pyx_n_s_params); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 151, __pyx_L1_error)
6615  __Pyx_GOTREF(__pyx_t_7);
6616  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_7, __pyx_n_u_wnd); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error)
6617  __Pyx_GOTREF(__pyx_t_5);
6618  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6619  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 151, __pyx_L1_error)
6620  __Pyx_GOTREF(__pyx_t_7);
6621  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6622  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wnd, __pyx_t_7) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
6623  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6624 
6625  /* "dbocean.pyx":152
6626  * self.chl = mfit.params['chl'].value
6627  * self.wnd = mfit.params['wnd'].value
6628  * mxi = np.stack((self.fmf,self.aot,self.chl,self.wnd)) # <<<<<<<<<<<<<<
6629  * mrfl = trp.interpn(self.mpts, tlut, mxi,
6630  * bounds_error=False, fill_value=None )[0]
6631  */
6632  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 152, __pyx_L1_error)
6633  __Pyx_GOTREF(__pyx_t_5);
6634  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_stack); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error)
6635  __Pyx_GOTREF(__pyx_t_2);
6636  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6637  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fmf); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 152, __pyx_L1_error)
6638  __Pyx_GOTREF(__pyx_t_5);
6639  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_aot); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 152, __pyx_L1_error)
6640  __Pyx_GOTREF(__pyx_t_9);
6641  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_chl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error)
6642  __Pyx_GOTREF(__pyx_t_3);
6643  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wnd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 152, __pyx_L1_error)
6644  __Pyx_GOTREF(__pyx_t_6);
6645  __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 152, __pyx_L1_error)
6646  __Pyx_GOTREF(__pyx_t_10);
6647  __Pyx_GIVEREF(__pyx_t_5);
6648  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5);
6649  __Pyx_GIVEREF(__pyx_t_9);
6650  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9);
6651  __Pyx_GIVEREF(__pyx_t_3);
6652  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_3);
6653  __Pyx_GIVEREF(__pyx_t_6);
6654  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_6);
6655  __pyx_t_5 = 0;
6656  __pyx_t_9 = 0;
6657  __pyx_t_3 = 0;
6658  __pyx_t_6 = 0;
6659  __pyx_t_6 = NULL;
6660  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
6661  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
6662  if (likely(__pyx_t_6)) {
6663  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
6664  __Pyx_INCREF(__pyx_t_6);
6665  __Pyx_INCREF(function);
6666  __Pyx_DECREF_SET(__pyx_t_2, function);
6667  }
6668  }
6669  __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_10);
6670  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6671  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6672  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 152, __pyx_L1_error)
6673  __Pyx_GOTREF(__pyx_t_7);
6674  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6675  __pyx_v_mxi = __pyx_t_7;
6676  __pyx_t_7 = 0;
6677 
6678  /* "dbocean.pyx":149
6679  * self.wnd = mfit.params['wnd'].value
6680  * mxi = np.stack((self.fmf,self.aot,self.wnd))
6681  * elif(self.mode==4): # <<<<<<<<<<<<<<
6682  * self.chl = mfit.params['chl'].value
6683  * self.wnd = mfit.params['wnd'].value
6684  */
6685  }
6686  __pyx_L7:;
6687 
6688  /* "dbocean.pyx":153
6689  * self.wnd = mfit.params['wnd'].value
6690  * mxi = np.stack((self.fmf,self.aot,self.chl,self.wnd))
6691  * mrfl = trp.interpn(self.mpts, tlut, mxi, # <<<<<<<<<<<<<<
6692  * bounds_error=False, fill_value=None )[0]
6693  * # convert return values to unnormalized units
6694  */
6695  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_trp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 153, __pyx_L1_error)
6696  __Pyx_GOTREF(__pyx_t_7);
6697  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_interpn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error)
6698  __Pyx_GOTREF(__pyx_t_2);
6699  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6700  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mpts); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 153, __pyx_L1_error)
6701  __Pyx_GOTREF(__pyx_t_7);
6702  if (unlikely(!__pyx_v_mxi)) { __Pyx_RaiseUnboundLocalError("mxi"); __PYX_ERR(0, 153, __pyx_L1_error) }
6703  __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 153, __pyx_L1_error)
6704  __Pyx_GOTREF(__pyx_t_10);
6705  __Pyx_GIVEREF(__pyx_t_7);
6706  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7);
6707  __Pyx_INCREF(__pyx_v_tlut);
6708  __Pyx_GIVEREF(__pyx_v_tlut);
6709  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_tlut);
6710  __Pyx_INCREF(__pyx_v_mxi);
6711  __Pyx_GIVEREF(__pyx_v_mxi);
6712  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_mxi);
6713  __pyx_t_7 = 0;
6714 
6715  /* "dbocean.pyx":154
6716  * mxi = np.stack((self.fmf,self.aot,self.chl,self.wnd))
6717  * mrfl = trp.interpn(self.mpts, tlut, mxi,
6718  * bounds_error=False, fill_value=None )[0] # <<<<<<<<<<<<<<
6719  * # convert return values to unnormalized units
6720  * self.rfl = rfl*np.pi
6721  */
6722  __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 154, __pyx_L1_error)
6723  __Pyx_GOTREF(__pyx_t_7);
6724  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_bounds_error, Py_False) < 0) __PYX_ERR(0, 154, __pyx_L1_error)
6725  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_fill_value, Py_None) < 0) __PYX_ERR(0, 154, __pyx_L1_error)
6726 
6727  /* "dbocean.pyx":153
6728  * self.wnd = mfit.params['wnd'].value
6729  * mxi = np.stack((self.fmf,self.aot,self.chl,self.wnd))
6730  * mrfl = trp.interpn(self.mpts, tlut, mxi, # <<<<<<<<<<<<<<
6731  * bounds_error=False, fill_value=None )[0]
6732  * # convert return values to unnormalized units
6733  */
6734  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
6735  __Pyx_GOTREF(__pyx_t_6);
6736  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6737  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6738  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6739 
6740  /* "dbocean.pyx":154
6741  * mxi = np.stack((self.fmf,self.aot,self.chl,self.wnd))
6742  * mrfl = trp.interpn(self.mpts, tlut, mxi,
6743  * bounds_error=False, fill_value=None )[0] # <<<<<<<<<<<<<<
6744  * # convert return values to unnormalized units
6745  * self.rfl = rfl*np.pi
6746  */
6747  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 154, __pyx_L1_error)
6748  __Pyx_GOTREF(__pyx_t_7);
6749  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6750  __pyx_v_mrfl = __pyx_t_7;
6751  __pyx_t_7 = 0;
6752 
6753  /* "dbocean.pyx":156
6754  * bounds_error=False, fill_value=None )[0]
6755  * # convert return values to unnormalized units
6756  * self.rfl = rfl*np.pi # <<<<<<<<<<<<<<
6757  * self.mrfl = mrfl*np.pi
6758  * self.rsd = self.mrfl - self.rfl
6759  */
6760  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 156, __pyx_L1_error)
6761  __Pyx_GOTREF(__pyx_t_7);
6762  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_pi); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 156, __pyx_L1_error)
6763  __Pyx_GOTREF(__pyx_t_6);
6764  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6765  __pyx_t_7 = PyNumber_Multiply(__pyx_v_rfl, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 156, __pyx_L1_error)
6766  __Pyx_GOTREF(__pyx_t_7);
6767  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6768  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rfl, __pyx_t_7) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
6769  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6770 
6771  /* "dbocean.pyx":157
6772  * # convert return values to unnormalized units
6773  * self.rfl = rfl*np.pi
6774  * self.mrfl = mrfl*np.pi # <<<<<<<<<<<<<<
6775  * self.rsd = self.mrfl - self.rfl
6776  * self.sse = np.dot(self.rsd,self.rsd)/(NWL-2)
6777  */
6778  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 157, __pyx_L1_error)
6779  __Pyx_GOTREF(__pyx_t_7);
6780  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_pi); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 157, __pyx_L1_error)
6781  __Pyx_GOTREF(__pyx_t_6);
6782  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6783  __pyx_t_7 = PyNumber_Multiply(__pyx_v_mrfl, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 157, __pyx_L1_error)
6784  __Pyx_GOTREF(__pyx_t_7);
6785  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6786  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mrfl, __pyx_t_7) < 0) __PYX_ERR(0, 157, __pyx_L1_error)
6787  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6788 
6789  /* "dbocean.pyx":158
6790  * self.rfl = rfl*np.pi
6791  * self.mrfl = mrfl*np.pi
6792  * self.rsd = self.mrfl - self.rfl # <<<<<<<<<<<<<<
6793  * self.sse = np.dot(self.rsd,self.rsd)/(NWL-2)
6794  * return self.fmf, self.aot, self.chl, self.wnd, self.sse
6795  */
6796  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mrfl); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 158, __pyx_L1_error)
6797  __Pyx_GOTREF(__pyx_t_7);
6798  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rfl); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 158, __pyx_L1_error)
6799  __Pyx_GOTREF(__pyx_t_6);
6800  __pyx_t_10 = PyNumber_Subtract(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 158, __pyx_L1_error)
6801  __Pyx_GOTREF(__pyx_t_10);
6802  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6803  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6804  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rsd, __pyx_t_10) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
6805  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6806 
6807  /* "dbocean.pyx":159
6808  * self.mrfl = mrfl*np.pi
6809  * self.rsd = self.mrfl - self.rfl
6810  * self.sse = np.dot(self.rsd,self.rsd)/(NWL-2) # <<<<<<<<<<<<<<
6811  * return self.fmf, self.aot, self.chl, self.wnd, self.sse
6812  *
6813  */
6814  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 159, __pyx_L1_error)
6815  __Pyx_GOTREF(__pyx_t_6);
6816  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_dot); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 159, __pyx_L1_error)
6817  __Pyx_GOTREF(__pyx_t_7);
6818  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6819  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rsd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 159, __pyx_L1_error)
6820  __Pyx_GOTREF(__pyx_t_6);
6821  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rsd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
6822  __Pyx_GOTREF(__pyx_t_2);
6823  __pyx_t_3 = NULL;
6824  __pyx_t_8 = 0;
6825  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
6826  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
6827  if (likely(__pyx_t_3)) {
6828  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
6829  __Pyx_INCREF(__pyx_t_3);
6830  __Pyx_INCREF(function);
6831  __Pyx_DECREF_SET(__pyx_t_7, function);
6832  __pyx_t_8 = 1;
6833  }
6834  }
6835  #if CYTHON_FAST_PYCALL
6836  if (PyFunction_Check(__pyx_t_7)) {
6837  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_6, __pyx_t_2};
6838  __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 159, __pyx_L1_error)
6839  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6840  __Pyx_GOTREF(__pyx_t_10);
6841  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6842  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6843  } else
6844  #endif
6845  #if CYTHON_FAST_PYCCALL
6846  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
6847  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_6, __pyx_t_2};
6848  __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 159, __pyx_L1_error)
6849  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6850  __Pyx_GOTREF(__pyx_t_10);
6851  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6852  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6853  } else
6854  #endif
6855  {
6856  __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 159, __pyx_L1_error)
6857  __Pyx_GOTREF(__pyx_t_9);
6858  if (__pyx_t_3) {
6859  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __pyx_t_3 = NULL;
6860  }
6861  __Pyx_GIVEREF(__pyx_t_6);
6862  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
6863  __Pyx_GIVEREF(__pyx_t_2);
6864  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_2);
6865  __pyx_t_6 = 0;
6866  __pyx_t_2 = 0;
6867  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 159, __pyx_L1_error)
6868  __Pyx_GOTREF(__pyx_t_10);
6869  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6870  }
6871  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6872  __pyx_t_7 = __Pyx_PyInt_From_long((__pyx_v_7dbocean_NWL - 2)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 159, __pyx_L1_error)
6873  __Pyx_GOTREF(__pyx_t_7);
6874  __pyx_t_9 = __Pyx_PyNumber_Divide(__pyx_t_10, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 159, __pyx_L1_error)
6875  __Pyx_GOTREF(__pyx_t_9);
6876  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6877  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6878  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sse, __pyx_t_9) < 0) __PYX_ERR(0, 159, __pyx_L1_error)
6879  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6880 
6881  /* "dbocean.pyx":160
6882  * self.rsd = self.mrfl - self.rfl
6883  * self.sse = np.dot(self.rsd,self.rsd)/(NWL-2)
6884  * return self.fmf, self.aot, self.chl, self.wnd, self.sse # <<<<<<<<<<<<<<
6885  *
6886  * def plot(self, iy, ix):
6887  */
6888  __Pyx_XDECREF(__pyx_r);
6889  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fmf); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 160, __pyx_L1_error)
6890  __Pyx_GOTREF(__pyx_t_9);
6891  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_aot); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 160, __pyx_L1_error)
6892  __Pyx_GOTREF(__pyx_t_7);
6893  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_chl); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 160, __pyx_L1_error)
6894  __Pyx_GOTREF(__pyx_t_10);
6895  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wnd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error)
6896  __Pyx_GOTREF(__pyx_t_2);
6897  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_sse); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 160, __pyx_L1_error)
6898  __Pyx_GOTREF(__pyx_t_6);
6899  __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error)
6900  __Pyx_GOTREF(__pyx_t_3);
6901  __Pyx_GIVEREF(__pyx_t_9);
6902  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_9);
6903  __Pyx_GIVEREF(__pyx_t_7);
6904  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7);
6905  __Pyx_GIVEREF(__pyx_t_10);
6906  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_10);
6907  __Pyx_GIVEREF(__pyx_t_2);
6908  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2);
6909  __Pyx_GIVEREF(__pyx_t_6);
6910  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_6);
6911  __pyx_t_9 = 0;
6912  __pyx_t_7 = 0;
6913  __pyx_t_10 = 0;
6914  __pyx_t_2 = 0;
6915  __pyx_t_6 = 0;
6916  __pyx_r = __pyx_t_3;
6917  __pyx_t_3 = 0;
6918  goto __pyx_L0;
6919 
6920  /* "dbocean.pyx":118
6921  * return (model - data)*scale
6922  *
6923  * def process(self,rfl,sza,vza,raa,wnd,chl): # <<<<<<<<<<<<<<
6924  * if(self.mode==0 or self.mode==1):
6925  * if(self.mode==1):
6926  */
6927 
6928  /* function exit code */
6929  __pyx_L1_error:;
6930  __Pyx_XDECREF(__pyx_t_2);
6931  __Pyx_XDECREF(__pyx_t_3);
6932  __Pyx_XDECREF(__pyx_t_5);
6933  __Pyx_XDECREF(__pyx_t_6);
6934  __Pyx_XDECREF(__pyx_t_7);
6935  __Pyx_XDECREF(__pyx_t_9);
6936  __Pyx_XDECREF(__pyx_t_10);
6937  __Pyx_AddTraceback("dbocean.dbocean.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
6938  __pyx_r = NULL;
6939  __pyx_L0:;
6940  __Pyx_XDECREF(__pyx_v_xi);
6941  __Pyx_XDECREF(__pyx_v_tlut);
6942  __Pyx_XDECREF(__pyx_v_scale);
6943  __Pyx_XDECREF(__pyx_v_mfit);
6944  __Pyx_XDECREF(__pyx_v_mxi);
6945  __Pyx_XDECREF(__pyx_v_mrfl);
6946  __Pyx_XDECREF(__pyx_v_wnd);
6947  __Pyx_XDECREF(__pyx_v_chl);
6948  __Pyx_XGIVEREF(__pyx_r);
6949  __Pyx_RefNannyFinishContext();
6950  return __pyx_r;
6951 }
6952 
6953 /* "dbocean.pyx":162
6954  * return self.fmf, self.aot, self.chl, self.wnd, self.sse
6955  *
6956  * def plot(self, iy, ix): # <<<<<<<<<<<<<<
6957  * plt.clf()
6958  * plt.grid(True)
6959  */
6960 
6961 /* Python wrapper */
6962 static PyObject *__pyx_pw_7dbocean_7dbocean_7plot(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6963 static PyMethodDef __pyx_mdef_7dbocean_7dbocean_7plot = {"plot", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7dbocean_7dbocean_7plot, METH_VARARGS|METH_KEYWORDS, 0};
6964 static PyObject *__pyx_pw_7dbocean_7dbocean_7plot(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6965  PyObject *__pyx_v_self = 0;
6966  PyObject *__pyx_v_iy = 0;
6967  PyObject *__pyx_v_ix = 0;
6968  int __pyx_lineno = 0;
6969  const char *__pyx_filename = NULL;
6970  int __pyx_clineno = 0;
6971  PyObject *__pyx_r = 0;
6972  __Pyx_RefNannyDeclarations
6973  __Pyx_RefNannySetupContext("plot (wrapper)", 0);
6974  {
6975  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_iy,&__pyx_n_s_ix,0};
6976  PyObject* values[3] = {0,0,0};
6977  if (unlikely(__pyx_kwds)) {
6978  Py_ssize_t kw_args;
6979  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6980  switch (pos_args) {
6981  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6982  CYTHON_FALLTHROUGH;
6983  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6984  CYTHON_FALLTHROUGH;
6985  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6986  CYTHON_FALLTHROUGH;
6987  case 0: break;
6988  default: goto __pyx_L5_argtuple_error;
6989  }
6990  kw_args = PyDict_Size(__pyx_kwds);
6991  switch (pos_args) {
6992  case 0:
6993  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
6994  else goto __pyx_L5_argtuple_error;
6995  CYTHON_FALLTHROUGH;
6996  case 1:
6997  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iy)) != 0)) kw_args--;
6998  else {
6999  __Pyx_RaiseArgtupleInvalid("plot", 1, 3, 3, 1); __PYX_ERR(0, 162, __pyx_L3_error)
7000  }
7001  CYTHON_FALLTHROUGH;
7002  case 2:
7003  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ix)) != 0)) kw_args--;
7004  else {
7005  __Pyx_RaiseArgtupleInvalid("plot", 1, 3, 3, 2); __PYX_ERR(0, 162, __pyx_L3_error)
7006  }
7007  }
7008  if (unlikely(kw_args > 0)) {
7009  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "plot") < 0)) __PYX_ERR(0, 162, __pyx_L3_error)
7010  }
7011  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
7012  goto __pyx_L5_argtuple_error;
7013  } else {
7014  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7015  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7016  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7017  }
7018  __pyx_v_self = values[0];
7019  __pyx_v_iy = values[1];
7020  __pyx_v_ix = values[2];
7021  }
7022  goto __pyx_L4_argument_unpacking_done;
7023  __pyx_L5_argtuple_error:;
7024  __Pyx_RaiseArgtupleInvalid("plot", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 162, __pyx_L3_error)
7025  __pyx_L3_error:;
7026  __Pyx_AddTraceback("dbocean.dbocean.plot", __pyx_clineno, __pyx_lineno, __pyx_filename);
7027  __Pyx_RefNannyFinishContext();
7028  return NULL;
7029  __pyx_L4_argument_unpacking_done:;
7030  __pyx_r = __pyx_pf_7dbocean_7dbocean_6plot(__pyx_self, __pyx_v_self, __pyx_v_iy, __pyx_v_ix);
7031 
7032  /* function exit code */
7033  __Pyx_RefNannyFinishContext();
7034  return __pyx_r;
7035 }
7036 
7037 static PyObject *__pyx_pf_7dbocean_7dbocean_6plot(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_iy, PyObject *__pyx_v_ix) {
7038  PyObject *__pyx_v_tstr = NULL;
7039  PyObject *__pyx_r = NULL;
7040  __Pyx_RefNannyDeclarations
7041  PyObject *__pyx_t_1 = NULL;
7042  PyObject *__pyx_t_2 = NULL;
7043  PyObject *__pyx_t_3 = NULL;
7044  PyObject *__pyx_t_4 = NULL;
7045  PyObject *__pyx_t_5 = NULL;
7046  PyObject *__pyx_t_6 = NULL;
7047  PyObject *__pyx_t_7 = NULL;
7048  PyObject *__pyx_t_8 = NULL;
7049  PyObject *__pyx_t_9 = NULL;
7050  int __pyx_t_10;
7051  PyObject *__pyx_t_11 = NULL;
7052  int __pyx_lineno = 0;
7053  const char *__pyx_filename = NULL;
7054  int __pyx_clineno = 0;
7055  __Pyx_RefNannySetupContext("plot", 0);
7056 
7057  /* "dbocean.pyx":163
7058  *
7059  * def plot(self, iy, ix):
7060  * plt.clf() # <<<<<<<<<<<<<<
7061  * plt.grid(True)
7062  * plt.plot(self.wl_pts, self.rfl, marker='.', color='b', label='measured')
7063  */
7064  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_plt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error)
7065  __Pyx_GOTREF(__pyx_t_2);
7066  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_clf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
7067  __Pyx_GOTREF(__pyx_t_3);
7068  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7069  __pyx_t_2 = NULL;
7070  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
7071  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
7072  if (likely(__pyx_t_2)) {
7073  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
7074  __Pyx_INCREF(__pyx_t_2);
7075  __Pyx_INCREF(function);
7076  __Pyx_DECREF_SET(__pyx_t_3, function);
7077  }
7078  }
7079  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
7080  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
7081  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)
7082  __Pyx_GOTREF(__pyx_t_1);
7083  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7084  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7085 
7086  /* "dbocean.pyx":164
7087  * def plot(self, iy, ix):
7088  * plt.clf()
7089  * plt.grid(True) # <<<<<<<<<<<<<<
7090  * plt.plot(self.wl_pts, self.rfl, marker='.', color='b', label='measured')
7091  * plt.plot(self.wl_pts, self.mrfl, marker='.', color='g', label='modeled')
7092  */
7093  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_plt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 164, __pyx_L1_error)
7094  __Pyx_GOTREF(__pyx_t_3);
7095  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_grid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error)
7096  __Pyx_GOTREF(__pyx_t_2);
7097  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7098  __pyx_t_3 = NULL;
7099  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
7100  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
7101  if (likely(__pyx_t_3)) {
7102  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
7103  __Pyx_INCREF(__pyx_t_3);
7104  __Pyx_INCREF(function);
7105  __Pyx_DECREF_SET(__pyx_t_2, function);
7106  }
7107  }
7108  __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);
7109  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7110  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
7111  __Pyx_GOTREF(__pyx_t_1);
7112  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7113  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7114 
7115  /* "dbocean.pyx":165
7116  * plt.clf()
7117  * plt.grid(True)
7118  * plt.plot(self.wl_pts, self.rfl, marker='.', color='b', label='measured') # <<<<<<<<<<<<<<
7119  * plt.plot(self.wl_pts, self.mrfl, marker='.', color='g', label='modeled')
7120  * plt.plot(self.wl_pts, self.rsd, marker='.', color='r', label='residual')
7121  */
7122  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_plt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
7123  __Pyx_GOTREF(__pyx_t_1);
7124  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_plot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error)
7125  __Pyx_GOTREF(__pyx_t_2);
7126  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7127  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wl_pts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
7128  __Pyx_GOTREF(__pyx_t_1);
7129  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rfl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error)
7130  __Pyx_GOTREF(__pyx_t_3);
7131  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
7132  __Pyx_GOTREF(__pyx_t_4);
7133  __Pyx_GIVEREF(__pyx_t_1);
7134  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
7135  __Pyx_GIVEREF(__pyx_t_3);
7136  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
7137  __pyx_t_1 = 0;
7138  __pyx_t_3 = 0;
7139  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error)
7140  __Pyx_GOTREF(__pyx_t_3);
7141  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_marker, __pyx_kp_u__7) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
7142  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_color, __pyx_n_u_b) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
7143  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_label, __pyx_n_u_measured) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
7144  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
7145  __Pyx_GOTREF(__pyx_t_1);
7146  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7147  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7148  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7149  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7150 
7151  /* "dbocean.pyx":166
7152  * plt.grid(True)
7153  * plt.plot(self.wl_pts, self.rfl, marker='.', color='b', label='measured')
7154  * plt.plot(self.wl_pts, self.mrfl, marker='.', color='g', label='modeled') # <<<<<<<<<<<<<<
7155  * plt.plot(self.wl_pts, self.rsd, marker='.', color='r', label='residual')
7156  * plt.xlabel('wavelength (nm)')
7157  */
7158  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_plt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
7159  __Pyx_GOTREF(__pyx_t_1);
7160  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_plot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error)
7161  __Pyx_GOTREF(__pyx_t_3);
7162  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7163  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wl_pts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
7164  __Pyx_GOTREF(__pyx_t_1);
7165  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mrfl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error)
7166  __Pyx_GOTREF(__pyx_t_4);
7167  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error)
7168  __Pyx_GOTREF(__pyx_t_2);
7169  __Pyx_GIVEREF(__pyx_t_1);
7170  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
7171  __Pyx_GIVEREF(__pyx_t_4);
7172  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
7173  __pyx_t_1 = 0;
7174  __pyx_t_4 = 0;
7175  __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error)
7176  __Pyx_GOTREF(__pyx_t_4);
7177  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_marker, __pyx_kp_u__7) < 0) __PYX_ERR(0, 166, __pyx_L1_error)
7178  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_color, __pyx_n_u_g) < 0) __PYX_ERR(0, 166, __pyx_L1_error)
7179  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_label, __pyx_n_u_modeled) < 0) __PYX_ERR(0, 166, __pyx_L1_error)
7180  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
7181  __Pyx_GOTREF(__pyx_t_1);
7182  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7183  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7184  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7185  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7186 
7187  /* "dbocean.pyx":167
7188  * plt.plot(self.wl_pts, self.rfl, marker='.', color='b', label='measured')
7189  * plt.plot(self.wl_pts, self.mrfl, marker='.', color='g', label='modeled')
7190  * plt.plot(self.wl_pts, self.rsd, marker='.', color='r', label='residual') # <<<<<<<<<<<<<<
7191  * plt.xlabel('wavelength (nm)')
7192  * plt.ylabel('reflectance')
7193  */
7194  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_plt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
7195  __Pyx_GOTREF(__pyx_t_1);
7196  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_plot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error)
7197  __Pyx_GOTREF(__pyx_t_4);
7198  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7199  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wl_pts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
7200  __Pyx_GOTREF(__pyx_t_1);
7201  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rsd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)
7202  __Pyx_GOTREF(__pyx_t_2);
7203  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
7204  __Pyx_GOTREF(__pyx_t_3);
7205  __Pyx_GIVEREF(__pyx_t_1);
7206  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
7207  __Pyx_GIVEREF(__pyx_t_2);
7208  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
7209  __pyx_t_1 = 0;
7210  __pyx_t_2 = 0;
7211  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)
7212  __Pyx_GOTREF(__pyx_t_2);
7213  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_marker, __pyx_kp_u__7) < 0) __PYX_ERR(0, 167, __pyx_L1_error)
7214  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_color, __pyx_n_u_r) < 0) __PYX_ERR(0, 167, __pyx_L1_error)
7215  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_label, __pyx_n_u_residual) < 0) __PYX_ERR(0, 167, __pyx_L1_error)
7216  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
7217  __Pyx_GOTREF(__pyx_t_1);
7218  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7219  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7220  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7221  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7222 
7223  /* "dbocean.pyx":168
7224  * plt.plot(self.wl_pts, self.mrfl, marker='.', color='g', label='modeled')
7225  * plt.plot(self.wl_pts, self.rsd, marker='.', color='r', label='residual')
7226  * plt.xlabel('wavelength (nm)') # <<<<<<<<<<<<<<
7227  * plt.ylabel('reflectance')
7228  * tstr = "dbocean mode {3:d} -- y={4:}, x={5:} aot: {0:.3f} fmf: {1:.3f} sse: {2:.3}"
7229  */
7230  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_plt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
7231  __Pyx_GOTREF(__pyx_t_2);
7232  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_xlabel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error)
7233  __Pyx_GOTREF(__pyx_t_3);
7234  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7235  __pyx_t_2 = NULL;
7236  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
7237  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
7238  if (likely(__pyx_t_2)) {
7239  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
7240  __Pyx_INCREF(__pyx_t_2);
7241  __Pyx_INCREF(function);
7242  __Pyx_DECREF_SET(__pyx_t_3, function);
7243  }
7244  }
7245  __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);
7246  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
7247  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error)
7248  __Pyx_GOTREF(__pyx_t_1);
7249  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7250  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7251 
7252  /* "dbocean.pyx":169
7253  * plt.plot(self.wl_pts, self.rsd, marker='.', color='r', label='residual')
7254  * plt.xlabel('wavelength (nm)')
7255  * plt.ylabel('reflectance') # <<<<<<<<<<<<<<
7256  * tstr = "dbocean mode {3:d} -- y={4:}, x={5:} aot: {0:.3f} fmf: {1:.3f} sse: {2:.3}"
7257  * plt.title(tstr.format(self.aot, self.fmf, self.sse, self.mode, iy, ix))
7258  */
7259  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_plt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error)
7260  __Pyx_GOTREF(__pyx_t_3);
7261  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ylabel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error)
7262  __Pyx_GOTREF(__pyx_t_2);
7263  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7264  __pyx_t_3 = NULL;
7265  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
7266  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
7267  if (likely(__pyx_t_3)) {
7268  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
7269  __Pyx_INCREF(__pyx_t_3);
7270  __Pyx_INCREF(function);
7271  __Pyx_DECREF_SET(__pyx_t_2, function);
7272  }
7273  }
7274  __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);
7275  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7276  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error)
7277  __Pyx_GOTREF(__pyx_t_1);
7278  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7279  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7280 
7281  /* "dbocean.pyx":170
7282  * plt.xlabel('wavelength (nm)')
7283  * plt.ylabel('reflectance')
7284  * tstr = "dbocean mode {3:d} -- y={4:}, x={5:} aot: {0:.3f} fmf: {1:.3f} sse: {2:.3}" # <<<<<<<<<<<<<<
7285  * plt.title(tstr.format(self.aot, self.fmf, self.sse, self.mode, iy, ix))
7286  * plt.legend(loc='upper right')
7287  */
7288  __Pyx_INCREF(__pyx_kp_u_dbocean_mode_3_d_y_4_x_5_aot_0_3);
7289  __pyx_v_tstr = __pyx_kp_u_dbocean_mode_3_d_y_4_x_5_aot_0_3;
7290 
7291  /* "dbocean.pyx":171
7292  * plt.ylabel('reflectance')
7293  * tstr = "dbocean mode {3:d} -- y={4:}, x={5:} aot: {0:.3f} fmf: {1:.3f} sse: {2:.3}"
7294  * plt.title(tstr.format(self.aot, self.fmf, self.sse, self.mode, iy, ix)) # <<<<<<<<<<<<<<
7295  * plt.legend(loc='upper right')
7296  * plt.show()
7297  */
7298  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_plt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error)
7299  __Pyx_GOTREF(__pyx_t_2);
7300  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_title); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error)
7301  __Pyx_GOTREF(__pyx_t_3);
7302  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7303  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_tstr, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
7304  __Pyx_GOTREF(__pyx_t_4);
7305  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_aot); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 171, __pyx_L1_error)
7306  __Pyx_GOTREF(__pyx_t_5);
7307  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fmf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 171, __pyx_L1_error)
7308  __Pyx_GOTREF(__pyx_t_6);
7309  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_sse); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 171, __pyx_L1_error)
7310  __Pyx_GOTREF(__pyx_t_7);
7311  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 171, __pyx_L1_error)
7312  __Pyx_GOTREF(__pyx_t_8);
7313  __pyx_t_9 = NULL;
7314  __pyx_t_10 = 0;
7315  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
7316  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
7317  if (likely(__pyx_t_9)) {
7318  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
7319  __Pyx_INCREF(__pyx_t_9);
7320  __Pyx_INCREF(function);
7321  __Pyx_DECREF_SET(__pyx_t_4, function);
7322  __pyx_t_10 = 1;
7323  }
7324  }
7325  #if CYTHON_FAST_PYCALL
7326  if (PyFunction_Check(__pyx_t_4)) {
7327  PyObject *__pyx_temp[7] = {__pyx_t_9, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_v_iy, __pyx_v_ix};
7328  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 6+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error)
7329  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
7330  __Pyx_GOTREF(__pyx_t_2);
7331  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7332  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7333  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7334  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7335  } else
7336  #endif
7337  #if CYTHON_FAST_PYCCALL
7338  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
7339  PyObject *__pyx_temp[7] = {__pyx_t_9, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_v_iy, __pyx_v_ix};
7340  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 6+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error)
7341  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
7342  __Pyx_GOTREF(__pyx_t_2);
7343  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7344  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7345  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7346  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7347  } else
7348  #endif
7349  {
7350  __pyx_t_11 = PyTuple_New(6+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 171, __pyx_L1_error)
7351  __Pyx_GOTREF(__pyx_t_11);
7352  if (__pyx_t_9) {
7353  __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
7354  }
7355  __Pyx_GIVEREF(__pyx_t_5);
7356  PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_5);
7357  __Pyx_GIVEREF(__pyx_t_6);
7358  PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_6);
7359  __Pyx_GIVEREF(__pyx_t_7);
7360  PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_t_7);
7361  __Pyx_GIVEREF(__pyx_t_8);
7362  PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_10, __pyx_t_8);
7363  __Pyx_INCREF(__pyx_v_iy);
7364  __Pyx_GIVEREF(__pyx_v_iy);
7365  PyTuple_SET_ITEM(__pyx_t_11, 4+__pyx_t_10, __pyx_v_iy);
7366  __Pyx_INCREF(__pyx_v_ix);
7367  __Pyx_GIVEREF(__pyx_v_ix);
7368  PyTuple_SET_ITEM(__pyx_t_11, 5+__pyx_t_10, __pyx_v_ix);
7369  __pyx_t_5 = 0;
7370  __pyx_t_6 = 0;
7371  __pyx_t_7 = 0;
7372  __pyx_t_8 = 0;
7373  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error)
7374  __Pyx_GOTREF(__pyx_t_2);
7375  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7376  }
7377  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7378  __pyx_t_4 = NULL;
7379  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
7380  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
7381  if (likely(__pyx_t_4)) {
7382  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
7383  __Pyx_INCREF(__pyx_t_4);
7384  __Pyx_INCREF(function);
7385  __Pyx_DECREF_SET(__pyx_t_3, function);
7386  }
7387  }
7388  __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);
7389  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
7390  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7391  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error)
7392  __Pyx_GOTREF(__pyx_t_1);
7393  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7394  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7395 
7396  /* "dbocean.pyx":172
7397  * tstr = "dbocean mode {3:d} -- y={4:}, x={5:} aot: {0:.3f} fmf: {1:.3f} sse: {2:.3}"
7398  * plt.title(tstr.format(self.aot, self.fmf, self.sse, self.mode, iy, ix))
7399  * plt.legend(loc='upper right') # <<<<<<<<<<<<<<
7400  * plt.show()
7401  *
7402  */
7403  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_plt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error)
7404  __Pyx_GOTREF(__pyx_t_1);
7405  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_legend); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error)
7406  __Pyx_GOTREF(__pyx_t_3);
7407  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7408  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error)
7409  __Pyx_GOTREF(__pyx_t_1);
7410  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_loc, __pyx_kp_u_upper_right) < 0) __PYX_ERR(0, 172, __pyx_L1_error)
7411  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error)
7412  __Pyx_GOTREF(__pyx_t_2);
7413  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7414  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7415  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7416 
7417  /* "dbocean.pyx":173
7418  * plt.title(tstr.format(self.aot, self.fmf, self.sse, self.mode, iy, ix))
7419  * plt.legend(loc='upper right')
7420  * plt.show() # <<<<<<<<<<<<<<
7421  *
7422  *
7423  */
7424  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_plt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
7425  __Pyx_GOTREF(__pyx_t_1);
7426  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_show); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error)
7427  __Pyx_GOTREF(__pyx_t_3);
7428  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7429  __pyx_t_1 = NULL;
7430  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
7431  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
7432  if (likely(__pyx_t_1)) {
7433  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
7434  __Pyx_INCREF(__pyx_t_1);
7435  __Pyx_INCREF(function);
7436  __Pyx_DECREF_SET(__pyx_t_3, function);
7437  }
7438  }
7439  __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
7440  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
7441  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error)
7442  __Pyx_GOTREF(__pyx_t_2);
7443  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7444  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7445 
7446  /* "dbocean.pyx":162
7447  * return self.fmf, self.aot, self.chl, self.wnd, self.sse
7448  *
7449  * def plot(self, iy, ix): # <<<<<<<<<<<<<<
7450  * plt.clf()
7451  * plt.grid(True)
7452  */
7453 
7454  /* function exit code */
7455  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7456  goto __pyx_L0;
7457  __pyx_L1_error:;
7458  __Pyx_XDECREF(__pyx_t_1);
7459  __Pyx_XDECREF(__pyx_t_2);
7460  __Pyx_XDECREF(__pyx_t_3);
7461  __Pyx_XDECREF(__pyx_t_4);
7462  __Pyx_XDECREF(__pyx_t_5);
7463  __Pyx_XDECREF(__pyx_t_6);
7464  __Pyx_XDECREF(__pyx_t_7);
7465  __Pyx_XDECREF(__pyx_t_8);
7466  __Pyx_XDECREF(__pyx_t_9);
7467  __Pyx_XDECREF(__pyx_t_11);
7468  __Pyx_AddTraceback("dbocean.dbocean.plot", __pyx_clineno, __pyx_lineno, __pyx_filename);
7469  __pyx_r = NULL;
7470  __pyx_L0:;
7471  __Pyx_XDECREF(__pyx_v_tstr);
7472  __Pyx_XGIVEREF(__pyx_r);
7473  __Pyx_RefNannyFinishContext();
7474  return __pyx_r;
7475 }
7476 
7477 /* "dbocean.pyx":178
7478  * class input(object):
7479  *
7480  * def __init__(self, l1b_filepath): # <<<<<<<<<<<<<<
7481  * self.ifile = l1b_filepath
7482  * print ("Reading sensor data: " + self.ifile)
7483  */
7484 
7485 /* Python wrapper */
7486 static PyObject *__pyx_pw_7dbocean_5input_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7487 static PyMethodDef __pyx_mdef_7dbocean_5input_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7dbocean_5input_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
7488 static PyObject *__pyx_pw_7dbocean_5input_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7489  PyObject *__pyx_v_self = 0;
7490  PyObject *__pyx_v_l1b_filepath = 0;
7491  int __pyx_lineno = 0;
7492  const char *__pyx_filename = NULL;
7493  int __pyx_clineno = 0;
7494  PyObject *__pyx_r = 0;
7495  __Pyx_RefNannyDeclarations
7496  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
7497  {
7498  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_l1b_filepath,0};
7499  PyObject* values[2] = {0,0};
7500  if (unlikely(__pyx_kwds)) {
7501  Py_ssize_t kw_args;
7502  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7503  switch (pos_args) {
7504  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7505  CYTHON_FALLTHROUGH;
7506  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7507  CYTHON_FALLTHROUGH;
7508  case 0: break;
7509  default: goto __pyx_L5_argtuple_error;
7510  }
7511  kw_args = PyDict_Size(__pyx_kwds);
7512  switch (pos_args) {
7513  case 0:
7514  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
7515  else goto __pyx_L5_argtuple_error;
7516  CYTHON_FALLTHROUGH;
7517  case 1:
7518  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l1b_filepath)) != 0)) kw_args--;
7519  else {
7520  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 178, __pyx_L3_error)
7521  }
7522  }
7523  if (unlikely(kw_args > 0)) {
7524  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 178, __pyx_L3_error)
7525  }
7526  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
7527  goto __pyx_L5_argtuple_error;
7528  } else {
7529  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7530  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7531  }
7532  __pyx_v_self = values[0];
7533  __pyx_v_l1b_filepath = values[1];
7534  }
7535  goto __pyx_L4_argument_unpacking_done;
7536  __pyx_L5_argtuple_error:;
7537  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 178, __pyx_L3_error)
7538  __pyx_L3_error:;
7539  __Pyx_AddTraceback("dbocean.input.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7540  __Pyx_RefNannyFinishContext();
7541  return NULL;
7542  __pyx_L4_argument_unpacking_done:;
7543  __pyx_r = __pyx_pf_7dbocean_5input___init__(__pyx_self, __pyx_v_self, __pyx_v_l1b_filepath);
7544 
7545  /* function exit code */
7546  __Pyx_RefNannyFinishContext();
7547  return __pyx_r;
7548 }
7549 
7550 static PyObject *__pyx_pf_7dbocean_5input___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_l1b_filepath) {
7551  PyObject *__pyx_v_inst = NULL;
7552  PyObject *__pyx_r = NULL;
7553  __Pyx_RefNannyDeclarations
7554  PyObject *__pyx_t_1 = NULL;
7555  PyObject *__pyx_t_2 = NULL;
7556  PyObject *__pyx_t_3 = NULL;
7557  PyObject *__pyx_t_4 = NULL;
7558  PyObject *__pyx_t_5 = NULL;
7559  PyObject *__pyx_t_6 = NULL;
7560  PyObject *__pyx_t_7 = NULL;
7561  PyObject *__pyx_t_8 = NULL;
7562  PyObject *__pyx_t_9 = NULL;
7563  int __pyx_t_10;
7564  int __pyx_t_11;
7565  char const *__pyx_t_12;
7566  PyObject *__pyx_t_13 = NULL;
7567  PyObject *__pyx_t_14 = NULL;
7568  PyObject *__pyx_t_15 = NULL;
7569  PyObject *__pyx_t_16 = NULL;
7570  PyObject *__pyx_t_17 = NULL;
7571  PyObject *__pyx_t_18 = NULL;
7572  int __pyx_lineno = 0;
7573  const char *__pyx_filename = NULL;
7574  int __pyx_clineno = 0;
7575  __Pyx_RefNannySetupContext("__init__", 0);
7576 
7577  /* "dbocean.pyx":179
7578  *
7579  * def __init__(self, l1b_filepath):
7580  * self.ifile = l1b_filepath # <<<<<<<<<<<<<<
7581  * print ("Reading sensor data: " + self.ifile)
7582  * try:
7583  */
7584  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ifile, __pyx_v_l1b_filepath) < 0) __PYX_ERR(0, 179, __pyx_L1_error)
7585 
7586  /* "dbocean.pyx":180
7587  * def __init__(self, l1b_filepath):
7588  * self.ifile = l1b_filepath
7589  * print ("Reading sensor data: " + self.ifile) # <<<<<<<<<<<<<<
7590  * try:
7591  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:],
7592  */
7593  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ifile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error)
7594  __Pyx_GOTREF(__pyx_t_1);
7595  __pyx_t_2 = PyNumber_Add(__pyx_kp_u_Reading_sensor_data, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 180, __pyx_L1_error)
7596  __Pyx_GOTREF(__pyx_t_2);
7597  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7598  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error)
7599  __Pyx_GOTREF(__pyx_t_1);
7600  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7601  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7602 
7603  /* "dbocean.pyx":181
7604  * self.ifile = l1b_filepath
7605  * print ("Reading sensor data: " + self.ifile)
7606  * try: # <<<<<<<<<<<<<<
7607  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:],
7608  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:],axis=0)
7609  */
7610  {
7611  __Pyx_PyThreadState_declare
7612  __Pyx_PyThreadState_assign
7613  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
7614  __Pyx_XGOTREF(__pyx_t_3);
7615  __Pyx_XGOTREF(__pyx_t_4);
7616  __Pyx_XGOTREF(__pyx_t_5);
7617  /*try:*/ {
7618 
7619  /* "dbocean.pyx":182
7620  * print ("Reading sensor data: " + self.ifile)
7621  * try:
7622  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:], # <<<<<<<<<<<<<<
7623  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:],axis=0)
7624  * self.sza = xr.load_dataset(l1b_filepath,group='/geolocation')['solar_zenith'].values
7625  */
7626  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L3_error)
7627  __Pyx_GOTREF(__pyx_t_1);
7628  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L3_error)
7629  __Pyx_GOTREF(__pyx_t_2);
7630  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7631  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_xr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L3_error)
7632  __Pyx_GOTREF(__pyx_t_1);
7633  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 182, __pyx_L3_error)
7634  __Pyx_GOTREF(__pyx_t_6);
7635  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7636  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L3_error)
7637  __Pyx_GOTREF(__pyx_t_1);
7638  __Pyx_INCREF(__pyx_v_l1b_filepath);
7639  __Pyx_GIVEREF(__pyx_v_l1b_filepath);
7640  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_l1b_filepath);
7641  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 182, __pyx_L3_error)
7642  __Pyx_GOTREF(__pyx_t_7);
7643  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_group, __pyx_kp_u_reflectance_2) < 0) __PYX_ERR(0, 182, __pyx_L3_error)
7644  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 182, __pyx_L3_error)
7645  __Pyx_GOTREF(__pyx_t_8);
7646  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7647  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7648  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7649  __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_t_8, __pyx_n_u_toa_reflectance); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 182, __pyx_L3_error)
7650  __Pyx_GOTREF(__pyx_t_7);
7651  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7652  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_tuple__9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 182, __pyx_L3_error)
7653  __Pyx_GOTREF(__pyx_t_8);
7654  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7655 
7656  /* "dbocean.pyx":183
7657  * try:
7658  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:],
7659  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:],axis=0) # <<<<<<<<<<<<<<
7660  * self.sza = xr.load_dataset(l1b_filepath,group='/geolocation')['solar_zenith'].values
7661  * self.vza = xr.load_dataset(l1b_filepath,group='/geolocation')['sensor_zenith'].values
7662  */
7663  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_xr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 183, __pyx_L3_error)
7664  __Pyx_GOTREF(__pyx_t_7);
7665  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L3_error)
7666  __Pyx_GOTREF(__pyx_t_1);
7667  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7668  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 183, __pyx_L3_error)
7669  __Pyx_GOTREF(__pyx_t_7);
7670  __Pyx_INCREF(__pyx_v_l1b_filepath);
7671  __Pyx_GIVEREF(__pyx_v_l1b_filepath);
7672  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_l1b_filepath);
7673  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 183, __pyx_L3_error)
7674  __Pyx_GOTREF(__pyx_t_6);
7675  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_group, __pyx_kp_u_reflectance_2) < 0) __PYX_ERR(0, 183, __pyx_L3_error)
7676  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 183, __pyx_L3_error)
7677  __Pyx_GOTREF(__pyx_t_9);
7678  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7679  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7680  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7681  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_9, __pyx_n_u_toa_reflectance); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 183, __pyx_L3_error)
7682  __Pyx_GOTREF(__pyx_t_6);
7683  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7684  __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_tuple__11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 183, __pyx_L3_error)
7685  __Pyx_GOTREF(__pyx_t_9);
7686  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7687 
7688  /* "dbocean.pyx":182
7689  * print ("Reading sensor data: " + self.ifile)
7690  * try:
7691  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:], # <<<<<<<<<<<<<<
7692  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:],axis=0)
7693  * self.sza = xr.load_dataset(l1b_filepath,group='/geolocation')['solar_zenith'].values
7694  */
7695  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 182, __pyx_L3_error)
7696  __Pyx_GOTREF(__pyx_t_6);
7697  __Pyx_GIVEREF(__pyx_t_8);
7698  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
7699  __Pyx_GIVEREF(__pyx_t_9);
7700  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_9);
7701  __pyx_t_8 = 0;
7702  __pyx_t_9 = 0;
7703 
7704  /* "dbocean.pyx":183
7705  * try:
7706  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:],
7707  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:],axis=0) # <<<<<<<<<<<<<<
7708  * self.sza = xr.load_dataset(l1b_filepath,group='/geolocation')['solar_zenith'].values
7709  * self.vza = xr.load_dataset(l1b_filepath,group='/geolocation')['sensor_zenith'].values
7710  */
7711  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 183, __pyx_L3_error)
7712  __Pyx_GOTREF(__pyx_t_9);
7713  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 183, __pyx_L3_error)
7714 
7715  /* "dbocean.pyx":182
7716  * print ("Reading sensor data: " + self.ifile)
7717  * try:
7718  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:], # <<<<<<<<<<<<<<
7719  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:],axis=0)
7720  * self.sza = xr.load_dataset(l1b_filepath,group='/geolocation')['solar_zenith'].values
7721  */
7722  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 182, __pyx_L3_error)
7723  __Pyx_GOTREF(__pyx_t_8);
7724  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7725  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7726  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7727  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rfl, __pyx_t_8) < 0) __PYX_ERR(0, 182, __pyx_L3_error)
7728  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7729 
7730  /* "dbocean.pyx":184
7731  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:],
7732  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:],axis=0)
7733  * self.sza = xr.load_dataset(l1b_filepath,group='/geolocation')['solar_zenith'].values # <<<<<<<<<<<<<<
7734  * self.vza = xr.load_dataset(l1b_filepath,group='/geolocation')['sensor_zenith'].values
7735  * self.raa = xr.load_dataset(l1b_filepath,group='/geolocation')['relative_azimuth'].values
7736  */
7737  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_xr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 184, __pyx_L3_error)
7738  __Pyx_GOTREF(__pyx_t_8);
7739  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 184, __pyx_L3_error)
7740  __Pyx_GOTREF(__pyx_t_9);
7741  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7742  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 184, __pyx_L3_error)
7743  __Pyx_GOTREF(__pyx_t_8);
7744  __Pyx_INCREF(__pyx_v_l1b_filepath);
7745  __Pyx_GIVEREF(__pyx_v_l1b_filepath);
7746  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_l1b_filepath);
7747  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 184, __pyx_L3_error)
7748  __Pyx_GOTREF(__pyx_t_6);
7749  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_group, __pyx_kp_u_geolocation) < 0) __PYX_ERR(0, 184, __pyx_L3_error)
7750  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L3_error)
7751  __Pyx_GOTREF(__pyx_t_2);
7752  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7753  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7754  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7755  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_solar_zenith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 184, __pyx_L3_error)
7756  __Pyx_GOTREF(__pyx_t_6);
7757  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7758  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L3_error)
7759  __Pyx_GOTREF(__pyx_t_2);
7760  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7761  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sza, __pyx_t_2) < 0) __PYX_ERR(0, 184, __pyx_L3_error)
7762  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7763 
7764  /* "dbocean.pyx":185
7765  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:],axis=0)
7766  * self.sza = xr.load_dataset(l1b_filepath,group='/geolocation')['solar_zenith'].values
7767  * self.vza = xr.load_dataset(l1b_filepath,group='/geolocation')['sensor_zenith'].values # <<<<<<<<<<<<<<
7768  * self.raa = xr.load_dataset(l1b_filepath,group='/geolocation')['relative_azimuth'].values
7769  * self.lat = xr.load_dataset(l1b_filepath,group='/navigation_data')['latitude'].values
7770  */
7771  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_xr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L3_error)
7772  __Pyx_GOTREF(__pyx_t_2);
7773  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 185, __pyx_L3_error)
7774  __Pyx_GOTREF(__pyx_t_6);
7775  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7776  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L3_error)
7777  __Pyx_GOTREF(__pyx_t_2);
7778  __Pyx_INCREF(__pyx_v_l1b_filepath);
7779  __Pyx_GIVEREF(__pyx_v_l1b_filepath);
7780  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_l1b_filepath);
7781  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 185, __pyx_L3_error)
7782  __Pyx_GOTREF(__pyx_t_8);
7783  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_group, __pyx_kp_u_geolocation) < 0) __PYX_ERR(0, 185, __pyx_L3_error)
7784  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 185, __pyx_L3_error)
7785  __Pyx_GOTREF(__pyx_t_9);
7786  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7787  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7788  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7789  __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_t_9, __pyx_n_u_sensor_zenith); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 185, __pyx_L3_error)
7790  __Pyx_GOTREF(__pyx_t_8);
7791  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7792  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_values); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 185, __pyx_L3_error)
7793  __Pyx_GOTREF(__pyx_t_9);
7794  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7795  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_vza, __pyx_t_9) < 0) __PYX_ERR(0, 185, __pyx_L3_error)
7796  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7797 
7798  /* "dbocean.pyx":186
7799  * self.sza = xr.load_dataset(l1b_filepath,group='/geolocation')['solar_zenith'].values
7800  * self.vza = xr.load_dataset(l1b_filepath,group='/geolocation')['sensor_zenith'].values
7801  * self.raa = xr.load_dataset(l1b_filepath,group='/geolocation')['relative_azimuth'].values # <<<<<<<<<<<<<<
7802  * self.lat = xr.load_dataset(l1b_filepath,group='/navigation_data')['latitude'].values
7803  * self.lon = xr.load_dataset(l1b_filepath,group='/navigation_data')['longitude'].values
7804  */
7805  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_xr); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 186, __pyx_L3_error)
7806  __Pyx_GOTREF(__pyx_t_9);
7807  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 186, __pyx_L3_error)
7808  __Pyx_GOTREF(__pyx_t_8);
7809  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7810  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 186, __pyx_L3_error)
7811  __Pyx_GOTREF(__pyx_t_9);
7812  __Pyx_INCREF(__pyx_v_l1b_filepath);
7813  __Pyx_GIVEREF(__pyx_v_l1b_filepath);
7814  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_l1b_filepath);
7815  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 186, __pyx_L3_error)
7816  __Pyx_GOTREF(__pyx_t_2);
7817  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_group, __pyx_kp_u_geolocation) < 0) __PYX_ERR(0, 186, __pyx_L3_error)
7818  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 186, __pyx_L3_error)
7819  __Pyx_GOTREF(__pyx_t_6);
7820  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7821  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7822  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7823  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_relative_azimuth); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 186, __pyx_L3_error)
7824  __Pyx_GOTREF(__pyx_t_2);
7825  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7826  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 186, __pyx_L3_error)
7827  __Pyx_GOTREF(__pyx_t_6);
7828  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7829  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_raa, __pyx_t_6) < 0) __PYX_ERR(0, 186, __pyx_L3_error)
7830  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7831 
7832  /* "dbocean.pyx":187
7833  * self.vza = xr.load_dataset(l1b_filepath,group='/geolocation')['sensor_zenith'].values
7834  * self.raa = xr.load_dataset(l1b_filepath,group='/geolocation')['relative_azimuth'].values
7835  * self.lat = xr.load_dataset(l1b_filepath,group='/navigation_data')['latitude'].values # <<<<<<<<<<<<<<
7836  * self.lon = xr.load_dataset(l1b_filepath,group='/navigation_data')['longitude'].values
7837  * self.cld = xr.load_dataset(l1b_filepath,group='/ancillary')['cloud_mask'].values
7838  */
7839  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_xr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 187, __pyx_L3_error)
7840  __Pyx_GOTREF(__pyx_t_6);
7841  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L3_error)
7842  __Pyx_GOTREF(__pyx_t_2);
7843  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7844  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 187, __pyx_L3_error)
7845  __Pyx_GOTREF(__pyx_t_6);
7846  __Pyx_INCREF(__pyx_v_l1b_filepath);
7847  __Pyx_GIVEREF(__pyx_v_l1b_filepath);
7848  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_l1b_filepath);
7849  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 187, __pyx_L3_error)
7850  __Pyx_GOTREF(__pyx_t_9);
7851  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_group, __pyx_kp_u_navigation_data) < 0) __PYX_ERR(0, 187, __pyx_L3_error)
7852  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 187, __pyx_L3_error)
7853  __Pyx_GOTREF(__pyx_t_8);
7854  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7855  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7856  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7857  __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_t_8, __pyx_n_u_latitude); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 187, __pyx_L3_error)
7858  __Pyx_GOTREF(__pyx_t_9);
7859  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7860  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 187, __pyx_L3_error)
7861  __Pyx_GOTREF(__pyx_t_8);
7862  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7863  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lat, __pyx_t_8) < 0) __PYX_ERR(0, 187, __pyx_L3_error)
7864  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7865 
7866  /* "dbocean.pyx":188
7867  * self.raa = xr.load_dataset(l1b_filepath,group='/geolocation')['relative_azimuth'].values
7868  * self.lat = xr.load_dataset(l1b_filepath,group='/navigation_data')['latitude'].values
7869  * self.lon = xr.load_dataset(l1b_filepath,group='/navigation_data')['longitude'].values # <<<<<<<<<<<<<<
7870  * self.cld = xr.load_dataset(l1b_filepath,group='/ancillary')['cloud_mask'].values
7871  * self.wnd = xr.load_dataset(l1b_filepath,group='/ancillary')['wind_speed'].values
7872  */
7873  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_xr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 188, __pyx_L3_error)
7874  __Pyx_GOTREF(__pyx_t_8);
7875  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 188, __pyx_L3_error)
7876  __Pyx_GOTREF(__pyx_t_9);
7877  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7878  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 188, __pyx_L3_error)
7879  __Pyx_GOTREF(__pyx_t_8);
7880  __Pyx_INCREF(__pyx_v_l1b_filepath);
7881  __Pyx_GIVEREF(__pyx_v_l1b_filepath);
7882  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_l1b_filepath);
7883  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 188, __pyx_L3_error)
7884  __Pyx_GOTREF(__pyx_t_6);
7885  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_group, __pyx_kp_u_navigation_data) < 0) __PYX_ERR(0, 188, __pyx_L3_error)
7886  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L3_error)
7887  __Pyx_GOTREF(__pyx_t_2);
7888  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7889  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7890  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7891  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_longitude); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 188, __pyx_L3_error)
7892  __Pyx_GOTREF(__pyx_t_6);
7893  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7894  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L3_error)
7895  __Pyx_GOTREF(__pyx_t_2);
7896  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7897  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lon, __pyx_t_2) < 0) __PYX_ERR(0, 188, __pyx_L3_error)
7898  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7899 
7900  /* "dbocean.pyx":189
7901  * self.lat = xr.load_dataset(l1b_filepath,group='/navigation_data')['latitude'].values
7902  * self.lon = xr.load_dataset(l1b_filepath,group='/navigation_data')['longitude'].values
7903  * self.cld = xr.load_dataset(l1b_filepath,group='/ancillary')['cloud_mask'].values # <<<<<<<<<<<<<<
7904  * self.wnd = xr.load_dataset(l1b_filepath,group='/ancillary')['wind_speed'].values
7905  * self.chl = xr.load_dataset(l1b_filepath,group='/ancillary')['chlorophyll'].values
7906  */
7907  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_xr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L3_error)
7908  __Pyx_GOTREF(__pyx_t_2);
7909  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 189, __pyx_L3_error)
7910  __Pyx_GOTREF(__pyx_t_6);
7911  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7912  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L3_error)
7913  __Pyx_GOTREF(__pyx_t_2);
7914  __Pyx_INCREF(__pyx_v_l1b_filepath);
7915  __Pyx_GIVEREF(__pyx_v_l1b_filepath);
7916  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_l1b_filepath);
7917  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 189, __pyx_L3_error)
7918  __Pyx_GOTREF(__pyx_t_8);
7919  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_group, __pyx_kp_u_ancillary) < 0) __PYX_ERR(0, 189, __pyx_L3_error)
7920  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 189, __pyx_L3_error)
7921  __Pyx_GOTREF(__pyx_t_9);
7922  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7923  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7924  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7925  __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_t_9, __pyx_n_u_cloud_mask); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 189, __pyx_L3_error)
7926  __Pyx_GOTREF(__pyx_t_8);
7927  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7928  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_values); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 189, __pyx_L3_error)
7929  __Pyx_GOTREF(__pyx_t_9);
7930  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7931  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cld, __pyx_t_9) < 0) __PYX_ERR(0, 189, __pyx_L3_error)
7932  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7933 
7934  /* "dbocean.pyx":190
7935  * self.lon = xr.load_dataset(l1b_filepath,group='/navigation_data')['longitude'].values
7936  * self.cld = xr.load_dataset(l1b_filepath,group='/ancillary')['cloud_mask'].values
7937  * self.wnd = xr.load_dataset(l1b_filepath,group='/ancillary')['wind_speed'].values # <<<<<<<<<<<<<<
7938  * self.chl = xr.load_dataset(l1b_filepath,group='/ancillary')['chlorophyll'].values
7939  * self.rfl = np.transpose(self.rfl, (1,2,0))
7940  */
7941  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_xr); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 190, __pyx_L3_error)
7942  __Pyx_GOTREF(__pyx_t_9);
7943  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 190, __pyx_L3_error)
7944  __Pyx_GOTREF(__pyx_t_8);
7945  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7946  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 190, __pyx_L3_error)
7947  __Pyx_GOTREF(__pyx_t_9);
7948  __Pyx_INCREF(__pyx_v_l1b_filepath);
7949  __Pyx_GIVEREF(__pyx_v_l1b_filepath);
7950  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_l1b_filepath);
7951  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L3_error)
7952  __Pyx_GOTREF(__pyx_t_2);
7953  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_group, __pyx_kp_u_ancillary) < 0) __PYX_ERR(0, 190, __pyx_L3_error)
7954  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 190, __pyx_L3_error)
7955  __Pyx_GOTREF(__pyx_t_6);
7956  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7957  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7958  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7959  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_wind_speed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L3_error)
7960  __Pyx_GOTREF(__pyx_t_2);
7961  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7962  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 190, __pyx_L3_error)
7963  __Pyx_GOTREF(__pyx_t_6);
7964  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7965  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wnd, __pyx_t_6) < 0) __PYX_ERR(0, 190, __pyx_L3_error)
7966  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7967 
7968  /* "dbocean.pyx":191
7969  * self.cld = xr.load_dataset(l1b_filepath,group='/ancillary')['cloud_mask'].values
7970  * self.wnd = xr.load_dataset(l1b_filepath,group='/ancillary')['wind_speed'].values
7971  * self.chl = xr.load_dataset(l1b_filepath,group='/ancillary')['chlorophyll'].values # <<<<<<<<<<<<<<
7972  * self.rfl = np.transpose(self.rfl, (1,2,0))
7973  * self.shape = self.sza.shape
7974  */
7975  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_xr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 191, __pyx_L3_error)
7976  __Pyx_GOTREF(__pyx_t_6);
7977  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_load_dataset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L3_error)
7978  __Pyx_GOTREF(__pyx_t_2);
7979  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7980  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 191, __pyx_L3_error)
7981  __Pyx_GOTREF(__pyx_t_6);
7982  __Pyx_INCREF(__pyx_v_l1b_filepath);
7983  __Pyx_GIVEREF(__pyx_v_l1b_filepath);
7984  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_l1b_filepath);
7985  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 191, __pyx_L3_error)
7986  __Pyx_GOTREF(__pyx_t_9);
7987  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_group, __pyx_kp_u_ancillary) < 0) __PYX_ERR(0, 191, __pyx_L3_error)
7988  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 191, __pyx_L3_error)
7989  __Pyx_GOTREF(__pyx_t_8);
7990  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7991  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7992  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7993  __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_t_8, __pyx_n_u_chlorophyll); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 191, __pyx_L3_error)
7994  __Pyx_GOTREF(__pyx_t_9);
7995  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7996  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 191, __pyx_L3_error)
7997  __Pyx_GOTREF(__pyx_t_8);
7998  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7999  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_chl, __pyx_t_8) < 0) __PYX_ERR(0, 191, __pyx_L3_error)
8000  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8001 
8002  /* "dbocean.pyx":192
8003  * self.wnd = xr.load_dataset(l1b_filepath,group='/ancillary')['wind_speed'].values
8004  * self.chl = xr.load_dataset(l1b_filepath,group='/ancillary')['chlorophyll'].values
8005  * self.rfl = np.transpose(self.rfl, (1,2,0)) # <<<<<<<<<<<<<<
8006  * self.shape = self.sza.shape
8007  * except Exception as inst:
8008  */
8009  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 192, __pyx_L3_error)
8010  __Pyx_GOTREF(__pyx_t_9);
8011  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_transpose); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 192, __pyx_L3_error)
8012  __Pyx_GOTREF(__pyx_t_6);
8013  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8014  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rfl); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 192, __pyx_L3_error)
8015  __Pyx_GOTREF(__pyx_t_9);
8016  __pyx_t_2 = NULL;
8017  __pyx_t_10 = 0;
8018  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
8019  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
8020  if (likely(__pyx_t_2)) {
8021  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
8022  __Pyx_INCREF(__pyx_t_2);
8023  __Pyx_INCREF(function);
8024  __Pyx_DECREF_SET(__pyx_t_6, function);
8025  __pyx_t_10 = 1;
8026  }
8027  }
8028  #if CYTHON_FAST_PYCALL
8029  if (PyFunction_Check(__pyx_t_6)) {
8030  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_9, __pyx_tuple__12};
8031  __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 192, __pyx_L3_error)
8032  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
8033  __Pyx_GOTREF(__pyx_t_8);
8034  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8035  } else
8036  #endif
8037  #if CYTHON_FAST_PYCCALL
8038  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
8039  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_9, __pyx_tuple__12};
8040  __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 192, __pyx_L3_error)
8041  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
8042  __Pyx_GOTREF(__pyx_t_8);
8043  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8044  } else
8045  #endif
8046  {
8047  __pyx_t_7 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 192, __pyx_L3_error)
8048  __Pyx_GOTREF(__pyx_t_7);
8049  if (__pyx_t_2) {
8050  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;
8051  }
8052  __Pyx_GIVEREF(__pyx_t_9);
8053  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_10, __pyx_t_9);
8054  __Pyx_INCREF(__pyx_tuple__12);
8055  __Pyx_GIVEREF(__pyx_tuple__12);
8056  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_10, __pyx_tuple__12);
8057  __pyx_t_9 = 0;
8058  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 192, __pyx_L3_error)
8059  __Pyx_GOTREF(__pyx_t_8);
8060  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8061  }
8062  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8063  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rfl, __pyx_t_8) < 0) __PYX_ERR(0, 192, __pyx_L3_error)
8064  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8065 
8066  /* "dbocean.pyx":193
8067  * self.chl = xr.load_dataset(l1b_filepath,group='/ancillary')['chlorophyll'].values
8068  * self.rfl = np.transpose(self.rfl, (1,2,0))
8069  * self.shape = self.sza.shape # <<<<<<<<<<<<<<
8070  * except Exception as inst:
8071  * print(type(inst))
8072  */
8073  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_sza); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 193, __pyx_L3_error)
8074  __Pyx_GOTREF(__pyx_t_8);
8075  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 193, __pyx_L3_error)
8076  __Pyx_GOTREF(__pyx_t_6);
8077  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8078  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_shape, __pyx_t_6) < 0) __PYX_ERR(0, 193, __pyx_L3_error)
8079  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8080 
8081  /* "dbocean.pyx":181
8082  * self.ifile = l1b_filepath
8083  * print ("Reading sensor data: " + self.ifile)
8084  * try: # <<<<<<<<<<<<<<
8085  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:],
8086  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:],axis=0)
8087  */
8088  }
8089  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
8090  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
8091  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
8092  goto __pyx_L8_try_end;
8093  __pyx_L3_error:;
8094  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
8095  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
8096  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
8097  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
8098  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
8099  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
8100 
8101  /* "dbocean.pyx":194
8102  * self.rfl = np.transpose(self.rfl, (1,2,0))
8103  * self.shape = self.sza.shape
8104  * except Exception as inst: # <<<<<<<<<<<<<<
8105  * print(type(inst))
8106  * print(inst)
8107  */
8108  __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
8109  if (__pyx_t_10) {
8110  __Pyx_AddTraceback("dbocean.input.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8111  if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_7) < 0) __PYX_ERR(0, 194, __pyx_L5_except_error)
8112  __Pyx_GOTREF(__pyx_t_6);
8113  __Pyx_GOTREF(__pyx_t_8);
8114  __Pyx_GOTREF(__pyx_t_7);
8115  __Pyx_INCREF(__pyx_t_8);
8116  __pyx_v_inst = __pyx_t_8;
8117  /*try:*/ {
8118 
8119  /* "dbocean.pyx":195
8120  * self.shape = self.sza.shape
8121  * except Exception as inst:
8122  * print(type(inst)) # <<<<<<<<<<<<<<
8123  * print(inst)
8124  * print ("Unable to read from file ... exiting")
8125  */
8126  __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, ((PyObject *)Py_TYPE(__pyx_v_inst))); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 195, __pyx_L14_error)
8127  __Pyx_GOTREF(__pyx_t_9);
8128  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8129 
8130  /* "dbocean.pyx":196
8131  * except Exception as inst:
8132  * print(type(inst))
8133  * print(inst) # <<<<<<<<<<<<<<
8134  * print ("Unable to read from file ... exiting")
8135  * sys.exit()
8136  */
8137  __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v_inst); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 196, __pyx_L14_error)
8138  __Pyx_GOTREF(__pyx_t_9);
8139  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8140 
8141  /* "dbocean.pyx":197
8142  * print(type(inst))
8143  * print(inst)
8144  * print ("Unable to read from file ... exiting") # <<<<<<<<<<<<<<
8145  * sys.exit()
8146  *
8147  */
8148  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 197, __pyx_L14_error)
8149  __Pyx_GOTREF(__pyx_t_9);
8150  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8151 
8152  /* "dbocean.pyx":198
8153  * print(inst)
8154  * print ("Unable to read from file ... exiting")
8155  * sys.exit() # <<<<<<<<<<<<<<
8156  *
8157  * class output(object):
8158  */
8159  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L14_error)
8160  __Pyx_GOTREF(__pyx_t_2);
8161  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L14_error)
8162  __Pyx_GOTREF(__pyx_t_1);
8163  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8164  __pyx_t_2 = NULL;
8165  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
8166  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
8167  if (likely(__pyx_t_2)) {
8168  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
8169  __Pyx_INCREF(__pyx_t_2);
8170  __Pyx_INCREF(function);
8171  __Pyx_DECREF_SET(__pyx_t_1, function);
8172  }
8173  }
8174  __pyx_t_9 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
8175  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
8176  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 198, __pyx_L14_error)
8177  __Pyx_GOTREF(__pyx_t_9);
8178  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8179  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8180  }
8181 
8182  /* "dbocean.pyx":194
8183  * self.rfl = np.transpose(self.rfl, (1,2,0))
8184  * self.shape = self.sza.shape
8185  * except Exception as inst: # <<<<<<<<<<<<<<
8186  * print(type(inst))
8187  * print(inst)
8188  */
8189  /*finally:*/ {
8190  /*normal exit:*/{
8191  __Pyx_DECREF(__pyx_v_inst);
8192  __pyx_v_inst = NULL;
8193  goto __pyx_L15;
8194  }
8195  __pyx_L14_error:;
8196  /*exception exit:*/{
8197  __Pyx_PyThreadState_declare
8198  __Pyx_PyThreadState_assign
8199  __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
8200  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
8201  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
8202  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
8203  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
8204  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);
8205  __Pyx_XGOTREF(__pyx_t_13);
8206  __Pyx_XGOTREF(__pyx_t_14);
8207  __Pyx_XGOTREF(__pyx_t_15);
8208  __Pyx_XGOTREF(__pyx_t_16);
8209  __Pyx_XGOTREF(__pyx_t_17);
8210  __Pyx_XGOTREF(__pyx_t_18);
8211  __pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
8212  {
8213  __Pyx_DECREF(__pyx_v_inst);
8214  __pyx_v_inst = NULL;
8215  }
8216  if (PY_MAJOR_VERSION >= 3) {
8217  __Pyx_XGIVEREF(__pyx_t_16);
8218  __Pyx_XGIVEREF(__pyx_t_17);
8219  __Pyx_XGIVEREF(__pyx_t_18);
8220  __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
8221  }
8222  __Pyx_XGIVEREF(__pyx_t_13);
8223  __Pyx_XGIVEREF(__pyx_t_14);
8224  __Pyx_XGIVEREF(__pyx_t_15);
8225  __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
8226  __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
8227  __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
8228  goto __pyx_L5_except_error;
8229  }
8230  __pyx_L15:;
8231  }
8232  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
8233  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
8234  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
8235  goto __pyx_L4_exception_handled;
8236  }
8237  goto __pyx_L5_except_error;
8238  __pyx_L5_except_error:;
8239 
8240  /* "dbocean.pyx":181
8241  * self.ifile = l1b_filepath
8242  * print ("Reading sensor data: " + self.ifile)
8243  * try: # <<<<<<<<<<<<<<
8244  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:],
8245  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:],axis=0)
8246  */
8247  __Pyx_XGIVEREF(__pyx_t_3);
8248  __Pyx_XGIVEREF(__pyx_t_4);
8249  __Pyx_XGIVEREF(__pyx_t_5);
8250  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
8251  goto __pyx_L1_error;
8252  __pyx_L4_exception_handled:;
8253  __Pyx_XGIVEREF(__pyx_t_3);
8254  __Pyx_XGIVEREF(__pyx_t_4);
8255  __Pyx_XGIVEREF(__pyx_t_5);
8256  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
8257  __pyx_L8_try_end:;
8258  }
8259 
8260  /* "dbocean.pyx":178
8261  * class input(object):
8262  *
8263  * def __init__(self, l1b_filepath): # <<<<<<<<<<<<<<
8264  * self.ifile = l1b_filepath
8265  * print ("Reading sensor data: " + self.ifile)
8266  */
8267 
8268  /* function exit code */
8269  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8270  goto __pyx_L0;
8271  __pyx_L1_error:;
8272  __Pyx_XDECREF(__pyx_t_1);
8273  __Pyx_XDECREF(__pyx_t_2);
8274  __Pyx_XDECREF(__pyx_t_6);
8275  __Pyx_XDECREF(__pyx_t_7);
8276  __Pyx_XDECREF(__pyx_t_8);
8277  __Pyx_XDECREF(__pyx_t_9);
8278  __Pyx_AddTraceback("dbocean.input.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8279  __pyx_r = NULL;
8280  __pyx_L0:;
8281  __Pyx_XDECREF(__pyx_v_inst);
8282  __Pyx_XGIVEREF(__pyx_r);
8283  __Pyx_RefNannyFinishContext();
8284  return __pyx_r;
8285 }
8286 
8287 /* "dbocean.pyx":202
8288  * class output(object):
8289  *
8290  * def __init__(self, out_filepath, ydim, xdim): # <<<<<<<<<<<<<<
8291  * self.ofile = out_filepath
8292  * self.ydim = ydim
8293  */
8294 
8295 /* Python wrapper */
8296 static PyObject *__pyx_pw_7dbocean_6output_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8297 static PyMethodDef __pyx_mdef_7dbocean_6output_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7dbocean_6output_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
8298 static PyObject *__pyx_pw_7dbocean_6output_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8299  PyObject *__pyx_v_self = 0;
8300  PyObject *__pyx_v_out_filepath = 0;
8301  PyObject *__pyx_v_ydim = 0;
8302  PyObject *__pyx_v_xdim = 0;
8303  int __pyx_lineno = 0;
8304  const char *__pyx_filename = NULL;
8305  int __pyx_clineno = 0;
8306  PyObject *__pyx_r = 0;
8307  __Pyx_RefNannyDeclarations
8308  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
8309  {
8310  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_out_filepath,&__pyx_n_s_ydim,&__pyx_n_s_xdim,0};
8311  PyObject* values[4] = {0,0,0,0};
8312  if (unlikely(__pyx_kwds)) {
8313  Py_ssize_t kw_args;
8314  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8315  switch (pos_args) {
8316  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8317  CYTHON_FALLTHROUGH;
8318  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8319  CYTHON_FALLTHROUGH;
8320  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8321  CYTHON_FALLTHROUGH;
8322  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8323  CYTHON_FALLTHROUGH;
8324  case 0: break;
8325  default: goto __pyx_L5_argtuple_error;
8326  }
8327  kw_args = PyDict_Size(__pyx_kwds);
8328  switch (pos_args) {
8329  case 0:
8330  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
8331  else goto __pyx_L5_argtuple_error;
8332  CYTHON_FALLTHROUGH;
8333  case 1:
8334  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out_filepath)) != 0)) kw_args--;
8335  else {
8336  __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 202, __pyx_L3_error)
8337  }
8338  CYTHON_FALLTHROUGH;
8339  case 2:
8340  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ydim)) != 0)) kw_args--;
8341  else {
8342  __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 202, __pyx_L3_error)
8343  }
8344  CYTHON_FALLTHROUGH;
8345  case 3:
8346  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xdim)) != 0)) kw_args--;
8347  else {
8348  __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 202, __pyx_L3_error)
8349  }
8350  }
8351  if (unlikely(kw_args > 0)) {
8352  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 202, __pyx_L3_error)
8353  }
8354  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
8355  goto __pyx_L5_argtuple_error;
8356  } else {
8357  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8358  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8359  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8360  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8361  }
8362  __pyx_v_self = values[0];
8363  __pyx_v_out_filepath = values[1];
8364  __pyx_v_ydim = values[2];
8365  __pyx_v_xdim = values[3];
8366  }
8367  goto __pyx_L4_argument_unpacking_done;
8368  __pyx_L5_argtuple_error:;
8369  __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 202, __pyx_L3_error)
8370  __pyx_L3_error:;
8371  __Pyx_AddTraceback("dbocean.output.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8372  __Pyx_RefNannyFinishContext();
8373  return NULL;
8374  __pyx_L4_argument_unpacking_done:;
8375  __pyx_r = __pyx_pf_7dbocean_6output___init__(__pyx_self, __pyx_v_self, __pyx_v_out_filepath, __pyx_v_ydim, __pyx_v_xdim);
8376 
8377  /* function exit code */
8378  __Pyx_RefNannyFinishContext();
8379  return __pyx_r;
8380 }
8381 
8382 static PyObject *__pyx_pf_7dbocean_6output___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_out_filepath, PyObject *__pyx_v_ydim, PyObject *__pyx_v_xdim) {
8383  PyObject *__pyx_v_rfl = NULL;
8384  PyObject *__pyx_v_lat = NULL;
8385  PyObject *__pyx_v_lon = NULL;
8386  PyObject *__pyx_v_sza = NULL;
8387  PyObject *__pyx_v_vza = NULL;
8388  PyObject *__pyx_v_raa = NULL;
8389  PyObject *__pyx_v_wnd = NULL;
8390  PyObject *__pyx_v_chl = NULL;
8391  PyObject *__pyx_v_aot = NULL;
8392  PyObject *__pyx_v_fmf = NULL;
8393  PyObject *__pyx_v_sse = NULL;
8394  PyObject *__pyx_v_inst = NULL;
8395  PyObject *__pyx_r = NULL;
8396  __Pyx_RefNannyDeclarations
8397  PyObject *__pyx_t_1 = NULL;
8398  PyObject *__pyx_t_2 = NULL;
8399  PyObject *__pyx_t_3 = NULL;
8400  PyObject *__pyx_t_4 = NULL;
8401  PyObject *__pyx_t_5 = NULL;
8402  PyObject *__pyx_t_6 = NULL;
8403  PyObject *__pyx_t_7 = NULL;
8404  PyObject *__pyx_t_8 = NULL;
8405  int __pyx_t_9;
8406  PyObject *__pyx_t_10 = NULL;
8407  int __pyx_t_11;
8408  char const *__pyx_t_12;
8409  PyObject *__pyx_t_13 = NULL;
8410  PyObject *__pyx_t_14 = NULL;
8411  PyObject *__pyx_t_15 = NULL;
8412  PyObject *__pyx_t_16 = NULL;
8413  PyObject *__pyx_t_17 = NULL;
8414  PyObject *__pyx_t_18 = NULL;
8415  int __pyx_lineno = 0;
8416  const char *__pyx_filename = NULL;
8417  int __pyx_clineno = 0;
8418  __Pyx_RefNannySetupContext("__init__", 0);
8419 
8420  /* "dbocean.pyx":203
8421  *
8422  * def __init__(self, out_filepath, ydim, xdim):
8423  * self.ofile = out_filepath # <<<<<<<<<<<<<<
8424  * self.ydim = ydim
8425  * self.xdim = xdim
8426  */
8427  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ofile, __pyx_v_out_filepath) < 0) __PYX_ERR(0, 203, __pyx_L1_error)
8428 
8429  /* "dbocean.pyx":204
8430  * def __init__(self, out_filepath, ydim, xdim):
8431  * self.ofile = out_filepath
8432  * self.ydim = ydim # <<<<<<<<<<<<<<
8433  * self.xdim = xdim
8434  * try:
8435  */
8436  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ydim, __pyx_v_ydim) < 0) __PYX_ERR(0, 204, __pyx_L1_error)
8437 
8438  /* "dbocean.pyx":205
8439  * self.ofile = out_filepath
8440  * self.ydim = ydim
8441  * self.xdim = xdim # <<<<<<<<<<<<<<
8442  * try:
8443  * rfl = xr.DataArray(np.zeros((NWL,ydim,xdim)),dims=('wl','y', 'x'))
8444  */
8445  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_xdim, __pyx_v_xdim) < 0) __PYX_ERR(0, 205, __pyx_L1_error)
8446 
8447  /* "dbocean.pyx":206
8448  * self.ydim = ydim
8449  * self.xdim = xdim
8450  * try: # <<<<<<<<<<<<<<
8451  * rfl = xr.DataArray(np.zeros((NWL,ydim,xdim)),dims=('wl','y', 'x'))
8452  * lat = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8453  */
8454  {
8455  __Pyx_PyThreadState_declare
8456  __Pyx_PyThreadState_assign
8457  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
8458  __Pyx_XGOTREF(__pyx_t_1);
8459  __Pyx_XGOTREF(__pyx_t_2);
8460  __Pyx_XGOTREF(__pyx_t_3);
8461  /*try:*/ {
8462 
8463  /* "dbocean.pyx":207
8464  * self.xdim = xdim
8465  * try:
8466  * rfl = xr.DataArray(np.zeros((NWL,ydim,xdim)),dims=('wl','y', 'x')) # <<<<<<<<<<<<<<
8467  * lat = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8468  * lon = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8469  */
8470  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_xr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 207, __pyx_L3_error)
8471  __Pyx_GOTREF(__pyx_t_4);
8472  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DataArray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 207, __pyx_L3_error)
8473  __Pyx_GOTREF(__pyx_t_5);
8474  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8475  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 207, __pyx_L3_error)
8476  __Pyx_GOTREF(__pyx_t_6);
8477  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 207, __pyx_L3_error)
8478  __Pyx_GOTREF(__pyx_t_7);
8479  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8480  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_7dbocean_NWL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 207, __pyx_L3_error)
8481  __Pyx_GOTREF(__pyx_t_6);
8482  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 207, __pyx_L3_error)
8483  __Pyx_GOTREF(__pyx_t_8);
8484  __Pyx_GIVEREF(__pyx_t_6);
8485  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
8486  __Pyx_INCREF(__pyx_v_ydim);
8487  __Pyx_GIVEREF(__pyx_v_ydim);
8488  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ydim);
8489  __Pyx_INCREF(__pyx_v_xdim);
8490  __Pyx_GIVEREF(__pyx_v_xdim);
8491  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_xdim);
8492  __pyx_t_6 = 0;
8493  __pyx_t_6 = NULL;
8494  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
8495  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
8496  if (likely(__pyx_t_6)) {
8497  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
8498  __Pyx_INCREF(__pyx_t_6);
8499  __Pyx_INCREF(function);
8500  __Pyx_DECREF_SET(__pyx_t_7, function);
8501  }
8502  }
8503  __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);
8504  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
8505  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8506  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 207, __pyx_L3_error)
8507  __Pyx_GOTREF(__pyx_t_4);
8508  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8509  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 207, __pyx_L3_error)
8510  __Pyx_GOTREF(__pyx_t_7);
8511  __Pyx_GIVEREF(__pyx_t_4);
8512  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
8513  __pyx_t_4 = 0;
8514  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 207, __pyx_L3_error)
8515  __Pyx_GOTREF(__pyx_t_4);
8516  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dims, __pyx_tuple__14) < 0) __PYX_ERR(0, 207, __pyx_L3_error)
8517  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 207, __pyx_L3_error)
8518  __Pyx_GOTREF(__pyx_t_8);
8519  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8520  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8521  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8522  __pyx_v_rfl = __pyx_t_8;
8523  __pyx_t_8 = 0;
8524 
8525  /* "dbocean.pyx":208
8526  * try:
8527  * rfl = xr.DataArray(np.zeros((NWL,ydim,xdim)),dims=('wl','y', 'x'))
8528  * lat = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x')) # <<<<<<<<<<<<<<
8529  * lon = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8530  * sza = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8531  */
8532  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_xr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 208, __pyx_L3_error)
8533  __Pyx_GOTREF(__pyx_t_8);
8534  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_DataArray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 208, __pyx_L3_error)
8535  __Pyx_GOTREF(__pyx_t_4);
8536  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8537  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 208, __pyx_L3_error)
8538  __Pyx_GOTREF(__pyx_t_7);
8539  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 208, __pyx_L3_error)
8540  __Pyx_GOTREF(__pyx_t_5);
8541  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8542  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 208, __pyx_L3_error)
8543  __Pyx_GOTREF(__pyx_t_7);
8544  __Pyx_INCREF(__pyx_v_ydim);
8545  __Pyx_GIVEREF(__pyx_v_ydim);
8546  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_ydim);
8547  __Pyx_INCREF(__pyx_v_xdim);
8548  __Pyx_GIVEREF(__pyx_v_xdim);
8549  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_xdim);
8550  __pyx_t_6 = NULL;
8551  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
8552  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
8553  if (likely(__pyx_t_6)) {
8554  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
8555  __Pyx_INCREF(__pyx_t_6);
8556  __Pyx_INCREF(function);
8557  __Pyx_DECREF_SET(__pyx_t_5, function);
8558  }
8559  }
8560  __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);
8561  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
8562  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8563  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 208, __pyx_L3_error)
8564  __Pyx_GOTREF(__pyx_t_8);
8565  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8566  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 208, __pyx_L3_error)
8567  __Pyx_GOTREF(__pyx_t_5);
8568  __Pyx_GIVEREF(__pyx_t_8);
8569  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8);
8570  __pyx_t_8 = 0;
8571  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 208, __pyx_L3_error)
8572  __Pyx_GOTREF(__pyx_t_8);
8573  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dims, __pyx_tuple__15) < 0) __PYX_ERR(0, 208, __pyx_L3_error)
8574  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 208, __pyx_L3_error)
8575  __Pyx_GOTREF(__pyx_t_7);
8576  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8577  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8578  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8579  __pyx_v_lat = __pyx_t_7;
8580  __pyx_t_7 = 0;
8581 
8582  /* "dbocean.pyx":209
8583  * rfl = xr.DataArray(np.zeros((NWL,ydim,xdim)),dims=('wl','y', 'x'))
8584  * lat = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8585  * lon = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x')) # <<<<<<<<<<<<<<
8586  * sza = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8587  * vza = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8588  */
8589  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_xr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 209, __pyx_L3_error)
8590  __Pyx_GOTREF(__pyx_t_7);
8591  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_DataArray); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 209, __pyx_L3_error)
8592  __Pyx_GOTREF(__pyx_t_8);
8593  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8594  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 209, __pyx_L3_error)
8595  __Pyx_GOTREF(__pyx_t_5);
8596  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 209, __pyx_L3_error)
8597  __Pyx_GOTREF(__pyx_t_4);
8598  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8599  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 209, __pyx_L3_error)
8600  __Pyx_GOTREF(__pyx_t_5);
8601  __Pyx_INCREF(__pyx_v_ydim);
8602  __Pyx_GIVEREF(__pyx_v_ydim);
8603  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ydim);
8604  __Pyx_INCREF(__pyx_v_xdim);
8605  __Pyx_GIVEREF(__pyx_v_xdim);
8606  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_xdim);
8607  __pyx_t_6 = NULL;
8608  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
8609  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
8610  if (likely(__pyx_t_6)) {
8611  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
8612  __Pyx_INCREF(__pyx_t_6);
8613  __Pyx_INCREF(function);
8614  __Pyx_DECREF_SET(__pyx_t_4, function);
8615  }
8616  }
8617  __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);
8618  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
8619  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8620  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 209, __pyx_L3_error)
8621  __Pyx_GOTREF(__pyx_t_7);
8622  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8623  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 209, __pyx_L3_error)
8624  __Pyx_GOTREF(__pyx_t_4);
8625  __Pyx_GIVEREF(__pyx_t_7);
8626  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7);
8627  __pyx_t_7 = 0;
8628  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 209, __pyx_L3_error)
8629  __Pyx_GOTREF(__pyx_t_7);
8630  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dims, __pyx_tuple__15) < 0) __PYX_ERR(0, 209, __pyx_L3_error)
8631  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 209, __pyx_L3_error)
8632  __Pyx_GOTREF(__pyx_t_5);
8633  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8634  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8635  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8636  __pyx_v_lon = __pyx_t_5;
8637  __pyx_t_5 = 0;
8638 
8639  /* "dbocean.pyx":210
8640  * lat = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8641  * lon = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8642  * sza = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x')) # <<<<<<<<<<<<<<
8643  * vza = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8644  * raa = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8645  */
8646  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_xr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 210, __pyx_L3_error)
8647  __Pyx_GOTREF(__pyx_t_5);
8648  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_DataArray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 210, __pyx_L3_error)
8649  __Pyx_GOTREF(__pyx_t_7);
8650  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8651  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 210, __pyx_L3_error)
8652  __Pyx_GOTREF(__pyx_t_4);
8653  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L3_error)
8654  __Pyx_GOTREF(__pyx_t_8);
8655  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8656  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 210, __pyx_L3_error)
8657  __Pyx_GOTREF(__pyx_t_4);
8658  __Pyx_INCREF(__pyx_v_ydim);
8659  __Pyx_GIVEREF(__pyx_v_ydim);
8660  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_ydim);
8661  __Pyx_INCREF(__pyx_v_xdim);
8662  __Pyx_GIVEREF(__pyx_v_xdim);
8663  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_xdim);
8664  __pyx_t_6 = NULL;
8665  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
8666  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
8667  if (likely(__pyx_t_6)) {
8668  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
8669  __Pyx_INCREF(__pyx_t_6);
8670  __Pyx_INCREF(function);
8671  __Pyx_DECREF_SET(__pyx_t_8, function);
8672  }
8673  }
8674  __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);
8675  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
8676  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8677  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 210, __pyx_L3_error)
8678  __Pyx_GOTREF(__pyx_t_5);
8679  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8680  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L3_error)
8681  __Pyx_GOTREF(__pyx_t_8);
8682  __Pyx_GIVEREF(__pyx_t_5);
8683  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
8684  __pyx_t_5 = 0;
8685  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 210, __pyx_L3_error)
8686  __Pyx_GOTREF(__pyx_t_5);
8687  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dims, __pyx_tuple__15) < 0) __PYX_ERR(0, 210, __pyx_L3_error)
8688  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 210, __pyx_L3_error)
8689  __Pyx_GOTREF(__pyx_t_4);
8690  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8691  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8692  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8693  __pyx_v_sza = __pyx_t_4;
8694  __pyx_t_4 = 0;
8695 
8696  /* "dbocean.pyx":211
8697  * lon = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8698  * sza = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8699  * vza = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x')) # <<<<<<<<<<<<<<
8700  * raa = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8701  * wnd = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8702  */
8703  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_xr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 211, __pyx_L3_error)
8704  __Pyx_GOTREF(__pyx_t_4);
8705  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DataArray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 211, __pyx_L3_error)
8706  __Pyx_GOTREF(__pyx_t_5);
8707  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8708  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 211, __pyx_L3_error)
8709  __Pyx_GOTREF(__pyx_t_8);
8710  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 211, __pyx_L3_error)
8711  __Pyx_GOTREF(__pyx_t_7);
8712  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8713  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 211, __pyx_L3_error)
8714  __Pyx_GOTREF(__pyx_t_8);
8715  __Pyx_INCREF(__pyx_v_ydim);
8716  __Pyx_GIVEREF(__pyx_v_ydim);
8717  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_ydim);
8718  __Pyx_INCREF(__pyx_v_xdim);
8719  __Pyx_GIVEREF(__pyx_v_xdim);
8720  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_xdim);
8721  __pyx_t_6 = NULL;
8722  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
8723  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
8724  if (likely(__pyx_t_6)) {
8725  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
8726  __Pyx_INCREF(__pyx_t_6);
8727  __Pyx_INCREF(function);
8728  __Pyx_DECREF_SET(__pyx_t_7, function);
8729  }
8730  }
8731  __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);
8732  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
8733  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8734  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 211, __pyx_L3_error)
8735  __Pyx_GOTREF(__pyx_t_4);
8736  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8737  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 211, __pyx_L3_error)
8738  __Pyx_GOTREF(__pyx_t_7);
8739  __Pyx_GIVEREF(__pyx_t_4);
8740  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
8741  __pyx_t_4 = 0;
8742  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 211, __pyx_L3_error)
8743  __Pyx_GOTREF(__pyx_t_4);
8744  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dims, __pyx_tuple__15) < 0) __PYX_ERR(0, 211, __pyx_L3_error)
8745  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 211, __pyx_L3_error)
8746  __Pyx_GOTREF(__pyx_t_8);
8747  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8748  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8749  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8750  __pyx_v_vza = __pyx_t_8;
8751  __pyx_t_8 = 0;
8752 
8753  /* "dbocean.pyx":212
8754  * sza = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8755  * vza = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8756  * raa = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x')) # <<<<<<<<<<<<<<
8757  * wnd = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8758  * chl = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8759  */
8760  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_xr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 212, __pyx_L3_error)
8761  __Pyx_GOTREF(__pyx_t_8);
8762  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_DataArray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 212, __pyx_L3_error)
8763  __Pyx_GOTREF(__pyx_t_4);
8764  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8765  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 212, __pyx_L3_error)
8766  __Pyx_GOTREF(__pyx_t_7);
8767  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 212, __pyx_L3_error)
8768  __Pyx_GOTREF(__pyx_t_5);
8769  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8770  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 212, __pyx_L3_error)
8771  __Pyx_GOTREF(__pyx_t_7);
8772  __Pyx_INCREF(__pyx_v_ydim);
8773  __Pyx_GIVEREF(__pyx_v_ydim);
8774  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_ydim);
8775  __Pyx_INCREF(__pyx_v_xdim);
8776  __Pyx_GIVEREF(__pyx_v_xdim);
8777  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_xdim);
8778  __pyx_t_6 = NULL;
8779  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
8780  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
8781  if (likely(__pyx_t_6)) {
8782  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
8783  __Pyx_INCREF(__pyx_t_6);
8784  __Pyx_INCREF(function);
8785  __Pyx_DECREF_SET(__pyx_t_5, function);
8786  }
8787  }
8788  __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);
8789  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
8790  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8791  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 212, __pyx_L3_error)
8792  __Pyx_GOTREF(__pyx_t_8);
8793  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8794  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 212, __pyx_L3_error)
8795  __Pyx_GOTREF(__pyx_t_5);
8796  __Pyx_GIVEREF(__pyx_t_8);
8797  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8);
8798  __pyx_t_8 = 0;
8799  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 212, __pyx_L3_error)
8800  __Pyx_GOTREF(__pyx_t_8);
8801  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dims, __pyx_tuple__15) < 0) __PYX_ERR(0, 212, __pyx_L3_error)
8802  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 212, __pyx_L3_error)
8803  __Pyx_GOTREF(__pyx_t_7);
8804  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8805  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8806  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8807  __pyx_v_raa = __pyx_t_7;
8808  __pyx_t_7 = 0;
8809 
8810  /* "dbocean.pyx":213
8811  * vza = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8812  * raa = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8813  * wnd = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x')) # <<<<<<<<<<<<<<
8814  * chl = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8815  * aot = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8816  */
8817  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_xr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 213, __pyx_L3_error)
8818  __Pyx_GOTREF(__pyx_t_7);
8819  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_DataArray); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 213, __pyx_L3_error)
8820  __Pyx_GOTREF(__pyx_t_8);
8821  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8822  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 213, __pyx_L3_error)
8823  __Pyx_GOTREF(__pyx_t_5);
8824  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 213, __pyx_L3_error)
8825  __Pyx_GOTREF(__pyx_t_4);
8826  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8827  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 213, __pyx_L3_error)
8828  __Pyx_GOTREF(__pyx_t_5);
8829  __Pyx_INCREF(__pyx_v_ydim);
8830  __Pyx_GIVEREF(__pyx_v_ydim);
8831  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ydim);
8832  __Pyx_INCREF(__pyx_v_xdim);
8833  __Pyx_GIVEREF(__pyx_v_xdim);
8834  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_xdim);
8835  __pyx_t_6 = NULL;
8836  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
8837  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
8838  if (likely(__pyx_t_6)) {
8839  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
8840  __Pyx_INCREF(__pyx_t_6);
8841  __Pyx_INCREF(function);
8842  __Pyx_DECREF_SET(__pyx_t_4, function);
8843  }
8844  }
8845  __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);
8846  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
8847  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8848  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 213, __pyx_L3_error)
8849  __Pyx_GOTREF(__pyx_t_7);
8850  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8851  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 213, __pyx_L3_error)
8852  __Pyx_GOTREF(__pyx_t_4);
8853  __Pyx_GIVEREF(__pyx_t_7);
8854  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7);
8855  __pyx_t_7 = 0;
8856  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 213, __pyx_L3_error)
8857  __Pyx_GOTREF(__pyx_t_7);
8858  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dims, __pyx_tuple__15) < 0) __PYX_ERR(0, 213, __pyx_L3_error)
8859  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 213, __pyx_L3_error)
8860  __Pyx_GOTREF(__pyx_t_5);
8861  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8862  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8863  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8864  __pyx_v_wnd = __pyx_t_5;
8865  __pyx_t_5 = 0;
8866 
8867  /* "dbocean.pyx":214
8868  * raa = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8869  * wnd = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8870  * chl = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x')) # <<<<<<<<<<<<<<
8871  * aot = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8872  * fmf = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8873  */
8874  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_xr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 214, __pyx_L3_error)
8875  __Pyx_GOTREF(__pyx_t_5);
8876  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_DataArray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 214, __pyx_L3_error)
8877  __Pyx_GOTREF(__pyx_t_7);
8878  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8879  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 214, __pyx_L3_error)
8880  __Pyx_GOTREF(__pyx_t_4);
8881  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 214, __pyx_L3_error)
8882  __Pyx_GOTREF(__pyx_t_8);
8883  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8884  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 214, __pyx_L3_error)
8885  __Pyx_GOTREF(__pyx_t_4);
8886  __Pyx_INCREF(__pyx_v_ydim);
8887  __Pyx_GIVEREF(__pyx_v_ydim);
8888  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_ydim);
8889  __Pyx_INCREF(__pyx_v_xdim);
8890  __Pyx_GIVEREF(__pyx_v_xdim);
8891  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_xdim);
8892  __pyx_t_6 = NULL;
8893  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
8894  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
8895  if (likely(__pyx_t_6)) {
8896  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
8897  __Pyx_INCREF(__pyx_t_6);
8898  __Pyx_INCREF(function);
8899  __Pyx_DECREF_SET(__pyx_t_8, function);
8900  }
8901  }
8902  __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);
8903  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
8904  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8905  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 214, __pyx_L3_error)
8906  __Pyx_GOTREF(__pyx_t_5);
8907  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8908  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 214, __pyx_L3_error)
8909  __Pyx_GOTREF(__pyx_t_8);
8910  __Pyx_GIVEREF(__pyx_t_5);
8911  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
8912  __pyx_t_5 = 0;
8913  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 214, __pyx_L3_error)
8914  __Pyx_GOTREF(__pyx_t_5);
8915  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dims, __pyx_tuple__15) < 0) __PYX_ERR(0, 214, __pyx_L3_error)
8916  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 214, __pyx_L3_error)
8917  __Pyx_GOTREF(__pyx_t_4);
8918  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8919  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8920  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8921  __pyx_v_chl = __pyx_t_4;
8922  __pyx_t_4 = 0;
8923 
8924  /* "dbocean.pyx":215
8925  * wnd = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8926  * chl = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8927  * aot = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x')) # <<<<<<<<<<<<<<
8928  * fmf = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8929  * sse = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8930  */
8931  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_xr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 215, __pyx_L3_error)
8932  __Pyx_GOTREF(__pyx_t_4);
8933  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DataArray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 215, __pyx_L3_error)
8934  __Pyx_GOTREF(__pyx_t_5);
8935  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8936  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 215, __pyx_L3_error)
8937  __Pyx_GOTREF(__pyx_t_8);
8938  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 215, __pyx_L3_error)
8939  __Pyx_GOTREF(__pyx_t_7);
8940  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8941  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 215, __pyx_L3_error)
8942  __Pyx_GOTREF(__pyx_t_8);
8943  __Pyx_INCREF(__pyx_v_ydim);
8944  __Pyx_GIVEREF(__pyx_v_ydim);
8945  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_ydim);
8946  __Pyx_INCREF(__pyx_v_xdim);
8947  __Pyx_GIVEREF(__pyx_v_xdim);
8948  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_xdim);
8949  __pyx_t_6 = NULL;
8950  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
8951  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
8952  if (likely(__pyx_t_6)) {
8953  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
8954  __Pyx_INCREF(__pyx_t_6);
8955  __Pyx_INCREF(function);
8956  __Pyx_DECREF_SET(__pyx_t_7, function);
8957  }
8958  }
8959  __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);
8960  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
8961  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8962  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 215, __pyx_L3_error)
8963  __Pyx_GOTREF(__pyx_t_4);
8964  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8965  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 215, __pyx_L3_error)
8966  __Pyx_GOTREF(__pyx_t_7);
8967  __Pyx_GIVEREF(__pyx_t_4);
8968  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
8969  __pyx_t_4 = 0;
8970  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 215, __pyx_L3_error)
8971  __Pyx_GOTREF(__pyx_t_4);
8972  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dims, __pyx_tuple__15) < 0) __PYX_ERR(0, 215, __pyx_L3_error)
8973  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 215, __pyx_L3_error)
8974  __Pyx_GOTREF(__pyx_t_8);
8975  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8976  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8977  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8978  __pyx_v_aot = __pyx_t_8;
8979  __pyx_t_8 = 0;
8980 
8981  /* "dbocean.pyx":216
8982  * chl = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8983  * aot = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8984  * fmf = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x')) # <<<<<<<<<<<<<<
8985  * sse = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
8986  * self.ds = xr.Dataset({'rfl': rfl, 'lat': lat, 'lon': lon,
8987  */
8988  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_xr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 216, __pyx_L3_error)
8989  __Pyx_GOTREF(__pyx_t_8);
8990  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_DataArray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 216, __pyx_L3_error)
8991  __Pyx_GOTREF(__pyx_t_4);
8992  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8993  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 216, __pyx_L3_error)
8994  __Pyx_GOTREF(__pyx_t_7);
8995  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 216, __pyx_L3_error)
8996  __Pyx_GOTREF(__pyx_t_5);
8997  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8998  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 216, __pyx_L3_error)
8999  __Pyx_GOTREF(__pyx_t_7);
9000  __Pyx_INCREF(__pyx_v_ydim);
9001  __Pyx_GIVEREF(__pyx_v_ydim);
9002  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_ydim);
9003  __Pyx_INCREF(__pyx_v_xdim);
9004  __Pyx_GIVEREF(__pyx_v_xdim);
9005  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_xdim);
9006  __pyx_t_6 = NULL;
9007  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
9008  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
9009  if (likely(__pyx_t_6)) {
9010  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
9011  __Pyx_INCREF(__pyx_t_6);
9012  __Pyx_INCREF(function);
9013  __Pyx_DECREF_SET(__pyx_t_5, function);
9014  }
9015  }
9016  __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);
9017  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
9018  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9019  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 216, __pyx_L3_error)
9020  __Pyx_GOTREF(__pyx_t_8);
9021  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9022  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 216, __pyx_L3_error)
9023  __Pyx_GOTREF(__pyx_t_5);
9024  __Pyx_GIVEREF(__pyx_t_8);
9025  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8);
9026  __pyx_t_8 = 0;
9027  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 216, __pyx_L3_error)
9028  __Pyx_GOTREF(__pyx_t_8);
9029  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dims, __pyx_tuple__15) < 0) __PYX_ERR(0, 216, __pyx_L3_error)
9030  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 216, __pyx_L3_error)
9031  __Pyx_GOTREF(__pyx_t_7);
9032  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9033  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9034  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9035  __pyx_v_fmf = __pyx_t_7;
9036  __pyx_t_7 = 0;
9037 
9038  /* "dbocean.pyx":217
9039  * aot = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
9040  * fmf = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
9041  * sse = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x')) # <<<<<<<<<<<<<<
9042  * self.ds = xr.Dataset({'rfl': rfl, 'lat': lat, 'lon': lon,
9043  * 'sza': sza, 'vza': vza, 'raa': raa,
9044  */
9045  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_xr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 217, __pyx_L3_error)
9046  __Pyx_GOTREF(__pyx_t_7);
9047  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_DataArray); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 217, __pyx_L3_error)
9048  __Pyx_GOTREF(__pyx_t_8);
9049  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9050  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 217, __pyx_L3_error)
9051  __Pyx_GOTREF(__pyx_t_5);
9052  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 217, __pyx_L3_error)
9053  __Pyx_GOTREF(__pyx_t_4);
9054  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9055  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 217, __pyx_L3_error)
9056  __Pyx_GOTREF(__pyx_t_5);
9057  __Pyx_INCREF(__pyx_v_ydim);
9058  __Pyx_GIVEREF(__pyx_v_ydim);
9059  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ydim);
9060  __Pyx_INCREF(__pyx_v_xdim);
9061  __Pyx_GIVEREF(__pyx_v_xdim);
9062  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_xdim);
9063  __pyx_t_6 = NULL;
9064  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
9065  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
9066  if (likely(__pyx_t_6)) {
9067  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
9068  __Pyx_INCREF(__pyx_t_6);
9069  __Pyx_INCREF(function);
9070  __Pyx_DECREF_SET(__pyx_t_4, function);
9071  }
9072  }
9073  __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);
9074  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
9075  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9076  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 217, __pyx_L3_error)
9077  __Pyx_GOTREF(__pyx_t_7);
9078  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9079  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 217, __pyx_L3_error)
9080  __Pyx_GOTREF(__pyx_t_4);
9081  __Pyx_GIVEREF(__pyx_t_7);
9082  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7);
9083  __pyx_t_7 = 0;
9084  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 217, __pyx_L3_error)
9085  __Pyx_GOTREF(__pyx_t_7);
9086  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dims, __pyx_tuple__15) < 0) __PYX_ERR(0, 217, __pyx_L3_error)
9087  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 217, __pyx_L3_error)
9088  __Pyx_GOTREF(__pyx_t_5);
9089  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9090  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9091  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9092  __pyx_v_sse = __pyx_t_5;
9093  __pyx_t_5 = 0;
9094 
9095  /* "dbocean.pyx":218
9096  * fmf = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
9097  * sse = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
9098  * self.ds = xr.Dataset({'rfl': rfl, 'lat': lat, 'lon': lon, # <<<<<<<<<<<<<<
9099  * 'sza': sza, 'vza': vza, 'raa': raa,
9100  * 'wnd': wnd, 'chl': chl, 'aot': aot,
9101  */
9102  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_xr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 218, __pyx_L3_error)
9103  __Pyx_GOTREF(__pyx_t_7);
9104  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_Dataset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 218, __pyx_L3_error)
9105  __Pyx_GOTREF(__pyx_t_4);
9106  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9107  __pyx_t_7 = __Pyx_PyDict_NewPresized(11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 218, __pyx_L3_error)
9108  __Pyx_GOTREF(__pyx_t_7);
9109  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_rfl, __pyx_v_rfl) < 0) __PYX_ERR(0, 218, __pyx_L3_error)
9110  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_lat, __pyx_v_lat) < 0) __PYX_ERR(0, 218, __pyx_L3_error)
9111  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_lon, __pyx_v_lon) < 0) __PYX_ERR(0, 218, __pyx_L3_error)
9112 
9113  /* "dbocean.pyx":219
9114  * sse = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
9115  * self.ds = xr.Dataset({'rfl': rfl, 'lat': lat, 'lon': lon,
9116  * 'sza': sza, 'vza': vza, 'raa': raa, # <<<<<<<<<<<<<<
9117  * 'wnd': wnd, 'chl': chl, 'aot': aot,
9118  * 'fmf': fmf, 'sse': sse, })
9119  */
9120  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_sza, __pyx_v_sza) < 0) __PYX_ERR(0, 218, __pyx_L3_error)
9121  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_vza, __pyx_v_vza) < 0) __PYX_ERR(0, 218, __pyx_L3_error)
9122  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_raa, __pyx_v_raa) < 0) __PYX_ERR(0, 218, __pyx_L3_error)
9123 
9124  /* "dbocean.pyx":220
9125  * self.ds = xr.Dataset({'rfl': rfl, 'lat': lat, 'lon': lon,
9126  * 'sza': sza, 'vza': vza, 'raa': raa,
9127  * 'wnd': wnd, 'chl': chl, 'aot': aot, # <<<<<<<<<<<<<<
9128  * 'fmf': fmf, 'sse': sse, })
9129  * except Exception as inst:
9130  */
9131  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_wnd, __pyx_v_wnd) < 0) __PYX_ERR(0, 218, __pyx_L3_error)
9132  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_chl, __pyx_v_chl) < 0) __PYX_ERR(0, 218, __pyx_L3_error)
9133  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_aot, __pyx_v_aot) < 0) __PYX_ERR(0, 218, __pyx_L3_error)
9134 
9135  /* "dbocean.pyx":221
9136  * 'sza': sza, 'vza': vza, 'raa': raa,
9137  * 'wnd': wnd, 'chl': chl, 'aot': aot,
9138  * 'fmf': fmf, 'sse': sse, }) # <<<<<<<<<<<<<<
9139  * except Exception as inst:
9140  * print(type(inst))
9141  */
9142  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_fmf, __pyx_v_fmf) < 0) __PYX_ERR(0, 218, __pyx_L3_error)
9143  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_sse, __pyx_v_sse) < 0) __PYX_ERR(0, 218, __pyx_L3_error)
9144  __pyx_t_8 = NULL;
9145  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
9146  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
9147  if (likely(__pyx_t_8)) {
9148  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
9149  __Pyx_INCREF(__pyx_t_8);
9150  __Pyx_INCREF(function);
9151  __Pyx_DECREF_SET(__pyx_t_4, function);
9152  }
9153  }
9154  __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);
9155  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
9156  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9157  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 218, __pyx_L3_error)
9158  __Pyx_GOTREF(__pyx_t_5);
9159  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9160 
9161  /* "dbocean.pyx":218
9162  * fmf = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
9163  * sse = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
9164  * self.ds = xr.Dataset({'rfl': rfl, 'lat': lat, 'lon': lon, # <<<<<<<<<<<<<<
9165  * 'sza': sza, 'vza': vza, 'raa': raa,
9166  * 'wnd': wnd, 'chl': chl, 'aot': aot,
9167  */
9168  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ds, __pyx_t_5) < 0) __PYX_ERR(0, 218, __pyx_L3_error)
9169  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9170 
9171  /* "dbocean.pyx":206
9172  * self.ydim = ydim
9173  * self.xdim = xdim
9174  * try: # <<<<<<<<<<<<<<
9175  * rfl = xr.DataArray(np.zeros((NWL,ydim,xdim)),dims=('wl','y', 'x'))
9176  * lat = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
9177  */
9178  }
9179  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
9180  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
9181  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
9182  goto __pyx_L8_try_end;
9183  __pyx_L3_error:;
9184  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
9185  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
9186  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
9187  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
9188  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
9189 
9190  /* "dbocean.pyx":222
9191  * 'wnd': wnd, 'chl': chl, 'aot': aot,
9192  * 'fmf': fmf, 'sse': sse, })
9193  * except Exception as inst: # <<<<<<<<<<<<<<
9194  * print(type(inst))
9195  * print(inst)
9196  */
9197  __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
9198  if (__pyx_t_9) {
9199  __Pyx_AddTraceback("dbocean.output.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9200  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 222, __pyx_L5_except_error)
9201  __Pyx_GOTREF(__pyx_t_5);
9202  __Pyx_GOTREF(__pyx_t_4);
9203  __Pyx_GOTREF(__pyx_t_7);
9204  __Pyx_INCREF(__pyx_t_4);
9205  __pyx_v_inst = __pyx_t_4;
9206  /*try:*/ {
9207 
9208  /* "dbocean.pyx":223
9209  * 'fmf': fmf, 'sse': sse, })
9210  * except Exception as inst:
9211  * print(type(inst)) # <<<<<<<<<<<<<<
9212  * print(inst)
9213  * print ("Unable to initialize output file ... exiting")
9214  */
9215  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, ((PyObject *)Py_TYPE(__pyx_v_inst))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 223, __pyx_L14_error)
9216  __Pyx_GOTREF(__pyx_t_8);
9217  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9218 
9219  /* "dbocean.pyx":224
9220  * except Exception as inst:
9221  * print(type(inst))
9222  * print(inst) # <<<<<<<<<<<<<<
9223  * print ("Unable to initialize output file ... exiting")
9224  * sys.exit()
9225  */
9226  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v_inst); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 224, __pyx_L14_error)
9227  __Pyx_GOTREF(__pyx_t_8);
9228  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9229 
9230  /* "dbocean.pyx":225
9231  * print(type(inst))
9232  * print(inst)
9233  * print ("Unable to initialize output file ... exiting") # <<<<<<<<<<<<<<
9234  * sys.exit()
9235  *
9236  */
9237  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 225, __pyx_L14_error)
9238  __Pyx_GOTREF(__pyx_t_8);
9239  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9240 
9241  /* "dbocean.pyx":226
9242  * print(inst)
9243  * print ("Unable to initialize output file ... exiting")
9244  * sys.exit() # <<<<<<<<<<<<<<
9245  *
9246  * def write(self):
9247  */
9248  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 226, __pyx_L14_error)
9249  __Pyx_GOTREF(__pyx_t_6);
9250  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_exit); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 226, __pyx_L14_error)
9251  __Pyx_GOTREF(__pyx_t_10);
9252  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9253  __pyx_t_6 = NULL;
9254  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
9255  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
9256  if (likely(__pyx_t_6)) {
9257  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
9258  __Pyx_INCREF(__pyx_t_6);
9259  __Pyx_INCREF(function);
9260  __Pyx_DECREF_SET(__pyx_t_10, function);
9261  }
9262  }
9263  __pyx_t_8 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_10);
9264  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
9265  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 226, __pyx_L14_error)
9266  __Pyx_GOTREF(__pyx_t_8);
9267  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9268  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9269  }
9270 
9271  /* "dbocean.pyx":222
9272  * 'wnd': wnd, 'chl': chl, 'aot': aot,
9273  * 'fmf': fmf, 'sse': sse, })
9274  * except Exception as inst: # <<<<<<<<<<<<<<
9275  * print(type(inst))
9276  * print(inst)
9277  */
9278  /*finally:*/ {
9279  /*normal exit:*/{
9280  __Pyx_DECREF(__pyx_v_inst);
9281  __pyx_v_inst = NULL;
9282  goto __pyx_L15;
9283  }
9284  __pyx_L14_error:;
9285  /*exception exit:*/{
9286  __Pyx_PyThreadState_declare
9287  __Pyx_PyThreadState_assign
9288  __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
9289  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
9290  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
9291  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
9292  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
9293  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);
9294  __Pyx_XGOTREF(__pyx_t_13);
9295  __Pyx_XGOTREF(__pyx_t_14);
9296  __Pyx_XGOTREF(__pyx_t_15);
9297  __Pyx_XGOTREF(__pyx_t_16);
9298  __Pyx_XGOTREF(__pyx_t_17);
9299  __Pyx_XGOTREF(__pyx_t_18);
9300  __pyx_t_9 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
9301  {
9302  __Pyx_DECREF(__pyx_v_inst);
9303  __pyx_v_inst = NULL;
9304  }
9305  if (PY_MAJOR_VERSION >= 3) {
9306  __Pyx_XGIVEREF(__pyx_t_16);
9307  __Pyx_XGIVEREF(__pyx_t_17);
9308  __Pyx_XGIVEREF(__pyx_t_18);
9309  __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
9310  }
9311  __Pyx_XGIVEREF(__pyx_t_13);
9312  __Pyx_XGIVEREF(__pyx_t_14);
9313  __Pyx_XGIVEREF(__pyx_t_15);
9314  __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
9315  __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
9316  __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
9317  goto __pyx_L5_except_error;
9318  }
9319  __pyx_L15:;
9320  }
9321  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
9322  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
9323  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
9324  goto __pyx_L4_exception_handled;
9325  }
9326  goto __pyx_L5_except_error;
9327  __pyx_L5_except_error:;
9328 
9329  /* "dbocean.pyx":206
9330  * self.ydim = ydim
9331  * self.xdim = xdim
9332  * try: # <<<<<<<<<<<<<<
9333  * rfl = xr.DataArray(np.zeros((NWL,ydim,xdim)),dims=('wl','y', 'x'))
9334  * lat = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
9335  */
9336  __Pyx_XGIVEREF(__pyx_t_1);
9337  __Pyx_XGIVEREF(__pyx_t_2);
9338  __Pyx_XGIVEREF(__pyx_t_3);
9339  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
9340  goto __pyx_L1_error;
9341  __pyx_L4_exception_handled:;
9342  __Pyx_XGIVEREF(__pyx_t_1);
9343  __Pyx_XGIVEREF(__pyx_t_2);
9344  __Pyx_XGIVEREF(__pyx_t_3);
9345  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
9346  __pyx_L8_try_end:;
9347  }
9348 
9349  /* "dbocean.pyx":202
9350  * class output(object):
9351  *
9352  * def __init__(self, out_filepath, ydim, xdim): # <<<<<<<<<<<<<<
9353  * self.ofile = out_filepath
9354  * self.ydim = ydim
9355  */
9356 
9357  /* function exit code */
9358  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9359  goto __pyx_L0;
9360  __pyx_L1_error:;
9361  __Pyx_XDECREF(__pyx_t_4);
9362  __Pyx_XDECREF(__pyx_t_5);
9363  __Pyx_XDECREF(__pyx_t_6);
9364  __Pyx_XDECREF(__pyx_t_7);
9365  __Pyx_XDECREF(__pyx_t_8);
9366  __Pyx_XDECREF(__pyx_t_10);
9367  __Pyx_AddTraceback("dbocean.output.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9368  __pyx_r = NULL;
9369  __pyx_L0:;
9370  __Pyx_XDECREF(__pyx_v_rfl);
9371  __Pyx_XDECREF(__pyx_v_lat);
9372  __Pyx_XDECREF(__pyx_v_lon);
9373  __Pyx_XDECREF(__pyx_v_sza);
9374  __Pyx_XDECREF(__pyx_v_vza);
9375  __Pyx_XDECREF(__pyx_v_raa);
9376  __Pyx_XDECREF(__pyx_v_wnd);
9377  __Pyx_XDECREF(__pyx_v_chl);
9378  __Pyx_XDECREF(__pyx_v_aot);
9379  __Pyx_XDECREF(__pyx_v_fmf);
9380  __Pyx_XDECREF(__pyx_v_sse);
9381  __Pyx_XDECREF(__pyx_v_inst);
9382  __Pyx_XGIVEREF(__pyx_r);
9383  __Pyx_RefNannyFinishContext();
9384  return __pyx_r;
9385 }
9386 
9387 /* "dbocean.pyx":228
9388  * sys.exit()
9389  *
9390  * def write(self): # <<<<<<<<<<<<<<
9391  * print ("Writing to file: " + self.ofile)
9392  * self.ds.to_netcdf(self.ofile)
9393  */
9394 
9395 /* Python wrapper */
9396 static PyObject *__pyx_pw_7dbocean_6output_3write(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
9397 static PyMethodDef __pyx_mdef_7dbocean_6output_3write = {"write", (PyCFunction)__pyx_pw_7dbocean_6output_3write, METH_O, 0};
9398 static PyObject *__pyx_pw_7dbocean_6output_3write(PyObject *__pyx_self, PyObject *__pyx_v_self) {
9399  PyObject *__pyx_r = 0;
9400  __Pyx_RefNannyDeclarations
9401  __Pyx_RefNannySetupContext("write (wrapper)", 0);
9402  __pyx_r = __pyx_pf_7dbocean_6output_2write(__pyx_self, ((PyObject *)__pyx_v_self));
9403 
9404  /* function exit code */
9405  __Pyx_RefNannyFinishContext();
9406  return __pyx_r;
9407 }
9408 
9409 static PyObject *__pyx_pf_7dbocean_6output_2write(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
9410  PyObject *__pyx_r = NULL;
9411  __Pyx_RefNannyDeclarations
9412  PyObject *__pyx_t_1 = NULL;
9413  PyObject *__pyx_t_2 = NULL;
9414  PyObject *__pyx_t_3 = NULL;
9415  PyObject *__pyx_t_4 = NULL;
9416  int __pyx_lineno = 0;
9417  const char *__pyx_filename = NULL;
9418  int __pyx_clineno = 0;
9419  __Pyx_RefNannySetupContext("write", 0);
9420 
9421  /* "dbocean.pyx":229
9422  *
9423  * def write(self):
9424  * print ("Writing to file: " + self.ofile) # <<<<<<<<<<<<<<
9425  * self.ds.to_netcdf(self.ofile)
9426  *
9427  */
9428  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ofile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
9429  __Pyx_GOTREF(__pyx_t_1);
9430  __pyx_t_2 = PyNumber_Add(__pyx_kp_u_Writing_to_file, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error)
9431  __Pyx_GOTREF(__pyx_t_2);
9432  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9433  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
9434  __Pyx_GOTREF(__pyx_t_1);
9435  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9436  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9437 
9438  /* "dbocean.pyx":230
9439  * def write(self):
9440  * print ("Writing to file: " + self.ofile)
9441  * self.ds.to_netcdf(self.ofile) # <<<<<<<<<<<<<<
9442  *
9443  * def main():
9444  */
9445  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 230, __pyx_L1_error)
9446  __Pyx_GOTREF(__pyx_t_2);
9447  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_to_netcdf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 230, __pyx_L1_error)
9448  __Pyx_GOTREF(__pyx_t_3);
9449  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9450  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ofile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 230, __pyx_L1_error)
9451  __Pyx_GOTREF(__pyx_t_2);
9452  __pyx_t_4 = NULL;
9453  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
9454  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
9455  if (likely(__pyx_t_4)) {
9456  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
9457  __Pyx_INCREF(__pyx_t_4);
9458  __Pyx_INCREF(function);
9459  __Pyx_DECREF_SET(__pyx_t_3, function);
9460  }
9461  }
9462  __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);
9463  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
9464  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9465  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
9466  __Pyx_GOTREF(__pyx_t_1);
9467  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9468  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9469 
9470  /* "dbocean.pyx":228
9471  * sys.exit()
9472  *
9473  * def write(self): # <<<<<<<<<<<<<<
9474  * print ("Writing to file: " + self.ofile)
9475  * self.ds.to_netcdf(self.ofile)
9476  */
9477 
9478  /* function exit code */
9479  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9480  goto __pyx_L0;
9481  __pyx_L1_error:;
9482  __Pyx_XDECREF(__pyx_t_1);
9483  __Pyx_XDECREF(__pyx_t_2);
9484  __Pyx_XDECREF(__pyx_t_3);
9485  __Pyx_XDECREF(__pyx_t_4);
9486  __Pyx_AddTraceback("dbocean.output.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
9487  __pyx_r = NULL;
9488  __pyx_L0:;
9489  __Pyx_XGIVEREF(__pyx_r);
9490  __Pyx_RefNannyFinishContext();
9491  return __pyx_r;
9492 }
9493 
9494 /* "dbocean.pyx":232
9495  * self.ds.to_netcdf(self.ofile)
9496  *
9497  * def main(): # <<<<<<<<<<<<<<
9498  *
9499  * parser = argparse.ArgumentParser()
9500  */
9501 
9502 /* Python wrapper */
9503 static PyObject *__pyx_pw_7dbocean_1main(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9504 static PyMethodDef __pyx_mdef_7dbocean_1main = {"main", (PyCFunction)__pyx_pw_7dbocean_1main, METH_NOARGS, 0};
9505 static PyObject *__pyx_pw_7dbocean_1main(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
9506  PyObject *__pyx_r = 0;
9507  __Pyx_RefNannyDeclarations
9508  __Pyx_RefNannySetupContext("main (wrapper)", 0);
9509  __pyx_r = __pyx_pf_7dbocean_main(__pyx_self);
9510 
9511  /* function exit code */
9512  __Pyx_RefNannyFinishContext();
9513  return __pyx_r;
9514 }
9515 
9516 static PyObject *__pyx_pf_7dbocean_main(CYTHON_UNUSED PyObject *__pyx_self) {
9517  PyObject *__pyx_v_parser = NULL;
9518  PyObject *__pyx_v_args = NULL;
9519  PyObject *__pyx_v_vin = NULL;
9520  PyObject *__pyx_v_dimx = NULL;
9521  PyObject *__pyx_v_dimy = NULL;
9522  PyObject *__pyx_v_vout = NULL;
9523  PyObject *__pyx_v_dbo = NULL;
9524  PyObject *__pyx_v_iy = NULL;
9525  PyObject *__pyx_v_tic = NULL;
9526  PyObject *__pyx_v_ix = NULL;
9527  PyObject *__pyx_v_fmf = NULL;
9528  PyObject *__pyx_v_aot = NULL;
9529  PyObject *__pyx_v_chl = NULL;
9530  PyObject *__pyx_v_wnd = NULL;
9531  PyObject *__pyx_v_sse = NULL;
9532  PyObject *__pyx_v_inst = NULL;
9533  PyObject *__pyx_v_toc = NULL;
9534  PyObject *__pyx_v_tpp = NULL;
9535  PyObject *__pyx_r = NULL;
9536  __Pyx_RefNannyDeclarations
9537  PyObject *__pyx_t_1 = NULL;
9538  PyObject *__pyx_t_2 = NULL;
9539  PyObject *__pyx_t_3 = NULL;
9540  PyObject *__pyx_t_4 = NULL;
9541  PyObject *__pyx_t_5 = NULL;
9542  int __pyx_t_6;
9543  int __pyx_t_7;
9544  PyObject *__pyx_t_8 = NULL;
9545  Py_ssize_t __pyx_t_9;
9546  PyObject *(*__pyx_t_10)(PyObject *);
9547  Py_ssize_t __pyx_t_11;
9548  PyObject *(*__pyx_t_12)(PyObject *);
9549  int __pyx_t_13;
9550  PyObject *__pyx_t_14 = NULL;
9551  PyObject *__pyx_t_15 = NULL;
9552  PyObject *__pyx_t_16 = NULL;
9553  PyObject *__pyx_t_17 = NULL;
9554  PyObject *__pyx_t_18 = NULL;
9555  PyObject *__pyx_t_19 = NULL;
9556  PyObject *__pyx_t_20 = NULL;
9557  PyObject *__pyx_t_21 = NULL;
9558  PyObject *__pyx_t_22 = NULL;
9559  PyObject *(*__pyx_t_23)(PyObject *);
9560  int __pyx_t_24;
9561  char const *__pyx_t_25;
9562  PyObject *__pyx_t_26 = NULL;
9563  PyObject *__pyx_t_27 = NULL;
9564  PyObject *__pyx_t_28 = NULL;
9565  PyObject *__pyx_t_29 = NULL;
9566  PyObject *__pyx_t_30 = NULL;
9567  PyObject *__pyx_t_31 = NULL;
9568  int __pyx_lineno = 0;
9569  const char *__pyx_filename = NULL;
9570  int __pyx_clineno = 0;
9571  __Pyx_RefNannySetupContext("main", 0);
9572 
9573  /* "dbocean.pyx":234
9574  * def main():
9575  *
9576  * parser = argparse.ArgumentParser() # <<<<<<<<<<<<<<
9577  * parser.add_argument("-if", "--ifile", type=argparse.FileType('r'),
9578  * help="input file", required=True)
9579  */
9580  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_argparse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
9581  __Pyx_GOTREF(__pyx_t_2);
9582  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ArgumentParser); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error)
9583  __Pyx_GOTREF(__pyx_t_3);
9584  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9585  __pyx_t_2 = NULL;
9586  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
9587  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
9588  if (likely(__pyx_t_2)) {
9589  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
9590  __Pyx_INCREF(__pyx_t_2);
9591  __Pyx_INCREF(function);
9592  __Pyx_DECREF_SET(__pyx_t_3, function);
9593  }
9594  }
9595  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
9596  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
9597  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
9598  __Pyx_GOTREF(__pyx_t_1);
9599  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9600  __pyx_v_parser = __pyx_t_1;
9601  __pyx_t_1 = 0;
9602 
9603  /* "dbocean.pyx":235
9604  *
9605  * parser = argparse.ArgumentParser()
9606  * parser.add_argument("-if", "--ifile", type=argparse.FileType('r'), # <<<<<<<<<<<<<<
9607  * help="input file", required=True)
9608  * parser.add_argument("-of", "--ofile", type=argparse.FileType('w'),
9609  */
9610  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_add_argument); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)
9611  __Pyx_GOTREF(__pyx_t_1);
9612  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error)
9613  __Pyx_GOTREF(__pyx_t_3);
9614  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_argparse); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 235, __pyx_L1_error)
9615  __Pyx_GOTREF(__pyx_t_4);
9616  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_FileType); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 235, __pyx_L1_error)
9617  __Pyx_GOTREF(__pyx_t_5);
9618  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9619  __pyx_t_4 = NULL;
9620  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
9621  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
9622  if (likely(__pyx_t_4)) {
9623  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
9624  __Pyx_INCREF(__pyx_t_4);
9625  __Pyx_INCREF(function);
9626  __Pyx_DECREF_SET(__pyx_t_5, function);
9627  }
9628  }
9629  __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);
9630  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
9631  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error)
9632  __Pyx_GOTREF(__pyx_t_2);
9633  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9634  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_t_2) < 0) __PYX_ERR(0, 235, __pyx_L1_error)
9635  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9636  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_help, __pyx_kp_u_input_file) < 0) __PYX_ERR(0, 235, __pyx_L1_error)
9637 
9638  /* "dbocean.pyx":236
9639  * parser = argparse.ArgumentParser()
9640  * parser.add_argument("-if", "--ifile", type=argparse.FileType('r'),
9641  * help="input file", required=True) # <<<<<<<<<<<<<<
9642  * parser.add_argument("-of", "--ofile", type=argparse.FileType('w'),
9643  * help="output file", required=False)
9644  */
9645  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_required, Py_True) < 0) __PYX_ERR(0, 235, __pyx_L1_error)
9646 
9647  /* "dbocean.pyx":235
9648  *
9649  * parser = argparse.ArgumentParser()
9650  * parser.add_argument("-if", "--ifile", type=argparse.FileType('r'), # <<<<<<<<<<<<<<
9651  * help="input file", required=True)
9652  * parser.add_argument("-of", "--ofile", type=argparse.FileType('w'),
9653  */
9654  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__17, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error)
9655  __Pyx_GOTREF(__pyx_t_2);
9656  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9657  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9658  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9659 
9660  /* "dbocean.pyx":237
9661  * parser.add_argument("-if", "--ifile", type=argparse.FileType('r'),
9662  * help="input file", required=True)
9663  * parser.add_argument("-of", "--ofile", type=argparse.FileType('w'), # <<<<<<<<<<<<<<
9664  * help="output file", required=False)
9665  * parser.add_argument("-lf", "--lut", type=argparse.FileType('r'),
9666  */
9667  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_add_argument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error)
9668  __Pyx_GOTREF(__pyx_t_2);
9669  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 237, __pyx_L1_error)
9670  __Pyx_GOTREF(__pyx_t_3);
9671  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_argparse); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 237, __pyx_L1_error)
9672  __Pyx_GOTREF(__pyx_t_5);
9673  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_FileType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 237, __pyx_L1_error)
9674  __Pyx_GOTREF(__pyx_t_4);
9675  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9676  __pyx_t_5 = NULL;
9677  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
9678  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
9679  if (likely(__pyx_t_5)) {
9680  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
9681  __Pyx_INCREF(__pyx_t_5);
9682  __Pyx_INCREF(function);
9683  __Pyx_DECREF_SET(__pyx_t_4, function);
9684  }
9685  }
9686  __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);
9687  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
9688  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
9689  __Pyx_GOTREF(__pyx_t_1);
9690  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9691  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_t_1) < 0) __PYX_ERR(0, 237, __pyx_L1_error)
9692  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9693  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_help, __pyx_kp_u_output_file) < 0) __PYX_ERR(0, 237, __pyx_L1_error)
9694 
9695  /* "dbocean.pyx":238
9696  * help="input file", required=True)
9697  * parser.add_argument("-of", "--ofile", type=argparse.FileType('w'),
9698  * help="output file", required=False) # <<<<<<<<<<<<<<
9699  * parser.add_argument("-lf", "--lut", type=argparse.FileType('r'),
9700  * help="lookup table file", required=True)
9701  */
9702  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 237, __pyx_L1_error)
9703 
9704  /* "dbocean.pyx":237
9705  * parser.add_argument("-if", "--ifile", type=argparse.FileType('r'),
9706  * help="input file", required=True)
9707  * parser.add_argument("-of", "--ofile", type=argparse.FileType('w'), # <<<<<<<<<<<<<<
9708  * help="output file", required=False)
9709  * parser.add_argument("-lf", "--lut", type=argparse.FileType('r'),
9710  */
9711  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__18, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
9712  __Pyx_GOTREF(__pyx_t_1);
9713  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9714  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9715  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9716 
9717  /* "dbocean.pyx":239
9718  * parser.add_argument("-of", "--ofile", type=argparse.FileType('w'),
9719  * help="output file", required=False)
9720  * parser.add_argument("-lf", "--lut", type=argparse.FileType('r'), # <<<<<<<<<<<<<<
9721  * help="lookup table file", required=True)
9722  * parser.add_argument("-pf", "--plot", type=bool, default=False,
9723  */
9724  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_add_argument); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
9725  __Pyx_GOTREF(__pyx_t_1);
9726  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 239, __pyx_L1_error)
9727  __Pyx_GOTREF(__pyx_t_3);
9728  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_argparse); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 239, __pyx_L1_error)
9729  __Pyx_GOTREF(__pyx_t_4);
9730  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_FileType); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 239, __pyx_L1_error)
9731  __Pyx_GOTREF(__pyx_t_5);
9732  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9733  __pyx_t_4 = NULL;
9734  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
9735  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
9736  if (likely(__pyx_t_4)) {
9737  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
9738  __Pyx_INCREF(__pyx_t_4);
9739  __Pyx_INCREF(function);
9740  __Pyx_DECREF_SET(__pyx_t_5, function);
9741  }
9742  }
9743  __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);
9744  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
9745  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error)
9746  __Pyx_GOTREF(__pyx_t_2);
9747  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9748  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_t_2) < 0) __PYX_ERR(0, 239, __pyx_L1_error)
9749  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9750  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_help, __pyx_kp_u_lookup_table_file) < 0) __PYX_ERR(0, 239, __pyx_L1_error)
9751 
9752  /* "dbocean.pyx":240
9753  * help="output file", required=False)
9754  * parser.add_argument("-lf", "--lut", type=argparse.FileType('r'),
9755  * help="lookup table file", required=True) # <<<<<<<<<<<<<<
9756  * parser.add_argument("-pf", "--plot", type=bool, default=False,
9757  * help="plot pixel data", required=False)
9758  */
9759  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_required, Py_True) < 0) __PYX_ERR(0, 239, __pyx_L1_error)
9760 
9761  /* "dbocean.pyx":239
9762  * parser.add_argument("-of", "--ofile", type=argparse.FileType('w'),
9763  * help="output file", required=False)
9764  * parser.add_argument("-lf", "--lut", type=argparse.FileType('r'), # <<<<<<<<<<<<<<
9765  * help="lookup table file", required=True)
9766  * parser.add_argument("-pf", "--plot", type=bool, default=False,
9767  */
9768  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__19, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error)
9769  __Pyx_GOTREF(__pyx_t_2);
9770  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9771  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9772  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9773 
9774  /* "dbocean.pyx":241
9775  * parser.add_argument("-lf", "--lut", type=argparse.FileType('r'),
9776  * help="lookup table file", required=True)
9777  * parser.add_argument("-pf", "--plot", type=bool, default=False, # <<<<<<<<<<<<<<
9778  * help="plot pixel data", required=False)
9779  * parser.add_argument("-mf", "--mode", type=int, default=0,
9780  */
9781  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_add_argument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 241, __pyx_L1_error)
9782  __Pyx_GOTREF(__pyx_t_2);
9783  __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error)
9784  __Pyx_GOTREF(__pyx_t_3);
9785  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, ((PyObject*)&PyBool_Type)) < 0) __PYX_ERR(0, 241, __pyx_L1_error)
9786  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_default, Py_False) < 0) __PYX_ERR(0, 241, __pyx_L1_error)
9787  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_help, __pyx_kp_u_plot_pixel_data) < 0) __PYX_ERR(0, 241, __pyx_L1_error)
9788 
9789  /* "dbocean.pyx":242
9790  * help="lookup table file", required=True)
9791  * parser.add_argument("-pf", "--plot", type=bool, default=False,
9792  * help="plot pixel data", required=False) # <<<<<<<<<<<<<<
9793  * parser.add_argument("-mf", "--mode", type=int, default=0,
9794  * help="mode option", required=False)
9795  */
9796  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 241, __pyx_L1_error)
9797 
9798  /* "dbocean.pyx":241
9799  * parser.add_argument("-lf", "--lut", type=argparse.FileType('r'),
9800  * help="lookup table file", required=True)
9801  * parser.add_argument("-pf", "--plot", type=bool, default=False, # <<<<<<<<<<<<<<
9802  * help="plot pixel data", required=False)
9803  * parser.add_argument("-mf", "--mode", type=int, default=0,
9804  */
9805  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__20, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error)
9806  __Pyx_GOTREF(__pyx_t_1);
9807  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9808  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9809  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9810 
9811  /* "dbocean.pyx":243
9812  * parser.add_argument("-pf", "--plot", type=bool, default=False,
9813  * help="plot pixel data", required=False)
9814  * parser.add_argument("-mf", "--mode", type=int, default=0, # <<<<<<<<<<<<<<
9815  * help="mode option", required=False)
9816  * parser.add_argument("y", type=int, help="start line")
9817  */
9818  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_add_argument); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error)
9819  __Pyx_GOTREF(__pyx_t_1);
9820  __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error)
9821  __Pyx_GOTREF(__pyx_t_3);
9822  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
9823  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_default, __pyx_int_0) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
9824  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_help, __pyx_kp_u_mode_option) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
9825 
9826  /* "dbocean.pyx":244
9827  * help="plot pixel data", required=False)
9828  * parser.add_argument("-mf", "--mode", type=int, default=0,
9829  * help="mode option", required=False) # <<<<<<<<<<<<<<
9830  * parser.add_argument("y", type=int, help="start line")
9831  * parser.add_argument("x", type=int, help="start pixel")
9832  */
9833  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
9834 
9835  /* "dbocean.pyx":243
9836  * parser.add_argument("-pf", "--plot", type=bool, default=False,
9837  * help="plot pixel data", required=False)
9838  * parser.add_argument("-mf", "--mode", type=int, default=0, # <<<<<<<<<<<<<<
9839  * help="mode option", required=False)
9840  * parser.add_argument("y", type=int, help="start line")
9841  */
9842  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__21, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __pyx_L1_error)
9843  __Pyx_GOTREF(__pyx_t_2);
9844  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9845  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9846  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9847 
9848  /* "dbocean.pyx":245
9849  * parser.add_argument("-mf", "--mode", type=int, default=0,
9850  * help="mode option", required=False)
9851  * parser.add_argument("y", type=int, help="start line") # <<<<<<<<<<<<<<
9852  * parser.add_argument("x", type=int, help="start pixel")
9853  * parser.add_argument("z", type=int, help="square side ")
9854  */
9855  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_add_argument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error)
9856  __Pyx_GOTREF(__pyx_t_2);
9857  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 245, __pyx_L1_error)
9858  __Pyx_GOTREF(__pyx_t_3);
9859  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 245, __pyx_L1_error)
9860  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_help, __pyx_kp_u_start_line) < 0) __PYX_ERR(0, 245, __pyx_L1_error)
9861  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__22, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
9862  __Pyx_GOTREF(__pyx_t_1);
9863  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9864  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9865  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9866 
9867  /* "dbocean.pyx":246
9868  * help="mode option", required=False)
9869  * parser.add_argument("y", type=int, help="start line")
9870  * parser.add_argument("x", type=int, help="start pixel") # <<<<<<<<<<<<<<
9871  * parser.add_argument("z", type=int, help="square side ")
9872  *
9873  */
9874  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_add_argument); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error)
9875  __Pyx_GOTREF(__pyx_t_1);
9876  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 246, __pyx_L1_error)
9877  __Pyx_GOTREF(__pyx_t_3);
9878  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 246, __pyx_L1_error)
9879  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_help, __pyx_kp_u_start_pixel) < 0) __PYX_ERR(0, 246, __pyx_L1_error)
9880  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__23, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error)
9881  __Pyx_GOTREF(__pyx_t_2);
9882  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9883  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9884  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9885 
9886  /* "dbocean.pyx":247
9887  * parser.add_argument("y", type=int, help="start line")
9888  * parser.add_argument("x", type=int, help="start pixel")
9889  * parser.add_argument("z", type=int, help="square side ") # <<<<<<<<<<<<<<
9890  *
9891  * args = parser.parse_args()
9892  */
9893  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_add_argument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error)
9894  __Pyx_GOTREF(__pyx_t_2);
9895  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 247, __pyx_L1_error)
9896  __Pyx_GOTREF(__pyx_t_3);
9897  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 247, __pyx_L1_error)
9898  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_help, __pyx_kp_u_square_side) < 0) __PYX_ERR(0, 247, __pyx_L1_error)
9899  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__24, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
9900  __Pyx_GOTREF(__pyx_t_1);
9901  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9902  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9903  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9904 
9905  /* "dbocean.pyx":249
9906  * parser.add_argument("z", type=int, help="square side ")
9907  *
9908  * args = parser.parse_args() # <<<<<<<<<<<<<<
9909  * vin = input(args.ifile.name)
9910  * dimx = dimy = args.z
9911  */
9912  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_parse_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error)
9913  __Pyx_GOTREF(__pyx_t_3);
9914  __pyx_t_2 = NULL;
9915  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
9916  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
9917  if (likely(__pyx_t_2)) {
9918  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
9919  __Pyx_INCREF(__pyx_t_2);
9920  __Pyx_INCREF(function);
9921  __Pyx_DECREF_SET(__pyx_t_3, function);
9922  }
9923  }
9924  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
9925  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
9926  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)
9927  __Pyx_GOTREF(__pyx_t_1);
9928  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9929  __pyx_v_args = __pyx_t_1;
9930  __pyx_t_1 = 0;
9931 
9932  /* "dbocean.pyx":250
9933  *
9934  * args = parser.parse_args()
9935  * vin = input(args.ifile.name) # <<<<<<<<<<<<<<
9936  * dimx = dimy = args.z
9937  * if (args.z <= 0):
9938  */
9939  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_input); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error)
9940  __Pyx_GOTREF(__pyx_t_3);
9941  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_ifile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __pyx_L1_error)
9942  __Pyx_GOTREF(__pyx_t_2);
9943  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 250, __pyx_L1_error)
9944  __Pyx_GOTREF(__pyx_t_5);
9945  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9946  __pyx_t_2 = NULL;
9947  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
9948  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
9949  if (likely(__pyx_t_2)) {
9950  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
9951  __Pyx_INCREF(__pyx_t_2);
9952  __Pyx_INCREF(function);
9953  __Pyx_DECREF_SET(__pyx_t_3, function);
9954  }
9955  }
9956  __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);
9957  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
9958  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9959  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error)
9960  __Pyx_GOTREF(__pyx_t_1);
9961  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9962  __pyx_v_vin = __pyx_t_1;
9963  __pyx_t_1 = 0;
9964 
9965  /* "dbocean.pyx":251
9966  * args = parser.parse_args()
9967  * vin = input(args.ifile.name)
9968  * dimx = dimy = args.z # <<<<<<<<<<<<<<
9969  * if (args.z <= 0):
9970  * args.y = args.x = 0
9971  */
9972  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error)
9973  __Pyx_GOTREF(__pyx_t_1);
9974  __Pyx_INCREF(__pyx_t_1);
9975  __pyx_v_dimx = __pyx_t_1;
9976  __Pyx_INCREF(__pyx_t_1);
9977  __pyx_v_dimy = __pyx_t_1;
9978  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9979 
9980  /* "dbocean.pyx":252
9981  * vin = input(args.ifile.name)
9982  * dimx = dimy = args.z
9983  * if (args.z <= 0): # <<<<<<<<<<<<<<
9984  * args.y = args.x = 0
9985  * dimy = vin.shape[0]
9986  */
9987  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error)
9988  __Pyx_GOTREF(__pyx_t_1);
9989  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __pyx_L1_error)
9990  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9991  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 252, __pyx_L1_error)
9992  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9993  if (__pyx_t_6) {
9994 
9995  /* "dbocean.pyx":253
9996  * dimx = dimy = args.z
9997  * if (args.z <= 0):
9998  * args.y = args.x = 0 # <<<<<<<<<<<<<<
9999  * dimy = vin.shape[0]
10000  * dimx = vin.shape[1]
10001  */
10002  if (__Pyx_PyObject_SetAttrStr(__pyx_v_args, __pyx_n_s_y, __pyx_int_0) < 0) __PYX_ERR(0, 253, __pyx_L1_error)
10003  if (__Pyx_PyObject_SetAttrStr(__pyx_v_args, __pyx_n_s_x, __pyx_int_0) < 0) __PYX_ERR(0, 253, __pyx_L1_error)
10004 
10005  /* "dbocean.pyx":254
10006  * if (args.z <= 0):
10007  * args.y = args.x = 0
10008  * dimy = vin.shape[0] # <<<<<<<<<<<<<<
10009  * dimx = vin.shape[1]
10010  *
10011  */
10012  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 254, __pyx_L1_error)
10013  __Pyx_GOTREF(__pyx_t_3);
10014  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
10015  __Pyx_GOTREF(__pyx_t_1);
10016  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10017  __Pyx_DECREF_SET(__pyx_v_dimy, __pyx_t_1);
10018  __pyx_t_1 = 0;
10019 
10020  /* "dbocean.pyx":255
10021  * args.y = args.x = 0
10022  * dimy = vin.shape[0]
10023  * dimx = vin.shape[1] # <<<<<<<<<<<<<<
10024  *
10025  * vout = output(args.ofile.name, dimy, dimx)
10026  */
10027  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L1_error)
10028  __Pyx_GOTREF(__pyx_t_1);
10029  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 255, __pyx_L1_error)
10030  __Pyx_GOTREF(__pyx_t_3);
10031  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10032  __Pyx_DECREF_SET(__pyx_v_dimx, __pyx_t_3);
10033  __pyx_t_3 = 0;
10034 
10035  /* "dbocean.pyx":252
10036  * vin = input(args.ifile.name)
10037  * dimx = dimy = args.z
10038  * if (args.z <= 0): # <<<<<<<<<<<<<<
10039  * args.y = args.x = 0
10040  * dimy = vin.shape[0]
10041  */
10042  }
10043 
10044  /* "dbocean.pyx":257
10045  * dimx = vin.shape[1]
10046  *
10047  * vout = output(args.ofile.name, dimy, dimx) # <<<<<<<<<<<<<<
10048  *
10049  * dbo = dbocean(args.lut.name, args.mode)
10050  */
10051  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_output); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error)
10052  __Pyx_GOTREF(__pyx_t_1);
10053  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_ofile); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 257, __pyx_L1_error)
10054  __Pyx_GOTREF(__pyx_t_5);
10055  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 257, __pyx_L1_error)
10056  __Pyx_GOTREF(__pyx_t_2);
10057  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10058  __pyx_t_5 = NULL;
10059  __pyx_t_7 = 0;
10060  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
10061  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
10062  if (likely(__pyx_t_5)) {
10063  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
10064  __Pyx_INCREF(__pyx_t_5);
10065  __Pyx_INCREF(function);
10066  __Pyx_DECREF_SET(__pyx_t_1, function);
10067  __pyx_t_7 = 1;
10068  }
10069  }
10070  #if CYTHON_FAST_PYCALL
10071  if (PyFunction_Check(__pyx_t_1)) {
10072  PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_2, __pyx_v_dimy, __pyx_v_dimx};
10073  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 257, __pyx_L1_error)
10074  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10075  __Pyx_GOTREF(__pyx_t_3);
10076  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10077  } else
10078  #endif
10079  #if CYTHON_FAST_PYCCALL
10080  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
10081  PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_2, __pyx_v_dimy, __pyx_v_dimx};
10082  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 257, __pyx_L1_error)
10083  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10084  __Pyx_GOTREF(__pyx_t_3);
10085  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10086  } else
10087  #endif
10088  {
10089  __pyx_t_4 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 257, __pyx_L1_error)
10090  __Pyx_GOTREF(__pyx_t_4);
10091  if (__pyx_t_5) {
10092  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
10093  }
10094  __Pyx_GIVEREF(__pyx_t_2);
10095  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_7, __pyx_t_2);
10096  __Pyx_INCREF(__pyx_v_dimy);
10097  __Pyx_GIVEREF(__pyx_v_dimy);
10098  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_v_dimy);
10099  __Pyx_INCREF(__pyx_v_dimx);
10100  __Pyx_GIVEREF(__pyx_v_dimx);
10101  PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_7, __pyx_v_dimx);
10102  __pyx_t_2 = 0;
10103  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 257, __pyx_L1_error)
10104  __Pyx_GOTREF(__pyx_t_3);
10105  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10106  }
10107  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10108  __pyx_v_vout = __pyx_t_3;
10109  __pyx_t_3 = 0;
10110 
10111  /* "dbocean.pyx":259
10112  * vout = output(args.ofile.name, dimy, dimx)
10113  *
10114  * dbo = dbocean(args.lut.name, args.mode) # <<<<<<<<<<<<<<
10115  *
10116  * print ("Processing mode {0}".format(args.mode))
10117  */
10118  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_dbocean); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
10119  __Pyx_GOTREF(__pyx_t_1);
10120  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_lut); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 259, __pyx_L1_error)
10121  __Pyx_GOTREF(__pyx_t_4);
10122  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error)
10123  __Pyx_GOTREF(__pyx_t_2);
10124  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10125  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_mode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 259, __pyx_L1_error)
10126  __Pyx_GOTREF(__pyx_t_4);
10127  __pyx_t_5 = NULL;
10128  __pyx_t_7 = 0;
10129  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
10130  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
10131  if (likely(__pyx_t_5)) {
10132  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
10133  __Pyx_INCREF(__pyx_t_5);
10134  __Pyx_INCREF(function);
10135  __Pyx_DECREF_SET(__pyx_t_1, function);
10136  __pyx_t_7 = 1;
10137  }
10138  }
10139  #if CYTHON_FAST_PYCALL
10140  if (PyFunction_Check(__pyx_t_1)) {
10141  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_2, __pyx_t_4};
10142  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 259, __pyx_L1_error)
10143  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10144  __Pyx_GOTREF(__pyx_t_3);
10145  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10146  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10147  } else
10148  #endif
10149  #if CYTHON_FAST_PYCCALL
10150  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
10151  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_2, __pyx_t_4};
10152  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 259, __pyx_L1_error)
10153  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10154  __Pyx_GOTREF(__pyx_t_3);
10155  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10156  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10157  } else
10158  #endif
10159  {
10160  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 259, __pyx_L1_error)
10161  __Pyx_GOTREF(__pyx_t_8);
10162  if (__pyx_t_5) {
10163  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
10164  }
10165  __Pyx_GIVEREF(__pyx_t_2);
10166  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_2);
10167  __Pyx_GIVEREF(__pyx_t_4);
10168  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
10169  __pyx_t_2 = 0;
10170  __pyx_t_4 = 0;
10171  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 259, __pyx_L1_error)
10172  __Pyx_GOTREF(__pyx_t_3);
10173  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10174  }
10175  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10176  __pyx_v_dbo = __pyx_t_3;
10177  __pyx_t_3 = 0;
10178 
10179  /* "dbocean.pyx":261
10180  * dbo = dbocean(args.lut.name, args.mode)
10181  *
10182  * print ("Processing mode {0}".format(args.mode)) # <<<<<<<<<<<<<<
10183  * for iy in range(args.y, args.y+dimy):
10184  * tic = time.perf_counter()
10185  */
10186  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Processing_mode_0, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error)
10187  __Pyx_GOTREF(__pyx_t_1);
10188  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_mode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 261, __pyx_L1_error)
10189  __Pyx_GOTREF(__pyx_t_8);
10190  __pyx_t_4 = NULL;
10191  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
10192  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
10193  if (likely(__pyx_t_4)) {
10194  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
10195  __Pyx_INCREF(__pyx_t_4);
10196  __Pyx_INCREF(function);
10197  __Pyx_DECREF_SET(__pyx_t_1, function);
10198  }
10199  }
10200  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8);
10201  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
10202  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10203  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 261, __pyx_L1_error)
10204  __Pyx_GOTREF(__pyx_t_3);
10205  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10206  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error)
10207  __Pyx_GOTREF(__pyx_t_1);
10208  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10209  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10210 
10211  /* "dbocean.pyx":262
10212  *
10213  * print ("Processing mode {0}".format(args.mode))
10214  * for iy in range(args.y, args.y+dimy): # <<<<<<<<<<<<<<
10215  * tic = time.perf_counter()
10216  * for ix in range(args.x, args.x+dimx):
10217  */
10218  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error)
10219  __Pyx_GOTREF(__pyx_t_1);
10220  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 262, __pyx_L1_error)
10221  __Pyx_GOTREF(__pyx_t_3);
10222  __pyx_t_8 = PyNumber_Add(__pyx_t_3, __pyx_v_dimy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 262, __pyx_L1_error)
10223  __Pyx_GOTREF(__pyx_t_8);
10224  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10225  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 262, __pyx_L1_error)
10226  __Pyx_GOTREF(__pyx_t_3);
10227  __Pyx_GIVEREF(__pyx_t_1);
10228  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
10229  __Pyx_GIVEREF(__pyx_t_8);
10230  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_8);
10231  __pyx_t_1 = 0;
10232  __pyx_t_8 = 0;
10233  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 262, __pyx_L1_error)
10234  __Pyx_GOTREF(__pyx_t_8);
10235  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10236  if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
10237  __pyx_t_3 = __pyx_t_8; __Pyx_INCREF(__pyx_t_3); __pyx_t_9 = 0;
10238  __pyx_t_10 = NULL;
10239  } else {
10240  __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 262, __pyx_L1_error)
10241  __Pyx_GOTREF(__pyx_t_3);
10242  __pyx_t_10 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 262, __pyx_L1_error)
10243  }
10244  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10245  for (;;) {
10246  if (likely(!__pyx_t_10)) {
10247  if (likely(PyList_CheckExact(__pyx_t_3))) {
10248  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_3)) break;
10249  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
10250  __pyx_t_8 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 262, __pyx_L1_error)
10251  #else
10252  __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 262, __pyx_L1_error)
10253  __Pyx_GOTREF(__pyx_t_8);
10254  #endif
10255  } else {
10256  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
10257  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
10258  __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 262, __pyx_L1_error)
10259  #else
10260  __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 262, __pyx_L1_error)
10261  __Pyx_GOTREF(__pyx_t_8);
10262  #endif
10263  }
10264  } else {
10265  __pyx_t_8 = __pyx_t_10(__pyx_t_3);
10266  if (unlikely(!__pyx_t_8)) {
10267  PyObject* exc_type = PyErr_Occurred();
10268  if (exc_type) {
10269  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
10270  else __PYX_ERR(0, 262, __pyx_L1_error)
10271  }
10272  break;
10273  }
10274  __Pyx_GOTREF(__pyx_t_8);
10275  }
10276  __Pyx_XDECREF_SET(__pyx_v_iy, __pyx_t_8);
10277  __pyx_t_8 = 0;
10278 
10279  /* "dbocean.pyx":263
10280  * print ("Processing mode {0}".format(args.mode))
10281  * for iy in range(args.y, args.y+dimy):
10282  * tic = time.perf_counter() # <<<<<<<<<<<<<<
10283  * for ix in range(args.x, args.x+dimx):
10284  *
10285  */
10286  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error)
10287  __Pyx_GOTREF(__pyx_t_1);
10288  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_perf_counter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 263, __pyx_L1_error)
10289  __Pyx_GOTREF(__pyx_t_4);
10290  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10291  __pyx_t_1 = NULL;
10292  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
10293  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
10294  if (likely(__pyx_t_1)) {
10295  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
10296  __Pyx_INCREF(__pyx_t_1);
10297  __Pyx_INCREF(function);
10298  __Pyx_DECREF_SET(__pyx_t_4, function);
10299  }
10300  }
10301  __pyx_t_8 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
10302  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
10303  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 263, __pyx_L1_error)
10304  __Pyx_GOTREF(__pyx_t_8);
10305  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10306  __Pyx_XDECREF_SET(__pyx_v_tic, __pyx_t_8);
10307  __pyx_t_8 = 0;
10308 
10309  /* "dbocean.pyx":264
10310  * for iy in range(args.y, args.y+dimy):
10311  * tic = time.perf_counter()
10312  * for ix in range(args.x, args.x+dimx): # <<<<<<<<<<<<<<
10313  *
10314  * if(vin.cld[iy,ix] or vin.chl[iy,ix]<-999):
10315  */
10316  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 264, __pyx_L1_error)
10317  __Pyx_GOTREF(__pyx_t_8);
10318  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 264, __pyx_L1_error)
10319  __Pyx_GOTREF(__pyx_t_4);
10320  __pyx_t_1 = PyNumber_Add(__pyx_t_4, __pyx_v_dimx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error)
10321  __Pyx_GOTREF(__pyx_t_1);
10322  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10323  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 264, __pyx_L1_error)
10324  __Pyx_GOTREF(__pyx_t_4);
10325  __Pyx_GIVEREF(__pyx_t_8);
10326  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8);
10327  __Pyx_GIVEREF(__pyx_t_1);
10328  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
10329  __pyx_t_8 = 0;
10330  __pyx_t_1 = 0;
10331  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error)
10332  __Pyx_GOTREF(__pyx_t_1);
10333  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10334  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
10335  __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_11 = 0;
10336  __pyx_t_12 = NULL;
10337  } else {
10338  __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 264, __pyx_L1_error)
10339  __Pyx_GOTREF(__pyx_t_4);
10340  __pyx_t_12 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 264, __pyx_L1_error)
10341  }
10342  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10343  for (;;) {
10344  if (likely(!__pyx_t_12)) {
10345  if (likely(PyList_CheckExact(__pyx_t_4))) {
10346  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_4)) break;
10347  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
10348  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_1); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 264, __pyx_L1_error)
10349  #else
10350  __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error)
10351  __Pyx_GOTREF(__pyx_t_1);
10352  #endif
10353  } else {
10354  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
10355  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
10356  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_1); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 264, __pyx_L1_error)
10357  #else
10358  __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error)
10359  __Pyx_GOTREF(__pyx_t_1);
10360  #endif
10361  }
10362  } else {
10363  __pyx_t_1 = __pyx_t_12(__pyx_t_4);
10364  if (unlikely(!__pyx_t_1)) {
10365  PyObject* exc_type = PyErr_Occurred();
10366  if (exc_type) {
10367  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
10368  else __PYX_ERR(0, 264, __pyx_L1_error)
10369  }
10370  break;
10371  }
10372  __Pyx_GOTREF(__pyx_t_1);
10373  }
10374  __Pyx_XDECREF_SET(__pyx_v_ix, __pyx_t_1);
10375  __pyx_t_1 = 0;
10376 
10377  /* "dbocean.pyx":266
10378  * for ix in range(args.x, args.x+dimx):
10379  *
10380  * if(vin.cld[iy,ix] or vin.chl[iy,ix]<-999): # <<<<<<<<<<<<<<
10381  * fmf,aot,chl,wnd,sse = -999.9, -999.9, -999.9, -999.9, -999.9
10382  * else:
10383  */
10384  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_cld); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error)
10385  __Pyx_GOTREF(__pyx_t_1);
10386  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 266, __pyx_L1_error)
10387  __Pyx_GOTREF(__pyx_t_8);
10388  __Pyx_INCREF(__pyx_v_iy);
10389  __Pyx_GIVEREF(__pyx_v_iy);
10390  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_iy);
10391  __Pyx_INCREF(__pyx_v_ix);
10392  __Pyx_GIVEREF(__pyx_v_ix);
10393  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ix);
10394  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error)
10395  __Pyx_GOTREF(__pyx_t_2);
10396  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10397  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10398  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 266, __pyx_L1_error)
10399  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10400  if (!__pyx_t_13) {
10401  } else {
10402  __pyx_t_6 = __pyx_t_13;
10403  goto __pyx_L9_bool_binop_done;
10404  }
10405  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_chl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error)
10406  __Pyx_GOTREF(__pyx_t_2);
10407  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 266, __pyx_L1_error)
10408  __Pyx_GOTREF(__pyx_t_8);
10409  __Pyx_INCREF(__pyx_v_iy);
10410  __Pyx_GIVEREF(__pyx_v_iy);
10411  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_iy);
10412  __Pyx_INCREF(__pyx_v_ix);
10413  __Pyx_GIVEREF(__pyx_v_ix);
10414  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ix);
10415  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error)
10416  __Pyx_GOTREF(__pyx_t_1);
10417  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10418  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10419  __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_int_neg_999, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 266, __pyx_L1_error)
10420  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10421  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 266, __pyx_L1_error)
10422  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10423  __pyx_t_6 = __pyx_t_13;
10424  __pyx_L9_bool_binop_done:;
10425  if (__pyx_t_6) {
10426 
10427  /* "dbocean.pyx":267
10428  *
10429  * if(vin.cld[iy,ix] or vin.chl[iy,ix]<-999):
10430  * fmf,aot,chl,wnd,sse = -999.9, -999.9, -999.9, -999.9, -999.9 # <<<<<<<<<<<<<<
10431  * else:
10432  * try:
10433  */
10434  __pyx_t_8 = __pyx_float_neg_999_9;
10435  __Pyx_INCREF(__pyx_t_8);
10436  __pyx_t_1 = __pyx_float_neg_999_9;
10437  __Pyx_INCREF(__pyx_t_1);
10438  __pyx_t_2 = __pyx_float_neg_999_9;
10439  __Pyx_INCREF(__pyx_t_2);
10440  __pyx_t_5 = __pyx_float_neg_999_9;
10441  __Pyx_INCREF(__pyx_t_5);
10442  __pyx_t_14 = __pyx_float_neg_999_9;
10443  __Pyx_INCREF(__pyx_t_14);
10444  __Pyx_XDECREF_SET(__pyx_v_fmf, __pyx_t_8);
10445  __pyx_t_8 = 0;
10446  __Pyx_XDECREF_SET(__pyx_v_aot, __pyx_t_1);
10447  __pyx_t_1 = 0;
10448  __Pyx_XDECREF_SET(__pyx_v_chl, __pyx_t_2);
10449  __pyx_t_2 = 0;
10450  __Pyx_XDECREF_SET(__pyx_v_wnd, __pyx_t_5);
10451  __pyx_t_5 = 0;
10452  __Pyx_XDECREF_SET(__pyx_v_sse, __pyx_t_14);
10453  __pyx_t_14 = 0;
10454 
10455  /* "dbocean.pyx":266
10456  * for ix in range(args.x, args.x+dimx):
10457  *
10458  * if(vin.cld[iy,ix] or vin.chl[iy,ix]<-999): # <<<<<<<<<<<<<<
10459  * fmf,aot,chl,wnd,sse = -999.9, -999.9, -999.9, -999.9, -999.9
10460  * else:
10461  */
10462  goto __pyx_L8;
10463  }
10464 
10465  /* "dbocean.pyx":269
10466  * fmf,aot,chl,wnd,sse = -999.9, -999.9, -999.9, -999.9, -999.9
10467  * else:
10468  * try: # <<<<<<<<<<<<<<
10469  * fmf,aot,chl,wnd,sse = dbo.process(vin.rfl[iy,ix],vin.sza[iy,ix],
10470  * vin.vza[iy,ix],vin.raa[iy,ix],
10471  */
10472  /*else*/ {
10473  {
10474  __Pyx_PyThreadState_declare
10475  __Pyx_PyThreadState_assign
10476  __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
10477  __Pyx_XGOTREF(__pyx_t_15);
10478  __Pyx_XGOTREF(__pyx_t_16);
10479  __Pyx_XGOTREF(__pyx_t_17);
10480  /*try:*/ {
10481 
10482  /* "dbocean.pyx":270
10483  * else:
10484  * try:
10485  * fmf,aot,chl,wnd,sse = dbo.process(vin.rfl[iy,ix],vin.sza[iy,ix], # <<<<<<<<<<<<<<
10486  * vin.vza[iy,ix],vin.raa[iy,ix],
10487  * vin.wnd[iy,ix],vin.chl[iy,ix])
10488  */
10489  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dbo, __pyx_n_s_process); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 270, __pyx_L11_error)
10490  __Pyx_GOTREF(__pyx_t_5);
10491  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_rfl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L11_error)
10492  __Pyx_GOTREF(__pyx_t_2);
10493  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L11_error)
10494  __Pyx_GOTREF(__pyx_t_1);
10495  __Pyx_INCREF(__pyx_v_iy);
10496  __Pyx_GIVEREF(__pyx_v_iy);
10497  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_iy);
10498  __Pyx_INCREF(__pyx_v_ix);
10499  __Pyx_GIVEREF(__pyx_v_ix);
10500  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ix);
10501  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 270, __pyx_L11_error)
10502  __Pyx_GOTREF(__pyx_t_8);
10503  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10504  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10505  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_sza); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L11_error)
10506  __Pyx_GOTREF(__pyx_t_1);
10507  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L11_error)
10508  __Pyx_GOTREF(__pyx_t_2);
10509  __Pyx_INCREF(__pyx_v_iy);
10510  __Pyx_GIVEREF(__pyx_v_iy);
10511  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_iy);
10512  __Pyx_INCREF(__pyx_v_ix);
10513  __Pyx_GIVEREF(__pyx_v_ix);
10514  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ix);
10515  __pyx_t_18 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 270, __pyx_L11_error)
10516  __Pyx_GOTREF(__pyx_t_18);
10517  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10518  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10519 
10520  /* "dbocean.pyx":271
10521  * try:
10522  * fmf,aot,chl,wnd,sse = dbo.process(vin.rfl[iy,ix],vin.sza[iy,ix],
10523  * vin.vza[iy,ix],vin.raa[iy,ix], # <<<<<<<<<<<<<<
10524  * vin.wnd[iy,ix],vin.chl[iy,ix])
10525  * except Exception as inst:
10526  */
10527  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_vza); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L11_error)
10528  __Pyx_GOTREF(__pyx_t_2);
10529  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L11_error)
10530  __Pyx_GOTREF(__pyx_t_1);
10531  __Pyx_INCREF(__pyx_v_iy);
10532  __Pyx_GIVEREF(__pyx_v_iy);
10533  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_iy);
10534  __Pyx_INCREF(__pyx_v_ix);
10535  __Pyx_GIVEREF(__pyx_v_ix);
10536  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ix);
10537  __pyx_t_19 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 271, __pyx_L11_error)
10538  __Pyx_GOTREF(__pyx_t_19);
10539  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10540  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10541  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_raa); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L11_error)
10542  __Pyx_GOTREF(__pyx_t_1);
10543  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L11_error)
10544  __Pyx_GOTREF(__pyx_t_2);
10545  __Pyx_INCREF(__pyx_v_iy);
10546  __Pyx_GIVEREF(__pyx_v_iy);
10547  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_iy);
10548  __Pyx_INCREF(__pyx_v_ix);
10549  __Pyx_GIVEREF(__pyx_v_ix);
10550  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ix);
10551  __pyx_t_20 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 271, __pyx_L11_error)
10552  __Pyx_GOTREF(__pyx_t_20);
10553  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10554  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10555 
10556  /* "dbocean.pyx":272
10557  * fmf,aot,chl,wnd,sse = dbo.process(vin.rfl[iy,ix],vin.sza[iy,ix],
10558  * vin.vza[iy,ix],vin.raa[iy,ix],
10559  * vin.wnd[iy,ix],vin.chl[iy,ix]) # <<<<<<<<<<<<<<
10560  * except Exception as inst:
10561  * print(type(inst))
10562  */
10563  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_wnd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 272, __pyx_L11_error)
10564  __Pyx_GOTREF(__pyx_t_2);
10565  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L11_error)
10566  __Pyx_GOTREF(__pyx_t_1);
10567  __Pyx_INCREF(__pyx_v_iy);
10568  __Pyx_GIVEREF(__pyx_v_iy);
10569  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_iy);
10570  __Pyx_INCREF(__pyx_v_ix);
10571  __Pyx_GIVEREF(__pyx_v_ix);
10572  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ix);
10573  __pyx_t_21 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 272, __pyx_L11_error)
10574  __Pyx_GOTREF(__pyx_t_21);
10575  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10576  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10577  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_chl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L11_error)
10578  __Pyx_GOTREF(__pyx_t_1);
10579  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 272, __pyx_L11_error)
10580  __Pyx_GOTREF(__pyx_t_2);
10581  __Pyx_INCREF(__pyx_v_iy);
10582  __Pyx_GIVEREF(__pyx_v_iy);
10583  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_iy);
10584  __Pyx_INCREF(__pyx_v_ix);
10585  __Pyx_GIVEREF(__pyx_v_ix);
10586  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ix);
10587  __pyx_t_22 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 272, __pyx_L11_error)
10588  __Pyx_GOTREF(__pyx_t_22);
10589  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10590  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10591  __pyx_t_2 = NULL;
10592  __pyx_t_7 = 0;
10593  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
10594  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
10595  if (likely(__pyx_t_2)) {
10596  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
10597  __Pyx_INCREF(__pyx_t_2);
10598  __Pyx_INCREF(function);
10599  __Pyx_DECREF_SET(__pyx_t_5, function);
10600  __pyx_t_7 = 1;
10601  }
10602  }
10603  #if CYTHON_FAST_PYCALL
10604  if (PyFunction_Check(__pyx_t_5)) {
10605  PyObject *__pyx_temp[7] = {__pyx_t_2, __pyx_t_8, __pyx_t_18, __pyx_t_19, __pyx_t_20, __pyx_t_21, __pyx_t_22};
10606  __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 270, __pyx_L11_error)
10607  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
10608  __Pyx_GOTREF(__pyx_t_14);
10609  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10610  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
10611  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
10612  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
10613  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
10614  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
10615  } else
10616  #endif
10617  #if CYTHON_FAST_PYCCALL
10618  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
10619  PyObject *__pyx_temp[7] = {__pyx_t_2, __pyx_t_8, __pyx_t_18, __pyx_t_19, __pyx_t_20, __pyx_t_21, __pyx_t_22};
10620  __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 270, __pyx_L11_error)
10621  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
10622  __Pyx_GOTREF(__pyx_t_14);
10623  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10624  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
10625  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
10626  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
10627  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
10628  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
10629  } else
10630  #endif
10631  {
10632  __pyx_t_1 = PyTuple_New(6+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L11_error)
10633  __Pyx_GOTREF(__pyx_t_1);
10634  if (__pyx_t_2) {
10635  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = NULL;
10636  }
10637  __Pyx_GIVEREF(__pyx_t_8);
10638  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_7, __pyx_t_8);
10639  __Pyx_GIVEREF(__pyx_t_18);
10640  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_7, __pyx_t_18);
10641  __Pyx_GIVEREF(__pyx_t_19);
10642  PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_7, __pyx_t_19);
10643  __Pyx_GIVEREF(__pyx_t_20);
10644  PyTuple_SET_ITEM(__pyx_t_1, 3+__pyx_t_7, __pyx_t_20);
10645  __Pyx_GIVEREF(__pyx_t_21);
10646  PyTuple_SET_ITEM(__pyx_t_1, 4+__pyx_t_7, __pyx_t_21);
10647  __Pyx_GIVEREF(__pyx_t_22);
10648  PyTuple_SET_ITEM(__pyx_t_1, 5+__pyx_t_7, __pyx_t_22);
10649  __pyx_t_8 = 0;
10650  __pyx_t_18 = 0;
10651  __pyx_t_19 = 0;
10652  __pyx_t_20 = 0;
10653  __pyx_t_21 = 0;
10654  __pyx_t_22 = 0;
10655  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 270, __pyx_L11_error)
10656  __Pyx_GOTREF(__pyx_t_14);
10657  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10658  }
10659  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10660  if ((likely(PyTuple_CheckExact(__pyx_t_14))) || (PyList_CheckExact(__pyx_t_14))) {
10661  PyObject* sequence = __pyx_t_14;
10662  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
10663  if (unlikely(size != 5)) {
10664  if (size > 5) __Pyx_RaiseTooManyValuesError(5);
10665  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
10666  __PYX_ERR(0, 270, __pyx_L11_error)
10667  }
10668  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
10669  if (likely(PyTuple_CheckExact(sequence))) {
10670  __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
10671  __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1);
10672  __pyx_t_22 = PyTuple_GET_ITEM(sequence, 2);
10673  __pyx_t_21 = PyTuple_GET_ITEM(sequence, 3);
10674  __pyx_t_20 = PyTuple_GET_ITEM(sequence, 4);
10675  } else {
10676  __pyx_t_5 = PyList_GET_ITEM(sequence, 0);
10677  __pyx_t_1 = PyList_GET_ITEM(sequence, 1);
10678  __pyx_t_22 = PyList_GET_ITEM(sequence, 2);
10679  __pyx_t_21 = PyList_GET_ITEM(sequence, 3);
10680  __pyx_t_20 = PyList_GET_ITEM(sequence, 4);
10681  }
10682  __Pyx_INCREF(__pyx_t_5);
10683  __Pyx_INCREF(__pyx_t_1);
10684  __Pyx_INCREF(__pyx_t_22);
10685  __Pyx_INCREF(__pyx_t_21);
10686  __Pyx_INCREF(__pyx_t_20);
10687  #else
10688  {
10689  Py_ssize_t i;
10690  PyObject** temps[5] = {&__pyx_t_5,&__pyx_t_1,&__pyx_t_22,&__pyx_t_21,&__pyx_t_20};
10691  for (i=0; i < 5; i++) {
10692  PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 270, __pyx_L11_error)
10693  __Pyx_GOTREF(item);
10694  *(temps[i]) = item;
10695  }
10696  }
10697  #endif
10698  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10699  } else {
10700  Py_ssize_t index = -1;
10701  PyObject** temps[5] = {&__pyx_t_5,&__pyx_t_1,&__pyx_t_22,&__pyx_t_21,&__pyx_t_20};
10702  __pyx_t_19 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 270, __pyx_L11_error)
10703  __Pyx_GOTREF(__pyx_t_19);
10704  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10705  __pyx_t_23 = Py_TYPE(__pyx_t_19)->tp_iternext;
10706  for (index=0; index < 5; index++) {
10707  PyObject* item = __pyx_t_23(__pyx_t_19); if (unlikely(!item)) goto __pyx_L19_unpacking_failed;
10708  __Pyx_GOTREF(item);
10709  *(temps[index]) = item;
10710  }
10711  if (__Pyx_IternextUnpackEndCheck(__pyx_t_23(__pyx_t_19), 5) < 0) __PYX_ERR(0, 270, __pyx_L11_error)
10712  __pyx_t_23 = NULL;
10713  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
10714  goto __pyx_L20_unpacking_done;
10715  __pyx_L19_unpacking_failed:;
10716  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
10717  __pyx_t_23 = NULL;
10718  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
10719  __PYX_ERR(0, 270, __pyx_L11_error)
10720  __pyx_L20_unpacking_done:;
10721  }
10722 
10723  /* "dbocean.pyx":270
10724  * else:
10725  * try:
10726  * fmf,aot,chl,wnd,sse = dbo.process(vin.rfl[iy,ix],vin.sza[iy,ix], # <<<<<<<<<<<<<<
10727  * vin.vza[iy,ix],vin.raa[iy,ix],
10728  * vin.wnd[iy,ix],vin.chl[iy,ix])
10729  */
10730  __Pyx_XDECREF_SET(__pyx_v_fmf, __pyx_t_5);
10731  __pyx_t_5 = 0;
10732  __Pyx_XDECREF_SET(__pyx_v_aot, __pyx_t_1);
10733  __pyx_t_1 = 0;
10734  __Pyx_XDECREF_SET(__pyx_v_chl, __pyx_t_22);
10735  __pyx_t_22 = 0;
10736  __Pyx_XDECREF_SET(__pyx_v_wnd, __pyx_t_21);
10737  __pyx_t_21 = 0;
10738  __Pyx_XDECREF_SET(__pyx_v_sse, __pyx_t_20);
10739  __pyx_t_20 = 0;
10740 
10741  /* "dbocean.pyx":269
10742  * fmf,aot,chl,wnd,sse = -999.9, -999.9, -999.9, -999.9, -999.9
10743  * else:
10744  * try: # <<<<<<<<<<<<<<
10745  * fmf,aot,chl,wnd,sse = dbo.process(vin.rfl[iy,ix],vin.sza[iy,ix],
10746  * vin.vza[iy,ix],vin.raa[iy,ix],
10747  */
10748  }
10749  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
10750  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
10751  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
10752  goto __pyx_L18_try_end;
10753  __pyx_L11_error:;
10754  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
10755  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
10756  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
10757  __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
10758  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
10759  __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
10760  __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
10761  __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
10762  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10763  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
10764 
10765  /* "dbocean.pyx":273
10766  * vin.vza[iy,ix],vin.raa[iy,ix],
10767  * vin.wnd[iy,ix],vin.chl[iy,ix])
10768  * except Exception as inst: # <<<<<<<<<<<<<<
10769  * print(type(inst))
10770  * print(inst)
10771  */
10772  __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
10773  if (__pyx_t_7) {
10774  __Pyx_AddTraceback("dbocean.main", __pyx_clineno, __pyx_lineno, __pyx_filename);
10775  if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_20, &__pyx_t_21) < 0) __PYX_ERR(0, 273, __pyx_L13_except_error)
10776  __Pyx_GOTREF(__pyx_t_14);
10777  __Pyx_GOTREF(__pyx_t_20);
10778  __Pyx_GOTREF(__pyx_t_21);
10779  __Pyx_INCREF(__pyx_t_20);
10780  __pyx_v_inst = __pyx_t_20;
10781  /*try:*/ {
10782 
10783  /* "dbocean.pyx":274
10784  * vin.wnd[iy,ix],vin.chl[iy,ix])
10785  * except Exception as inst:
10786  * print(type(inst)) # <<<<<<<<<<<<<<
10787  * print(inst)
10788  * print ("processing error at pixel", iy, ix)
10789  */
10790  __pyx_t_22 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, ((PyObject *)Py_TYPE(__pyx_v_inst))); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 274, __pyx_L26_error)
10791  __Pyx_GOTREF(__pyx_t_22);
10792  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
10793 
10794  /* "dbocean.pyx":275
10795  * except Exception as inst:
10796  * print(type(inst))
10797  * print(inst) # <<<<<<<<<<<<<<
10798  * print ("processing error at pixel", iy, ix)
10799  *
10800  */
10801  __pyx_t_22 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v_inst); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 275, __pyx_L26_error)
10802  __Pyx_GOTREF(__pyx_t_22);
10803  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
10804 
10805  /* "dbocean.pyx":276
10806  * print(type(inst))
10807  * print(inst)
10808  * print ("processing error at pixel", iy, ix) # <<<<<<<<<<<<<<
10809  *
10810  * if(args.plot):
10811  */
10812  __pyx_t_22 = PyTuple_New(3); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 276, __pyx_L26_error)
10813  __Pyx_GOTREF(__pyx_t_22);
10814  __Pyx_INCREF(__pyx_kp_u_processing_error_at_pixel);
10815  __Pyx_GIVEREF(__pyx_kp_u_processing_error_at_pixel);
10816  PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_kp_u_processing_error_at_pixel);
10817  __Pyx_INCREF(__pyx_v_iy);
10818  __Pyx_GIVEREF(__pyx_v_iy);
10819  PyTuple_SET_ITEM(__pyx_t_22, 1, __pyx_v_iy);
10820  __Pyx_INCREF(__pyx_v_ix);
10821  __Pyx_GIVEREF(__pyx_v_ix);
10822  PyTuple_SET_ITEM(__pyx_t_22, 2, __pyx_v_ix);
10823  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_22, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L26_error)
10824  __Pyx_GOTREF(__pyx_t_1);
10825  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
10826  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10827  }
10828 
10829  /* "dbocean.pyx":273
10830  * vin.vza[iy,ix],vin.raa[iy,ix],
10831  * vin.wnd[iy,ix],vin.chl[iy,ix])
10832  * except Exception as inst: # <<<<<<<<<<<<<<
10833  * print(type(inst))
10834  * print(inst)
10835  */
10836  /*finally:*/ {
10837  /*normal exit:*/{
10838  __Pyx_DECREF(__pyx_v_inst);
10839  __pyx_v_inst = NULL;
10840  goto __pyx_L27;
10841  }
10842  __pyx_L26_error:;
10843  /*exception exit:*/{
10844  __Pyx_PyThreadState_declare
10845  __Pyx_PyThreadState_assign
10846  __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0; __pyx_t_30 = 0; __pyx_t_31 = 0;
10847  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
10848  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
10849  __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
10850  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
10851  __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
10852  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10853  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
10854  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_29, &__pyx_t_30, &__pyx_t_31);
10855  if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_26, &__pyx_t_27, &__pyx_t_28) < 0)) __Pyx_ErrFetch(&__pyx_t_26, &__pyx_t_27, &__pyx_t_28);
10856  __Pyx_XGOTREF(__pyx_t_26);
10857  __Pyx_XGOTREF(__pyx_t_27);
10858  __Pyx_XGOTREF(__pyx_t_28);
10859  __Pyx_XGOTREF(__pyx_t_29);
10860  __Pyx_XGOTREF(__pyx_t_30);
10861  __Pyx_XGOTREF(__pyx_t_31);
10862  __pyx_t_7 = __pyx_lineno; __pyx_t_24 = __pyx_clineno; __pyx_t_25 = __pyx_filename;
10863  {
10864  __Pyx_DECREF(__pyx_v_inst);
10865  __pyx_v_inst = NULL;
10866  }
10867  if (PY_MAJOR_VERSION >= 3) {
10868  __Pyx_XGIVEREF(__pyx_t_29);
10869  __Pyx_XGIVEREF(__pyx_t_30);
10870  __Pyx_XGIVEREF(__pyx_t_31);
10871  __Pyx_ExceptionReset(__pyx_t_29, __pyx_t_30, __pyx_t_31);
10872  }
10873  __Pyx_XGIVEREF(__pyx_t_26);
10874  __Pyx_XGIVEREF(__pyx_t_27);
10875  __Pyx_XGIVEREF(__pyx_t_28);
10876  __Pyx_ErrRestore(__pyx_t_26, __pyx_t_27, __pyx_t_28);
10877  __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0; __pyx_t_30 = 0; __pyx_t_31 = 0;
10878  __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_24; __pyx_filename = __pyx_t_25;
10879  goto __pyx_L13_except_error;
10880  }
10881  __pyx_L27:;
10882  }
10883  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
10884  __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
10885  __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
10886  goto __pyx_L12_exception_handled;
10887  }
10888  goto __pyx_L13_except_error;
10889  __pyx_L13_except_error:;
10890 
10891  /* "dbocean.pyx":269
10892  * fmf,aot,chl,wnd,sse = -999.9, -999.9, -999.9, -999.9, -999.9
10893  * else:
10894  * try: # <<<<<<<<<<<<<<
10895  * fmf,aot,chl,wnd,sse = dbo.process(vin.rfl[iy,ix],vin.sza[iy,ix],
10896  * vin.vza[iy,ix],vin.raa[iy,ix],
10897  */
10898  __Pyx_XGIVEREF(__pyx_t_15);
10899  __Pyx_XGIVEREF(__pyx_t_16);
10900  __Pyx_XGIVEREF(__pyx_t_17);
10901  __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
10902  goto __pyx_L1_error;
10903  __pyx_L12_exception_handled:;
10904  __Pyx_XGIVEREF(__pyx_t_15);
10905  __Pyx_XGIVEREF(__pyx_t_16);
10906  __Pyx_XGIVEREF(__pyx_t_17);
10907  __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
10908  __pyx_L18_try_end:;
10909  }
10910  }
10911  __pyx_L8:;
10912 
10913  /* "dbocean.pyx":278
10914  * print ("processing error at pixel", iy, ix)
10915  *
10916  * if(args.plot): # <<<<<<<<<<<<<<
10917  * dbo.plot(iy,ix)
10918  *
10919  */
10920  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_plot); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 278, __pyx_L1_error)
10921  __Pyx_GOTREF(__pyx_t_21);
10922  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_21); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 278, __pyx_L1_error)
10923  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
10924  if (__pyx_t_6) {
10925 
10926  /* "dbocean.pyx":279
10927  *
10928  * if(args.plot):
10929  * dbo.plot(iy,ix) # <<<<<<<<<<<<<<
10930  *
10931  * vout.ds.rfl[:,iy-args.y,ix-args.x] = vin.rfl[iy,ix]
10932  */
10933  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_dbo, __pyx_n_s_plot); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 279, __pyx_L1_error)
10934  __Pyx_GOTREF(__pyx_t_20);
10935  __pyx_t_14 = NULL;
10936  __pyx_t_24 = 0;
10937  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_20))) {
10938  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_20);
10939  if (likely(__pyx_t_14)) {
10940  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_20);
10941  __Pyx_INCREF(__pyx_t_14);
10942  __Pyx_INCREF(function);
10943  __Pyx_DECREF_SET(__pyx_t_20, function);
10944  __pyx_t_24 = 1;
10945  }
10946  }
10947  #if CYTHON_FAST_PYCALL
10948  if (PyFunction_Check(__pyx_t_20)) {
10949  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_v_iy, __pyx_v_ix};
10950  __pyx_t_21 = __Pyx_PyFunction_FastCall(__pyx_t_20, __pyx_temp+1-__pyx_t_24, 2+__pyx_t_24); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 279, __pyx_L1_error)
10951  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
10952  __Pyx_GOTREF(__pyx_t_21);
10953  } else
10954  #endif
10955  #if CYTHON_FAST_PYCCALL
10956  if (__Pyx_PyFastCFunction_Check(__pyx_t_20)) {
10957  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_v_iy, __pyx_v_ix};
10958  __pyx_t_21 = __Pyx_PyCFunction_FastCall(__pyx_t_20, __pyx_temp+1-__pyx_t_24, 2+__pyx_t_24); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 279, __pyx_L1_error)
10959  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
10960  __Pyx_GOTREF(__pyx_t_21);
10961  } else
10962  #endif
10963  {
10964  __pyx_t_1 = PyTuple_New(2+__pyx_t_24); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error)
10965  __Pyx_GOTREF(__pyx_t_1);
10966  if (__pyx_t_14) {
10967  __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_14); __pyx_t_14 = NULL;
10968  }
10969  __Pyx_INCREF(__pyx_v_iy);
10970  __Pyx_GIVEREF(__pyx_v_iy);
10971  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_24, __pyx_v_iy);
10972  __Pyx_INCREF(__pyx_v_ix);
10973  __Pyx_GIVEREF(__pyx_v_ix);
10974  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_24, __pyx_v_ix);
10975  __pyx_t_21 = __Pyx_PyObject_Call(__pyx_t_20, __pyx_t_1, NULL); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 279, __pyx_L1_error)
10976  __Pyx_GOTREF(__pyx_t_21);
10977  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10978  }
10979  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
10980  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
10981 
10982  /* "dbocean.pyx":278
10983  * print ("processing error at pixel", iy, ix)
10984  *
10985  * if(args.plot): # <<<<<<<<<<<<<<
10986  * dbo.plot(iy,ix)
10987  *
10988  */
10989  }
10990 
10991  /* "dbocean.pyx":281
10992  * dbo.plot(iy,ix)
10993  *
10994  * vout.ds.rfl[:,iy-args.y,ix-args.x] = vin.rfl[iy,ix] # <<<<<<<<<<<<<<
10995  * vout.ds.lat[iy-args.y,ix-args.x] = vin.lat[iy,ix]
10996  * vout.ds.lon[iy-args.y,ix-args.x] = vin.lon[iy,ix]
10997  */
10998  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_rfl); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 281, __pyx_L1_error)
10999  __Pyx_GOTREF(__pyx_t_21);
11000  __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 281, __pyx_L1_error)
11001  __Pyx_GOTREF(__pyx_t_20);
11002  __Pyx_INCREF(__pyx_v_iy);
11003  __Pyx_GIVEREF(__pyx_v_iy);
11004  PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_v_iy);
11005  __Pyx_INCREF(__pyx_v_ix);
11006  __Pyx_GIVEREF(__pyx_v_ix);
11007  PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_v_ix);
11008  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_21, __pyx_t_20); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L1_error)
11009  __Pyx_GOTREF(__pyx_t_1);
11010  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11011  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11012  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_ds); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 281, __pyx_L1_error)
11013  __Pyx_GOTREF(__pyx_t_20);
11014  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_rfl); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 281, __pyx_L1_error)
11015  __Pyx_GOTREF(__pyx_t_21);
11016  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11017  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 281, __pyx_L1_error)
11018  __Pyx_GOTREF(__pyx_t_20);
11019  __pyx_t_14 = PyNumber_Subtract(__pyx_v_iy, __pyx_t_20); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 281, __pyx_L1_error)
11020  __Pyx_GOTREF(__pyx_t_14);
11021  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11022  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 281, __pyx_L1_error)
11023  __Pyx_GOTREF(__pyx_t_20);
11024  __pyx_t_22 = PyNumber_Subtract(__pyx_v_ix, __pyx_t_20); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 281, __pyx_L1_error)
11025  __Pyx_GOTREF(__pyx_t_22);
11026  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11027  __pyx_t_20 = PyTuple_New(3); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 281, __pyx_L1_error)
11028  __Pyx_GOTREF(__pyx_t_20);
11029  __Pyx_INCREF(__pyx_slice_);
11030  __Pyx_GIVEREF(__pyx_slice_);
11031  PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_slice_);
11032  __Pyx_GIVEREF(__pyx_t_14);
11033  PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_14);
11034  __Pyx_GIVEREF(__pyx_t_22);
11035  PyTuple_SET_ITEM(__pyx_t_20, 2, __pyx_t_22);
11036  __pyx_t_14 = 0;
11037  __pyx_t_22 = 0;
11038  if (unlikely(PyObject_SetItem(__pyx_t_21, __pyx_t_20, __pyx_t_1) < 0)) __PYX_ERR(0, 281, __pyx_L1_error)
11039  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11040  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11041  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11042 
11043  /* "dbocean.pyx":282
11044  *
11045  * vout.ds.rfl[:,iy-args.y,ix-args.x] = vin.rfl[iy,ix]
11046  * vout.ds.lat[iy-args.y,ix-args.x] = vin.lat[iy,ix] # <<<<<<<<<<<<<<
11047  * vout.ds.lon[iy-args.y,ix-args.x] = vin.lon[iy,ix]
11048  * vout.ds.sza[iy-args.y,ix-args.x] = vin.sza[iy,ix]
11049  */
11050  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_lat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
11051  __Pyx_GOTREF(__pyx_t_1);
11052  __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 282, __pyx_L1_error)
11053  __Pyx_GOTREF(__pyx_t_20);
11054  __Pyx_INCREF(__pyx_v_iy);
11055  __Pyx_GIVEREF(__pyx_v_iy);
11056  PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_v_iy);
11057  __Pyx_INCREF(__pyx_v_ix);
11058  __Pyx_GIVEREF(__pyx_v_ix);
11059  PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_v_ix);
11060  __pyx_t_21 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 282, __pyx_L1_error)
11061  __Pyx_GOTREF(__pyx_t_21);
11062  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11063  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11064  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_ds); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 282, __pyx_L1_error)
11065  __Pyx_GOTREF(__pyx_t_20);
11066  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_lat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
11067  __Pyx_GOTREF(__pyx_t_1);
11068  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11069  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 282, __pyx_L1_error)
11070  __Pyx_GOTREF(__pyx_t_20);
11071  __pyx_t_22 = PyNumber_Subtract(__pyx_v_iy, __pyx_t_20); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 282, __pyx_L1_error)
11072  __Pyx_GOTREF(__pyx_t_22);
11073  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11074  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 282, __pyx_L1_error)
11075  __Pyx_GOTREF(__pyx_t_20);
11076  __pyx_t_14 = PyNumber_Subtract(__pyx_v_ix, __pyx_t_20); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 282, __pyx_L1_error)
11077  __Pyx_GOTREF(__pyx_t_14);
11078  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11079  __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 282, __pyx_L1_error)
11080  __Pyx_GOTREF(__pyx_t_20);
11081  __Pyx_GIVEREF(__pyx_t_22);
11082  PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_22);
11083  __Pyx_GIVEREF(__pyx_t_14);
11084  PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_14);
11085  __pyx_t_22 = 0;
11086  __pyx_t_14 = 0;
11087  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_20, __pyx_t_21) < 0)) __PYX_ERR(0, 282, __pyx_L1_error)
11088  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11089  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11090  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11091 
11092  /* "dbocean.pyx":283
11093  * vout.ds.rfl[:,iy-args.y,ix-args.x] = vin.rfl[iy,ix]
11094  * vout.ds.lat[iy-args.y,ix-args.x] = vin.lat[iy,ix]
11095  * vout.ds.lon[iy-args.y,ix-args.x] = vin.lon[iy,ix] # <<<<<<<<<<<<<<
11096  * vout.ds.sza[iy-args.y,ix-args.x] = vin.sza[iy,ix]
11097  * vout.ds.vza[iy-args.y,ix-args.x] = vin.vza[iy,ix]
11098  */
11099  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_lon); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 283, __pyx_L1_error)
11100  __Pyx_GOTREF(__pyx_t_21);
11101  __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 283, __pyx_L1_error)
11102  __Pyx_GOTREF(__pyx_t_20);
11103  __Pyx_INCREF(__pyx_v_iy);
11104  __Pyx_GIVEREF(__pyx_v_iy);
11105  PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_v_iy);
11106  __Pyx_INCREF(__pyx_v_ix);
11107  __Pyx_GIVEREF(__pyx_v_ix);
11108  PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_v_ix);
11109  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_21, __pyx_t_20); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error)
11110  __Pyx_GOTREF(__pyx_t_1);
11111  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11112  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11113  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_ds); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 283, __pyx_L1_error)
11114  __Pyx_GOTREF(__pyx_t_20);
11115  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_lon); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 283, __pyx_L1_error)
11116  __Pyx_GOTREF(__pyx_t_21);
11117  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11118  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 283, __pyx_L1_error)
11119  __Pyx_GOTREF(__pyx_t_20);
11120  __pyx_t_14 = PyNumber_Subtract(__pyx_v_iy, __pyx_t_20); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 283, __pyx_L1_error)
11121  __Pyx_GOTREF(__pyx_t_14);
11122  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11123  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 283, __pyx_L1_error)
11124  __Pyx_GOTREF(__pyx_t_20);
11125  __pyx_t_22 = PyNumber_Subtract(__pyx_v_ix, __pyx_t_20); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 283, __pyx_L1_error)
11126  __Pyx_GOTREF(__pyx_t_22);
11127  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11128  __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 283, __pyx_L1_error)
11129  __Pyx_GOTREF(__pyx_t_20);
11130  __Pyx_GIVEREF(__pyx_t_14);
11131  PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_14);
11132  __Pyx_GIVEREF(__pyx_t_22);
11133  PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_22);
11134  __pyx_t_14 = 0;
11135  __pyx_t_22 = 0;
11136  if (unlikely(PyObject_SetItem(__pyx_t_21, __pyx_t_20, __pyx_t_1) < 0)) __PYX_ERR(0, 283, __pyx_L1_error)
11137  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11138  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11139  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11140 
11141  /* "dbocean.pyx":284
11142  * vout.ds.lat[iy-args.y,ix-args.x] = vin.lat[iy,ix]
11143  * vout.ds.lon[iy-args.y,ix-args.x] = vin.lon[iy,ix]
11144  * vout.ds.sza[iy-args.y,ix-args.x] = vin.sza[iy,ix] # <<<<<<<<<<<<<<
11145  * vout.ds.vza[iy-args.y,ix-args.x] = vin.vza[iy,ix]
11146  * vout.ds.raa[iy-args.y,ix-args.x] = vin.raa[iy,ix]
11147  */
11148  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_sza); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error)
11149  __Pyx_GOTREF(__pyx_t_1);
11150  __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 284, __pyx_L1_error)
11151  __Pyx_GOTREF(__pyx_t_20);
11152  __Pyx_INCREF(__pyx_v_iy);
11153  __Pyx_GIVEREF(__pyx_v_iy);
11154  PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_v_iy);
11155  __Pyx_INCREF(__pyx_v_ix);
11156  __Pyx_GIVEREF(__pyx_v_ix);
11157  PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_v_ix);
11158  __pyx_t_21 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 284, __pyx_L1_error)
11159  __Pyx_GOTREF(__pyx_t_21);
11160  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11161  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11162  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_ds); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 284, __pyx_L1_error)
11163  __Pyx_GOTREF(__pyx_t_20);
11164  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_sza); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error)
11165  __Pyx_GOTREF(__pyx_t_1);
11166  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11167  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 284, __pyx_L1_error)
11168  __Pyx_GOTREF(__pyx_t_20);
11169  __pyx_t_22 = PyNumber_Subtract(__pyx_v_iy, __pyx_t_20); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 284, __pyx_L1_error)
11170  __Pyx_GOTREF(__pyx_t_22);
11171  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11172  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 284, __pyx_L1_error)
11173  __Pyx_GOTREF(__pyx_t_20);
11174  __pyx_t_14 = PyNumber_Subtract(__pyx_v_ix, __pyx_t_20); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 284, __pyx_L1_error)
11175  __Pyx_GOTREF(__pyx_t_14);
11176  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11177  __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 284, __pyx_L1_error)
11178  __Pyx_GOTREF(__pyx_t_20);
11179  __Pyx_GIVEREF(__pyx_t_22);
11180  PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_22);
11181  __Pyx_GIVEREF(__pyx_t_14);
11182  PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_14);
11183  __pyx_t_22 = 0;
11184  __pyx_t_14 = 0;
11185  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_20, __pyx_t_21) < 0)) __PYX_ERR(0, 284, __pyx_L1_error)
11186  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11187  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11188  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11189 
11190  /* "dbocean.pyx":285
11191  * vout.ds.lon[iy-args.y,ix-args.x] = vin.lon[iy,ix]
11192  * vout.ds.sza[iy-args.y,ix-args.x] = vin.sza[iy,ix]
11193  * vout.ds.vza[iy-args.y,ix-args.x] = vin.vza[iy,ix] # <<<<<<<<<<<<<<
11194  * vout.ds.raa[iy-args.y,ix-args.x] = vin.raa[iy,ix]
11195  * vout.ds.wnd[iy-args.y,ix-args.x] = wnd
11196  */
11197  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_vza); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 285, __pyx_L1_error)
11198  __Pyx_GOTREF(__pyx_t_21);
11199  __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 285, __pyx_L1_error)
11200  __Pyx_GOTREF(__pyx_t_20);
11201  __Pyx_INCREF(__pyx_v_iy);
11202  __Pyx_GIVEREF(__pyx_v_iy);
11203  PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_v_iy);
11204  __Pyx_INCREF(__pyx_v_ix);
11205  __Pyx_GIVEREF(__pyx_v_ix);
11206  PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_v_ix);
11207  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_21, __pyx_t_20); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error)
11208  __Pyx_GOTREF(__pyx_t_1);
11209  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11210  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11211  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_ds); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 285, __pyx_L1_error)
11212  __Pyx_GOTREF(__pyx_t_20);
11213  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_vza); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 285, __pyx_L1_error)
11214  __Pyx_GOTREF(__pyx_t_21);
11215  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11216  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 285, __pyx_L1_error)
11217  __Pyx_GOTREF(__pyx_t_20);
11218  __pyx_t_14 = PyNumber_Subtract(__pyx_v_iy, __pyx_t_20); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 285, __pyx_L1_error)
11219  __Pyx_GOTREF(__pyx_t_14);
11220  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11221  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 285, __pyx_L1_error)
11222  __Pyx_GOTREF(__pyx_t_20);
11223  __pyx_t_22 = PyNumber_Subtract(__pyx_v_ix, __pyx_t_20); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 285, __pyx_L1_error)
11224  __Pyx_GOTREF(__pyx_t_22);
11225  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11226  __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 285, __pyx_L1_error)
11227  __Pyx_GOTREF(__pyx_t_20);
11228  __Pyx_GIVEREF(__pyx_t_14);
11229  PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_14);
11230  __Pyx_GIVEREF(__pyx_t_22);
11231  PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_22);
11232  __pyx_t_14 = 0;
11233  __pyx_t_22 = 0;
11234  if (unlikely(PyObject_SetItem(__pyx_t_21, __pyx_t_20, __pyx_t_1) < 0)) __PYX_ERR(0, 285, __pyx_L1_error)
11235  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11236  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11237  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11238 
11239  /* "dbocean.pyx":286
11240  * vout.ds.sza[iy-args.y,ix-args.x] = vin.sza[iy,ix]
11241  * vout.ds.vza[iy-args.y,ix-args.x] = vin.vza[iy,ix]
11242  * vout.ds.raa[iy-args.y,ix-args.x] = vin.raa[iy,ix] # <<<<<<<<<<<<<<
11243  * vout.ds.wnd[iy-args.y,ix-args.x] = wnd
11244  * vout.ds.chl[iy-args.y,ix-args.x] = chl
11245  */
11246  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_vin, __pyx_n_s_raa); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error)
11247  __Pyx_GOTREF(__pyx_t_1);
11248  __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 286, __pyx_L1_error)
11249  __Pyx_GOTREF(__pyx_t_20);
11250  __Pyx_INCREF(__pyx_v_iy);
11251  __Pyx_GIVEREF(__pyx_v_iy);
11252  PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_v_iy);
11253  __Pyx_INCREF(__pyx_v_ix);
11254  __Pyx_GIVEREF(__pyx_v_ix);
11255  PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_v_ix);
11256  __pyx_t_21 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 286, __pyx_L1_error)
11257  __Pyx_GOTREF(__pyx_t_21);
11258  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11259  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11260  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_ds); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 286, __pyx_L1_error)
11261  __Pyx_GOTREF(__pyx_t_20);
11262  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_raa); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error)
11263  __Pyx_GOTREF(__pyx_t_1);
11264  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11265  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 286, __pyx_L1_error)
11266  __Pyx_GOTREF(__pyx_t_20);
11267  __pyx_t_22 = PyNumber_Subtract(__pyx_v_iy, __pyx_t_20); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 286, __pyx_L1_error)
11268  __Pyx_GOTREF(__pyx_t_22);
11269  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11270  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 286, __pyx_L1_error)
11271  __Pyx_GOTREF(__pyx_t_20);
11272  __pyx_t_14 = PyNumber_Subtract(__pyx_v_ix, __pyx_t_20); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 286, __pyx_L1_error)
11273  __Pyx_GOTREF(__pyx_t_14);
11274  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11275  __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 286, __pyx_L1_error)
11276  __Pyx_GOTREF(__pyx_t_20);
11277  __Pyx_GIVEREF(__pyx_t_22);
11278  PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_22);
11279  __Pyx_GIVEREF(__pyx_t_14);
11280  PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_14);
11281  __pyx_t_22 = 0;
11282  __pyx_t_14 = 0;
11283  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_20, __pyx_t_21) < 0)) __PYX_ERR(0, 286, __pyx_L1_error)
11284  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11285  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11286  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11287 
11288  /* "dbocean.pyx":287
11289  * vout.ds.vza[iy-args.y,ix-args.x] = vin.vza[iy,ix]
11290  * vout.ds.raa[iy-args.y,ix-args.x] = vin.raa[iy,ix]
11291  * vout.ds.wnd[iy-args.y,ix-args.x] = wnd # <<<<<<<<<<<<<<
11292  * vout.ds.chl[iy-args.y,ix-args.x] = chl
11293  * vout.ds.aot[iy-args.y,ix-args.x] = aot
11294  */
11295  if (unlikely(!__pyx_v_wnd)) { __Pyx_RaiseUnboundLocalError("wnd"); __PYX_ERR(0, 287, __pyx_L1_error) }
11296  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_ds); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 287, __pyx_L1_error)
11297  __Pyx_GOTREF(__pyx_t_21);
11298  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_wnd); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 287, __pyx_L1_error)
11299  __Pyx_GOTREF(__pyx_t_20);
11300  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11301  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 287, __pyx_L1_error)
11302  __Pyx_GOTREF(__pyx_t_21);
11303  __pyx_t_1 = PyNumber_Subtract(__pyx_v_iy, __pyx_t_21); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error)
11304  __Pyx_GOTREF(__pyx_t_1);
11305  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11306  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 287, __pyx_L1_error)
11307  __Pyx_GOTREF(__pyx_t_21);
11308  __pyx_t_14 = PyNumber_Subtract(__pyx_v_ix, __pyx_t_21); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 287, __pyx_L1_error)
11309  __Pyx_GOTREF(__pyx_t_14);
11310  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11311  __pyx_t_21 = PyTuple_New(2); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 287, __pyx_L1_error)
11312  __Pyx_GOTREF(__pyx_t_21);
11313  __Pyx_GIVEREF(__pyx_t_1);
11314  PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_1);
11315  __Pyx_GIVEREF(__pyx_t_14);
11316  PyTuple_SET_ITEM(__pyx_t_21, 1, __pyx_t_14);
11317  __pyx_t_1 = 0;
11318  __pyx_t_14 = 0;
11319  if (unlikely(PyObject_SetItem(__pyx_t_20, __pyx_t_21, __pyx_v_wnd) < 0)) __PYX_ERR(0, 287, __pyx_L1_error)
11320  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11321  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11322 
11323  /* "dbocean.pyx":288
11324  * vout.ds.raa[iy-args.y,ix-args.x] = vin.raa[iy,ix]
11325  * vout.ds.wnd[iy-args.y,ix-args.x] = wnd
11326  * vout.ds.chl[iy-args.y,ix-args.x] = chl # <<<<<<<<<<<<<<
11327  * vout.ds.aot[iy-args.y,ix-args.x] = aot
11328  * vout.ds.fmf[iy-args.y,ix-args.x] = fmf
11329  */
11330  if (unlikely(!__pyx_v_chl)) { __Pyx_RaiseUnboundLocalError("chl"); __PYX_ERR(0, 288, __pyx_L1_error) }
11331  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_ds); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 288, __pyx_L1_error)
11332  __Pyx_GOTREF(__pyx_t_21);
11333  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_chl); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 288, __pyx_L1_error)
11334  __Pyx_GOTREF(__pyx_t_20);
11335  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11336  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 288, __pyx_L1_error)
11337  __Pyx_GOTREF(__pyx_t_21);
11338  __pyx_t_14 = PyNumber_Subtract(__pyx_v_iy, __pyx_t_21); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 288, __pyx_L1_error)
11339  __Pyx_GOTREF(__pyx_t_14);
11340  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11341  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 288, __pyx_L1_error)
11342  __Pyx_GOTREF(__pyx_t_21);
11343  __pyx_t_1 = PyNumber_Subtract(__pyx_v_ix, __pyx_t_21); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L1_error)
11344  __Pyx_GOTREF(__pyx_t_1);
11345  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11346  __pyx_t_21 = PyTuple_New(2); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 288, __pyx_L1_error)
11347  __Pyx_GOTREF(__pyx_t_21);
11348  __Pyx_GIVEREF(__pyx_t_14);
11349  PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_14);
11350  __Pyx_GIVEREF(__pyx_t_1);
11351  PyTuple_SET_ITEM(__pyx_t_21, 1, __pyx_t_1);
11352  __pyx_t_14 = 0;
11353  __pyx_t_1 = 0;
11354  if (unlikely(PyObject_SetItem(__pyx_t_20, __pyx_t_21, __pyx_v_chl) < 0)) __PYX_ERR(0, 288, __pyx_L1_error)
11355  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11356  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11357 
11358  /* "dbocean.pyx":289
11359  * vout.ds.wnd[iy-args.y,ix-args.x] = wnd
11360  * vout.ds.chl[iy-args.y,ix-args.x] = chl
11361  * vout.ds.aot[iy-args.y,ix-args.x] = aot # <<<<<<<<<<<<<<
11362  * vout.ds.fmf[iy-args.y,ix-args.x] = fmf
11363  * vout.ds.sse[iy-args.y,ix-args.x] = sse
11364  */
11365  if (unlikely(!__pyx_v_aot)) { __Pyx_RaiseUnboundLocalError("aot"); __PYX_ERR(0, 289, __pyx_L1_error) }
11366  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_ds); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 289, __pyx_L1_error)
11367  __Pyx_GOTREF(__pyx_t_21);
11368  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_aot); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 289, __pyx_L1_error)
11369  __Pyx_GOTREF(__pyx_t_20);
11370  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11371  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 289, __pyx_L1_error)
11372  __Pyx_GOTREF(__pyx_t_21);
11373  __pyx_t_1 = PyNumber_Subtract(__pyx_v_iy, __pyx_t_21); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error)
11374  __Pyx_GOTREF(__pyx_t_1);
11375  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11376  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 289, __pyx_L1_error)
11377  __Pyx_GOTREF(__pyx_t_21);
11378  __pyx_t_14 = PyNumber_Subtract(__pyx_v_ix, __pyx_t_21); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 289, __pyx_L1_error)
11379  __Pyx_GOTREF(__pyx_t_14);
11380  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11381  __pyx_t_21 = PyTuple_New(2); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 289, __pyx_L1_error)
11382  __Pyx_GOTREF(__pyx_t_21);
11383  __Pyx_GIVEREF(__pyx_t_1);
11384  PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_1);
11385  __Pyx_GIVEREF(__pyx_t_14);
11386  PyTuple_SET_ITEM(__pyx_t_21, 1, __pyx_t_14);
11387  __pyx_t_1 = 0;
11388  __pyx_t_14 = 0;
11389  if (unlikely(PyObject_SetItem(__pyx_t_20, __pyx_t_21, __pyx_v_aot) < 0)) __PYX_ERR(0, 289, __pyx_L1_error)
11390  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11391  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11392 
11393  /* "dbocean.pyx":290
11394  * vout.ds.chl[iy-args.y,ix-args.x] = chl
11395  * vout.ds.aot[iy-args.y,ix-args.x] = aot
11396  * vout.ds.fmf[iy-args.y,ix-args.x] = fmf # <<<<<<<<<<<<<<
11397  * vout.ds.sse[iy-args.y,ix-args.x] = sse
11398  *
11399  */
11400  if (unlikely(!__pyx_v_fmf)) { __Pyx_RaiseUnboundLocalError("fmf"); __PYX_ERR(0, 290, __pyx_L1_error) }
11401  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_ds); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 290, __pyx_L1_error)
11402  __Pyx_GOTREF(__pyx_t_21);
11403  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_fmf); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 290, __pyx_L1_error)
11404  __Pyx_GOTREF(__pyx_t_20);
11405  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11406  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 290, __pyx_L1_error)
11407  __Pyx_GOTREF(__pyx_t_21);
11408  __pyx_t_14 = PyNumber_Subtract(__pyx_v_iy, __pyx_t_21); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 290, __pyx_L1_error)
11409  __Pyx_GOTREF(__pyx_t_14);
11410  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11411  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 290, __pyx_L1_error)
11412  __Pyx_GOTREF(__pyx_t_21);
11413  __pyx_t_1 = PyNumber_Subtract(__pyx_v_ix, __pyx_t_21); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 290, __pyx_L1_error)
11414  __Pyx_GOTREF(__pyx_t_1);
11415  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11416  __pyx_t_21 = PyTuple_New(2); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 290, __pyx_L1_error)
11417  __Pyx_GOTREF(__pyx_t_21);
11418  __Pyx_GIVEREF(__pyx_t_14);
11419  PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_14);
11420  __Pyx_GIVEREF(__pyx_t_1);
11421  PyTuple_SET_ITEM(__pyx_t_21, 1, __pyx_t_1);
11422  __pyx_t_14 = 0;
11423  __pyx_t_1 = 0;
11424  if (unlikely(PyObject_SetItem(__pyx_t_20, __pyx_t_21, __pyx_v_fmf) < 0)) __PYX_ERR(0, 290, __pyx_L1_error)
11425  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11426  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11427 
11428  /* "dbocean.pyx":291
11429  * vout.ds.aot[iy-args.y,ix-args.x] = aot
11430  * vout.ds.fmf[iy-args.y,ix-args.x] = fmf
11431  * vout.ds.sse[iy-args.y,ix-args.x] = sse # <<<<<<<<<<<<<<
11432  *
11433  * toc = time.perf_counter()
11434  */
11435  if (unlikely(!__pyx_v_sse)) { __Pyx_RaiseUnboundLocalError("sse"); __PYX_ERR(0, 291, __pyx_L1_error) }
11436  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_ds); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 291, __pyx_L1_error)
11437  __Pyx_GOTREF(__pyx_t_21);
11438  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_sse); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 291, __pyx_L1_error)
11439  __Pyx_GOTREF(__pyx_t_20);
11440  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11441  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_y); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 291, __pyx_L1_error)
11442  __Pyx_GOTREF(__pyx_t_21);
11443  __pyx_t_1 = PyNumber_Subtract(__pyx_v_iy, __pyx_t_21); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error)
11444  __Pyx_GOTREF(__pyx_t_1);
11445  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11446  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_x); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 291, __pyx_L1_error)
11447  __Pyx_GOTREF(__pyx_t_21);
11448  __pyx_t_14 = PyNumber_Subtract(__pyx_v_ix, __pyx_t_21); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 291, __pyx_L1_error)
11449  __Pyx_GOTREF(__pyx_t_14);
11450  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11451  __pyx_t_21 = PyTuple_New(2); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 291, __pyx_L1_error)
11452  __Pyx_GOTREF(__pyx_t_21);
11453  __Pyx_GIVEREF(__pyx_t_1);
11454  PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_1);
11455  __Pyx_GIVEREF(__pyx_t_14);
11456  PyTuple_SET_ITEM(__pyx_t_21, 1, __pyx_t_14);
11457  __pyx_t_1 = 0;
11458  __pyx_t_14 = 0;
11459  if (unlikely(PyObject_SetItem(__pyx_t_20, __pyx_t_21, __pyx_v_sse) < 0)) __PYX_ERR(0, 291, __pyx_L1_error)
11460  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11461  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11462 
11463  /* "dbocean.pyx":264
11464  * for iy in range(args.y, args.y+dimy):
11465  * tic = time.perf_counter()
11466  * for ix in range(args.x, args.x+dimx): # <<<<<<<<<<<<<<
11467  *
11468  * if(vin.cld[iy,ix] or vin.chl[iy,ix]<-999):
11469  */
11470  }
11471  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11472 
11473  /* "dbocean.pyx":293
11474  * vout.ds.sse[iy-args.y,ix-args.x] = sse
11475  *
11476  * toc = time.perf_counter() # <<<<<<<<<<<<<<
11477  * tpp = (toc-tic)/dimx
11478  * # print('.', end = '', flush=True)
11479  */
11480  __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_n_s_time); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 293, __pyx_L1_error)
11481  __Pyx_GOTREF(__pyx_t_21);
11482  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_perf_counter); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 293, __pyx_L1_error)
11483  __Pyx_GOTREF(__pyx_t_20);
11484  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11485  __pyx_t_21 = NULL;
11486  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_20))) {
11487  __pyx_t_21 = PyMethod_GET_SELF(__pyx_t_20);
11488  if (likely(__pyx_t_21)) {
11489  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_20);
11490  __Pyx_INCREF(__pyx_t_21);
11491  __Pyx_INCREF(function);
11492  __Pyx_DECREF_SET(__pyx_t_20, function);
11493  }
11494  }
11495  __pyx_t_4 = (__pyx_t_21) ? __Pyx_PyObject_CallOneArg(__pyx_t_20, __pyx_t_21) : __Pyx_PyObject_CallNoArg(__pyx_t_20);
11496  __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
11497  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 293, __pyx_L1_error)
11498  __Pyx_GOTREF(__pyx_t_4);
11499  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11500  __Pyx_XDECREF_SET(__pyx_v_toc, __pyx_t_4);
11501  __pyx_t_4 = 0;
11502 
11503  /* "dbocean.pyx":294
11504  *
11505  * toc = time.perf_counter()
11506  * tpp = (toc-tic)/dimx # <<<<<<<<<<<<<<
11507  * # print('.', end = '', flush=True)
11508  * print(iy, tpp, flush=True)
11509  */
11510  __pyx_t_4 = PyNumber_Subtract(__pyx_v_toc, __pyx_v_tic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 294, __pyx_L1_error)
11511  __Pyx_GOTREF(__pyx_t_4);
11512  __pyx_t_20 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_v_dimx); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 294, __pyx_L1_error)
11513  __Pyx_GOTREF(__pyx_t_20);
11514  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11515  __Pyx_XDECREF_SET(__pyx_v_tpp, __pyx_t_20);
11516  __pyx_t_20 = 0;
11517 
11518  /* "dbocean.pyx":296
11519  * tpp = (toc-tic)/dimx
11520  * # print('.', end = '', flush=True)
11521  * print(iy, tpp, flush=True) # <<<<<<<<<<<<<<
11522  * print(' Done!')
11523  * vout.write()
11524  */
11525  __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 296, __pyx_L1_error)
11526  __Pyx_GOTREF(__pyx_t_20);
11527  __Pyx_INCREF(__pyx_v_iy);
11528  __Pyx_GIVEREF(__pyx_v_iy);
11529  PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_v_iy);
11530  __Pyx_INCREF(__pyx_v_tpp);
11531  __Pyx_GIVEREF(__pyx_v_tpp);
11532  PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_v_tpp);
11533  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 296, __pyx_L1_error)
11534  __Pyx_GOTREF(__pyx_t_4);
11535  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_flush, Py_True) < 0) __PYX_ERR(0, 296, __pyx_L1_error)
11536  __pyx_t_21 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_20, __pyx_t_4); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 296, __pyx_L1_error)
11537  __Pyx_GOTREF(__pyx_t_21);
11538  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
11539  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11540  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11541 
11542  /* "dbocean.pyx":262
11543  *
11544  * print ("Processing mode {0}".format(args.mode))
11545  * for iy in range(args.y, args.y+dimy): # <<<<<<<<<<<<<<
11546  * tic = time.perf_counter()
11547  * for ix in range(args.x, args.x+dimx):
11548  */
11549  }
11550  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11551 
11552  /* "dbocean.pyx":297
11553  * # print('.', end = '', flush=True)
11554  * print(iy, tpp, flush=True)
11555  * print(' Done!') # <<<<<<<<<<<<<<
11556  * vout.write()
11557  *
11558  */
11559  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 297, __pyx_L1_error)
11560  __Pyx_GOTREF(__pyx_t_3);
11561  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11562 
11563  /* "dbocean.pyx":298
11564  * print(iy, tpp, flush=True)
11565  * print(' Done!')
11566  * vout.write() # <<<<<<<<<<<<<<
11567  *
11568  * if __name__ == "__main__":
11569  */
11570  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_vout, __pyx_n_s_write); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 298, __pyx_L1_error)
11571  __Pyx_GOTREF(__pyx_t_21);
11572  __pyx_t_4 = NULL;
11573  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_21))) {
11574  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_21);
11575  if (likely(__pyx_t_4)) {
11576  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_21);
11577  __Pyx_INCREF(__pyx_t_4);
11578  __Pyx_INCREF(function);
11579  __Pyx_DECREF_SET(__pyx_t_21, function);
11580  }
11581  }
11582  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_21, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_21);
11583  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
11584  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 298, __pyx_L1_error)
11585  __Pyx_GOTREF(__pyx_t_3);
11586  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
11587  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11588 
11589  /* "dbocean.pyx":232
11590  * self.ds.to_netcdf(self.ofile)
11591  *
11592  * def main(): # <<<<<<<<<<<<<<
11593  *
11594  * parser = argparse.ArgumentParser()
11595  */
11596 
11597  /* function exit code */
11598  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11599  goto __pyx_L0;
11600  __pyx_L1_error:;
11601  __Pyx_XDECREF(__pyx_t_1);
11602  __Pyx_XDECREF(__pyx_t_2);
11603  __Pyx_XDECREF(__pyx_t_3);
11604  __Pyx_XDECREF(__pyx_t_4);
11605  __Pyx_XDECREF(__pyx_t_5);
11606  __Pyx_XDECREF(__pyx_t_8);
11607  __Pyx_XDECREF(__pyx_t_14);
11608  __Pyx_XDECREF(__pyx_t_18);
11609  __Pyx_XDECREF(__pyx_t_19);
11610  __Pyx_XDECREF(__pyx_t_20);
11611  __Pyx_XDECREF(__pyx_t_21);
11612  __Pyx_XDECREF(__pyx_t_22);
11613  __Pyx_AddTraceback("dbocean.main", __pyx_clineno, __pyx_lineno, __pyx_filename);
11614  __pyx_r = NULL;
11615  __pyx_L0:;
11616  __Pyx_XDECREF(__pyx_v_parser);
11617  __Pyx_XDECREF(__pyx_v_args);
11618  __Pyx_XDECREF(__pyx_v_vin);
11619  __Pyx_XDECREF(__pyx_v_dimx);
11620  __Pyx_XDECREF(__pyx_v_dimy);
11621  __Pyx_XDECREF(__pyx_v_vout);
11622  __Pyx_XDECREF(__pyx_v_dbo);
11623  __Pyx_XDECREF(__pyx_v_iy);
11624  __Pyx_XDECREF(__pyx_v_tic);
11625  __Pyx_XDECREF(__pyx_v_ix);
11626  __Pyx_XDECREF(__pyx_v_fmf);
11627  __Pyx_XDECREF(__pyx_v_aot);
11628  __Pyx_XDECREF(__pyx_v_chl);
11629  __Pyx_XDECREF(__pyx_v_wnd);
11630  __Pyx_XDECREF(__pyx_v_sse);
11631  __Pyx_XDECREF(__pyx_v_inst);
11632  __Pyx_XDECREF(__pyx_v_toc);
11633  __Pyx_XDECREF(__pyx_v_tpp);
11634  __Pyx_XGIVEREF(__pyx_r);
11635  __Pyx_RefNannyFinishContext();
11636  return __pyx_r;
11637 }
11638 
11639 static PyMethodDef __pyx_methods[] = {
11640  {0, 0, 0, 0}
11641 };
11642 
11643 #if PY_MAJOR_VERSION >= 3
11644 #if CYTHON_PEP489_MULTI_PHASE_INIT
11645 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
11646 static int __pyx_pymod_exec_dbocean(PyObject* module); /*proto*/
11647 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
11648  {Py_mod_create, (void*)__pyx_pymod_create},
11649  {Py_mod_exec, (void*)__pyx_pymod_exec_dbocean},
11650  {0, NULL}
11651 };
11652 #endif
11653 
11654 static struct PyModuleDef __pyx_moduledef = {
11655  PyModuleDef_HEAD_INIT,
11656  "dbocean",
11657  0, /* m_doc */
11658  #if CYTHON_PEP489_MULTI_PHASE_INIT
11659  0, /* m_size */
11660  #else
11661  -1, /* m_size */
11662  #endif
11663  __pyx_methods /* m_methods */,
11664  #if CYTHON_PEP489_MULTI_PHASE_INIT
11665  __pyx_moduledef_slots, /* m_slots */
11666  #else
11667  NULL, /* m_reload */
11668  #endif
11669  NULL, /* m_traverse */
11670  NULL, /* m_clear */
11671  NULL /* m_free */
11672 };
11673 #endif
11674 #ifndef CYTHON_SMALL_CODE
11675 #if defined(__clang__)
11676  #define CYTHON_SMALL_CODE
11677 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
11678  #define CYTHON_SMALL_CODE __attribute__((cold))
11679 #else
11680  #define CYTHON_SMALL_CODE
11681 #endif
11682 #endif
11683 
11684 static __Pyx_StringTabEntry __pyx_string_tab[] = {
11685  {&__pyx_n_u_Aerosol_Optical_Depth_550, __pyx_k_Aerosol_Optical_Depth_550, sizeof(__pyx_k_Aerosol_Optical_Depth_550), 0, 1, 0, 1},
11686  {&__pyx_n_s_ArgumentParser, __pyx_k_ArgumentParser, sizeof(__pyx_k_ArgumentParser), 0, 0, 1, 1},
11687  {&__pyx_n_u_Band_Central_Wavelength, __pyx_k_Band_Central_Wavelength, sizeof(__pyx_k_Band_Central_Wavelength), 0, 1, 0, 1},
11688  {&__pyx_n_u_Chl_Conc, __pyx_k_Chl_Conc, sizeof(__pyx_k_Chl_Conc), 0, 1, 0, 1},
11689  {&__pyx_n_s_DataArray, __pyx_k_DataArray, sizeof(__pyx_k_DataArray), 0, 0, 1, 1},
11690  {&__pyx_n_s_Dataset, __pyx_k_Dataset, sizeof(__pyx_k_Dataset), 0, 0, 1, 1},
11691  {&__pyx_kp_u_Done, __pyx_k_Done, sizeof(__pyx_k_Done), 0, 1, 0, 0},
11692  {&__pyx_n_s_FileType, __pyx_k_FileType, sizeof(__pyx_k_FileType), 0, 0, 1, 1},
11693  {&__pyx_n_u_Fine_Mode_Fraction_550, __pyx_k_Fine_Mode_Fraction_550, sizeof(__pyx_k_Fine_Mode_Fraction_550), 0, 1, 0, 1},
11694  {&__pyx_n_u_IoverF_m03, __pyx_k_IoverF_m03, sizeof(__pyx_k_IoverF_m03), 0, 1, 0, 1},
11695  {&__pyx_n_u_IoverF_m04, __pyx_k_IoverF_m04, sizeof(__pyx_k_IoverF_m04), 0, 1, 0, 1},
11696  {&__pyx_n_u_IoverF_m05, __pyx_k_IoverF_m05, sizeof(__pyx_k_IoverF_m05), 0, 1, 0, 1},
11697  {&__pyx_n_u_IoverF_m07, __pyx_k_IoverF_m07, sizeof(__pyx_k_IoverF_m07), 0, 1, 0, 1},
11698  {&__pyx_n_u_IoverF_m08, __pyx_k_IoverF_m08, sizeof(__pyx_k_IoverF_m08), 0, 1, 0, 1},
11699  {&__pyx_n_u_IoverF_m10, __pyx_k_IoverF_m10, sizeof(__pyx_k_IoverF_m10), 0, 1, 0, 1},
11700  {&__pyx_n_u_IoverF_m11, __pyx_k_IoverF_m11, sizeof(__pyx_k_IoverF_m11), 0, 1, 0, 1},
11701  {&__pyx_kp_u_LOG_CHL, __pyx_k_LOG_CHL, sizeof(__pyx_k_LOG_CHL), 0, 1, 0, 0},
11702  {&__pyx_n_u_LOG_CHL_2, __pyx_k_LOG_CHL_2, sizeof(__pyx_k_LOG_CHL_2), 0, 1, 0, 1},
11703  {&__pyx_kp_u_OCEAN_AEROSOL_DUST, __pyx_k_OCEAN_AEROSOL_DUST, sizeof(__pyx_k_OCEAN_AEROSOL_DUST), 0, 1, 0, 0},
11704  {&__pyx_kp_u_OCEAN_AEROSOL_FINE, __pyx_k_OCEAN_AEROSOL_FINE, sizeof(__pyx_k_OCEAN_AEROSOL_FINE), 0, 1, 0, 0},
11705  {&__pyx_kp_u_OCEAN_AEROSOL_MIXED, __pyx_k_OCEAN_AEROSOL_MIXED, sizeof(__pyx_k_OCEAN_AEROSOL_MIXED), 0, 1, 0, 0},
11706  {&__pyx_n_s_Parameters, __pyx_k_Parameters, sizeof(__pyx_k_Parameters), 0, 0, 1, 1},
11707  {&__pyx_kp_u_Processing_mode_0, __pyx_k_Processing_mode_0, sizeof(__pyx_k_Processing_mode_0), 0, 1, 0, 0},
11708  {&__pyx_kp_u_Reading_Deepblue_LUT, __pyx_k_Reading_Deepblue_LUT, sizeof(__pyx_k_Reading_Deepblue_LUT), 0, 1, 0, 0},
11709  {&__pyx_kp_u_Reading_sensor_data, __pyx_k_Reading_sensor_data, sizeof(__pyx_k_Reading_sensor_data), 0, 1, 0, 0},
11710  {&__pyx_n_u_Relative_Azimuth_Angle, __pyx_k_Relative_Azimuth_Angle, sizeof(__pyx_k_Relative_Azimuth_Angle), 0, 1, 0, 1},
11711  {&__pyx_n_u_Solar_Zenith_Angle, __pyx_k_Solar_Zenith_Angle, sizeof(__pyx_k_Solar_Zenith_Angle), 0, 1, 0, 1},
11712  {&__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},
11713  {&__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},
11714  {&__pyx_kp_u_Unable_to_read_from_file_exiting, __pyx_k_Unable_to_read_from_file_exiting, sizeof(__pyx_k_Unable_to_read_from_file_exiting), 0, 1, 0, 0},
11715  {&__pyx_n_u_View_Zenith_Angle, __pyx_k_View_Zenith_Angle, sizeof(__pyx_k_View_Zenith_Angle), 0, 1, 0, 1},
11716  {&__pyx_n_u_Wind_Speed, __pyx_k_Wind_Speed, sizeof(__pyx_k_Wind_Speed), 0, 1, 0, 1},
11717  {&__pyx_kp_u_Writing_to_file, __pyx_k_Writing_to_file, sizeof(__pyx_k_Writing_to_file), 0, 1, 0, 0},
11718  {&__pyx_n_s__26, __pyx_k__26, sizeof(__pyx_k__26), 0, 0, 1, 1},
11719  {&__pyx_kp_u__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0, 0},
11720  {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1},
11721  {&__pyx_n_s_add_argument, __pyx_k_add_argument, sizeof(__pyx_k_add_argument), 0, 0, 1, 1},
11722  {&__pyx_kp_u_ancillary, __pyx_k_ancillary, sizeof(__pyx_k_ancillary), 0, 1, 0, 0},
11723  {&__pyx_n_s_aot, __pyx_k_aot, sizeof(__pyx_k_aot), 0, 0, 1, 1},
11724  {&__pyx_n_u_aot, __pyx_k_aot, sizeof(__pyx_k_aot), 0, 1, 0, 1},
11725  {&__pyx_n_s_aot_pts, __pyx_k_aot_pts, sizeof(__pyx_k_aot_pts), 0, 0, 1, 1},
11726  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
11727  {&__pyx_n_s_argparse, __pyx_k_argparse, sizeof(__pyx_k_argparse), 0, 0, 1, 1},
11728  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
11729  {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
11730  {&__pyx_n_s_axis, __pyx_k_axis, sizeof(__pyx_k_axis), 0, 0, 1, 1},
11731  {&__pyx_n_u_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 1, 0, 1},
11732  {&__pyx_n_s_bounds_error, __pyx_k_bounds_error, sizeof(__pyx_k_bounds_error), 0, 0, 1, 1},
11733  {&__pyx_n_s_chl, __pyx_k_chl, sizeof(__pyx_k_chl), 0, 0, 1, 1},
11734  {&__pyx_n_u_chl, __pyx_k_chl, sizeof(__pyx_k_chl), 0, 1, 0, 1},
11735  {&__pyx_n_s_chl_lut, __pyx_k_chl_lut, sizeof(__pyx_k_chl_lut), 0, 0, 1, 1},
11736  {&__pyx_n_s_chl_pts, __pyx_k_chl_pts, sizeof(__pyx_k_chl_pts), 0, 0, 1, 1},
11737  {&__pyx_n_s_chlc, __pyx_k_chlc, sizeof(__pyx_k_chlc), 0, 0, 1, 1},
11738  {&__pyx_n_u_chlorophyll, __pyx_k_chlorophyll, sizeof(__pyx_k_chlorophyll), 0, 1, 0, 1},
11739  {&__pyx_n_s_cld, __pyx_k_cld, sizeof(__pyx_k_cld), 0, 0, 1, 1},
11740  {&__pyx_n_s_clf, __pyx_k_clf, sizeof(__pyx_k_clf), 0, 0, 1, 1},
11741  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
11742  {&__pyx_n_u_cloud_mask, __pyx_k_cloud_mask, sizeof(__pyx_k_cloud_mask), 0, 1, 0, 1},
11743  {&__pyx_n_s_coef, __pyx_k_coef, sizeof(__pyx_k_coef), 0, 0, 1, 1},
11744  {&__pyx_n_s_color, __pyx_k_color, sizeof(__pyx_k_color), 0, 0, 1, 1},
11745  {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
11746  {&__pyx_n_s_dbo, __pyx_k_dbo, sizeof(__pyx_k_dbo), 0, 0, 1, 1},
11747  {&__pyx_n_s_dbocean, __pyx_k_dbocean, sizeof(__pyx_k_dbocean), 0, 0, 1, 1},
11748  {&__pyx_n_s_dbocean___init, __pyx_k_dbocean___init, sizeof(__pyx_k_dbocean___init), 0, 0, 1, 1},
11749  {&__pyx_n_s_dbocean_minfun, __pyx_k_dbocean_minfun, sizeof(__pyx_k_dbocean_minfun), 0, 0, 1, 1},
11750  {&__pyx_kp_u_dbocean_mode_3_d_y_4_x_5_aot_0_3, __pyx_k_dbocean_mode_3_d_y_4_x_5_aot_0_3, sizeof(__pyx_k_dbocean_mode_3_d_y_4_x_5_aot_0_3), 0, 1, 0, 0},
11751  {&__pyx_n_s_dbocean_plot, __pyx_k_dbocean_plot, sizeof(__pyx_k_dbocean_plot), 0, 0, 1, 1},
11752  {&__pyx_n_s_dbocean_process, __pyx_k_dbocean_process, sizeof(__pyx_k_dbocean_process), 0, 0, 1, 1},
11753  {&__pyx_kp_s_dbocean_pyx, __pyx_k_dbocean_pyx, sizeof(__pyx_k_dbocean_pyx), 0, 0, 1, 0},
11754  {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
11755  {&__pyx_n_s_dims, __pyx_k_dims, sizeof(__pyx_k_dims), 0, 0, 1, 1},
11756  {&__pyx_n_s_dimx, __pyx_k_dimx, sizeof(__pyx_k_dimx), 0, 0, 1, 1},
11757  {&__pyx_n_s_dimy, __pyx_k_dimy, sizeof(__pyx_k_dimy), 0, 0, 1, 1},
11758  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
11759  {&__pyx_n_s_dot, __pyx_k_dot, sizeof(__pyx_k_dot), 0, 0, 1, 1},
11760  {&__pyx_n_s_ds, __pyx_k_ds, sizeof(__pyx_k_ds), 0, 0, 1, 1},
11761  {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
11762  {&__pyx_n_s_fill_value, __pyx_k_fill_value, sizeof(__pyx_k_fill_value), 0, 0, 1, 1},
11763  {&__pyx_n_s_flush, __pyx_k_flush, sizeof(__pyx_k_flush), 0, 0, 1, 1},
11764  {&__pyx_n_s_fmf, __pyx_k_fmf, sizeof(__pyx_k_fmf), 0, 0, 1, 1},
11765  {&__pyx_n_u_fmf, __pyx_k_fmf, sizeof(__pyx_k_fmf), 0, 1, 0, 1},
11766  {&__pyx_n_s_fmf_pts, __pyx_k_fmf_pts, sizeof(__pyx_k_fmf_pts), 0, 0, 1, 1},
11767  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
11768  {&__pyx_n_u_g, __pyx_k_g, sizeof(__pyx_k_g), 0, 1, 0, 1},
11769  {&__pyx_kp_u_geolocation, __pyx_k_geolocation, sizeof(__pyx_k_geolocation), 0, 1, 0, 0},
11770  {&__pyx_n_s_grid, __pyx_k_grid, sizeof(__pyx_k_grid), 0, 0, 1, 1},
11771  {&__pyx_n_s_group, __pyx_k_group, sizeof(__pyx_k_group), 0, 0, 1, 1},
11772  {&__pyx_n_s_help, __pyx_k_help, sizeof(__pyx_k_help), 0, 0, 1, 1},
11773  {&__pyx_kp_u_if, __pyx_k_if, sizeof(__pyx_k_if), 0, 1, 0, 0},
11774  {&__pyx_n_s_ifile, __pyx_k_ifile, sizeof(__pyx_k_ifile), 0, 0, 1, 1},
11775  {&__pyx_kp_u_ifile_2, __pyx_k_ifile_2, sizeof(__pyx_k_ifile_2), 0, 1, 0, 0},
11776  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
11777  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
11778  {&__pyx_n_s_input, __pyx_k_input, sizeof(__pyx_k_input), 0, 0, 1, 1},
11779  {&__pyx_n_s_input___init, __pyx_k_input___init, sizeof(__pyx_k_input___init), 0, 0, 1, 1},
11780  {&__pyx_kp_u_input_file, __pyx_k_input_file, sizeof(__pyx_k_input_file), 0, 1, 0, 0},
11781  {&__pyx_n_s_inst, __pyx_k_inst, sizeof(__pyx_k_inst), 0, 0, 1, 1},
11782  {&__pyx_n_s_interpn, __pyx_k_interpn, sizeof(__pyx_k_interpn), 0, 0, 1, 1},
11783  {&__pyx_n_s_ix, __pyx_k_ix, sizeof(__pyx_k_ix), 0, 0, 1, 1},
11784  {&__pyx_n_s_iy, __pyx_k_iy, sizeof(__pyx_k_iy), 0, 0, 1, 1},
11785  {&__pyx_n_s_l1b_filepath, __pyx_k_l1b_filepath, sizeof(__pyx_k_l1b_filepath), 0, 0, 1, 1},
11786  {&__pyx_n_s_label, __pyx_k_label, sizeof(__pyx_k_label), 0, 0, 1, 1},
11787  {&__pyx_n_s_lat, __pyx_k_lat, sizeof(__pyx_k_lat), 0, 0, 1, 1},
11788  {&__pyx_n_u_lat, __pyx_k_lat, sizeof(__pyx_k_lat), 0, 1, 0, 1},
11789  {&__pyx_n_u_latitude, __pyx_k_latitude, sizeof(__pyx_k_latitude), 0, 1, 0, 1},
11790  {&__pyx_n_s_legend, __pyx_k_legend, sizeof(__pyx_k_legend), 0, 0, 1, 1},
11791  {&__pyx_kp_u_lf, __pyx_k_lf, sizeof(__pyx_k_lf), 0, 1, 0, 0},
11792  {&__pyx_n_s_lm, __pyx_k_lm, sizeof(__pyx_k_lm), 0, 0, 1, 1},
11793  {&__pyx_n_s_lmfit, __pyx_k_lmfit, sizeof(__pyx_k_lmfit), 0, 0, 1, 1},
11794  {&__pyx_n_s_load_dataset, __pyx_k_load_dataset, sizeof(__pyx_k_load_dataset), 0, 0, 1, 1},
11795  {&__pyx_n_s_loc, __pyx_k_loc, sizeof(__pyx_k_loc), 0, 0, 1, 1},
11796  {&__pyx_n_s_lon, __pyx_k_lon, sizeof(__pyx_k_lon), 0, 0, 1, 1},
11797  {&__pyx_n_u_lon, __pyx_k_lon, sizeof(__pyx_k_lon), 0, 1, 0, 1},
11798  {&__pyx_n_u_longitude, __pyx_k_longitude, sizeof(__pyx_k_longitude), 0, 1, 0, 1},
11799  {&__pyx_kp_u_lookup_table_file, __pyx_k_lookup_table_file, sizeof(__pyx_k_lookup_table_file), 0, 1, 0, 0},
11800  {&__pyx_n_s_lut, __pyx_k_lut, sizeof(__pyx_k_lut), 0, 0, 1, 1},
11801  {&__pyx_kp_u_lut_2, __pyx_k_lut_2, sizeof(__pyx_k_lut_2), 0, 1, 0, 0},
11802  {&__pyx_n_s_lut_filepath, __pyx_k_lut_filepath, sizeof(__pyx_k_lut_filepath), 0, 0, 1, 1},
11803  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
11804  {&__pyx_n_u_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 1, 0, 1},
11805  {&__pyx_n_s_main_2, __pyx_k_main_2, sizeof(__pyx_k_main_2), 0, 0, 1, 1},
11806  {&__pyx_n_s_marker, __pyx_k_marker, sizeof(__pyx_k_marker), 0, 0, 1, 1},
11807  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
11808  {&__pyx_n_s_matplotlib_pyplot, __pyx_k_matplotlib_pyplot, sizeof(__pyx_k_matplotlib_pyplot), 0, 0, 1, 1},
11809  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
11810  {&__pyx_n_u_measured, __pyx_k_measured, sizeof(__pyx_k_measured), 0, 1, 0, 1},
11811  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
11812  {&__pyx_kp_u_mf, __pyx_k_mf, sizeof(__pyx_k_mf), 0, 1, 0, 0},
11813  {&__pyx_n_s_mfit, __pyx_k_mfit, sizeof(__pyx_k_mfit), 0, 0, 1, 1},
11814  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
11815  {&__pyx_n_s_minfun, __pyx_k_minfun, sizeof(__pyx_k_minfun), 0, 0, 1, 1},
11816  {&__pyx_n_s_minimize, __pyx_k_minimize, sizeof(__pyx_k_minimize), 0, 0, 1, 1},
11817  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
11818  {&__pyx_kp_u_mode_2, __pyx_k_mode_2, sizeof(__pyx_k_mode_2), 0, 1, 0, 0},
11819  {&__pyx_kp_u_mode_option, __pyx_k_mode_option, sizeof(__pyx_k_mode_option), 0, 1, 0, 0},
11820  {&__pyx_n_s_model, __pyx_k_model, sizeof(__pyx_k_model), 0, 0, 1, 1},
11821  {&__pyx_n_u_modeled, __pyx_k_modeled, sizeof(__pyx_k_modeled), 0, 1, 0, 1},
11822  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
11823  {&__pyx_n_s_mpts, __pyx_k_mpts, sizeof(__pyx_k_mpts), 0, 0, 1, 1},
11824  {&__pyx_n_s_mrfl, __pyx_k_mrfl, sizeof(__pyx_k_mrfl), 0, 0, 1, 1},
11825  {&__pyx_n_s_mxi, __pyx_k_mxi, sizeof(__pyx_k_mxi), 0, 0, 1, 1},
11826  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
11827  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
11828  {&__pyx_kp_u_navigation_data, __pyx_k_navigation_data, sizeof(__pyx_k_navigation_data), 0, 1, 0, 0},
11829  {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
11830  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
11831  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
11832  {&__pyx_kp_u_of, __pyx_k_of, sizeof(__pyx_k_of), 0, 1, 0, 0},
11833  {&__pyx_n_s_ofile, __pyx_k_ofile, sizeof(__pyx_k_ofile), 0, 0, 1, 1},
11834  {&__pyx_kp_u_ofile_2, __pyx_k_ofile_2, sizeof(__pyx_k_ofile_2), 0, 1, 0, 0},
11835  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
11836  {&__pyx_n_s_out_filepath, __pyx_k_out_filepath, sizeof(__pyx_k_out_filepath), 0, 0, 1, 1},
11837  {&__pyx_n_s_output, __pyx_k_output, sizeof(__pyx_k_output), 0, 0, 1, 1},
11838  {&__pyx_n_s_output___init, __pyx_k_output___init, sizeof(__pyx_k_output___init), 0, 0, 1, 1},
11839  {&__pyx_kp_u_output_file, __pyx_k_output_file, sizeof(__pyx_k_output_file), 0, 1, 0, 0},
11840  {&__pyx_n_s_output_write, __pyx_k_output_write, sizeof(__pyx_k_output_write), 0, 0, 1, 1},
11841  {&__pyx_n_s_params, __pyx_k_params, sizeof(__pyx_k_params), 0, 0, 1, 1},
11842  {&__pyx_n_s_pars, __pyx_k_pars, sizeof(__pyx_k_pars), 0, 0, 1, 1},
11843  {&__pyx_n_s_parse_args, __pyx_k_parse_args, sizeof(__pyx_k_parse_args), 0, 0, 1, 1},
11844  {&__pyx_n_s_parser, __pyx_k_parser, sizeof(__pyx_k_parser), 0, 0, 1, 1},
11845  {&__pyx_n_s_perf_counter, __pyx_k_perf_counter, sizeof(__pyx_k_perf_counter), 0, 0, 1, 1},
11846  {&__pyx_kp_u_pf, __pyx_k_pf, sizeof(__pyx_k_pf), 0, 1, 0, 0},
11847  {&__pyx_n_s_pi, __pyx_k_pi, sizeof(__pyx_k_pi), 0, 0, 1, 1},
11848  {&__pyx_n_s_plot, __pyx_k_plot, sizeof(__pyx_k_plot), 0, 0, 1, 1},
11849  {&__pyx_kp_u_plot_2, __pyx_k_plot_2, sizeof(__pyx_k_plot_2), 0, 1, 0, 0},
11850  {&__pyx_kp_u_plot_pixel_data, __pyx_k_plot_pixel_data, sizeof(__pyx_k_plot_pixel_data), 0, 1, 0, 0},
11851  {&__pyx_n_s_plt, __pyx_k_plt, sizeof(__pyx_k_plt), 0, 0, 1, 1},
11852  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
11853  {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
11854  {&__pyx_n_s_process, __pyx_k_process, sizeof(__pyx_k_process), 0, 0, 1, 1},
11855  {&__pyx_kp_u_processing_error_at_pixel, __pyx_k_processing_error_at_pixel, sizeof(__pyx_k_processing_error_at_pixel), 0, 1, 0, 0},
11856  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
11857  {&__pyx_n_u_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 1, 0, 1},
11858  {&__pyx_n_s_raa, __pyx_k_raa, sizeof(__pyx_k_raa), 0, 0, 1, 1},
11859  {&__pyx_n_u_raa, __pyx_k_raa, sizeof(__pyx_k_raa), 0, 1, 0, 1},
11860  {&__pyx_n_s_raa_pts, __pyx_k_raa_pts, sizeof(__pyx_k_raa_pts), 0, 0, 1, 1},
11861  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
11862  {&__pyx_n_s_redchi, __pyx_k_redchi, sizeof(__pyx_k_redchi), 0, 0, 1, 1},
11863  {&__pyx_n_u_reflectance, __pyx_k_reflectance, sizeof(__pyx_k_reflectance), 0, 1, 0, 1},
11864  {&__pyx_kp_u_reflectance_2, __pyx_k_reflectance_2, sizeof(__pyx_k_reflectance_2), 0, 1, 0, 0},
11865  {&__pyx_n_u_relative_azimuth, __pyx_k_relative_azimuth, sizeof(__pyx_k_relative_azimuth), 0, 1, 0, 1},
11866  {&__pyx_n_s_required, __pyx_k_required, sizeof(__pyx_k_required), 0, 0, 1, 1},
11867  {&__pyx_n_u_residual, __pyx_k_residual, sizeof(__pyx_k_residual), 0, 1, 0, 1},
11868  {&__pyx_n_s_rfl, __pyx_k_rfl, sizeof(__pyx_k_rfl), 0, 0, 1, 1},
11869  {&__pyx_n_u_rfl, __pyx_k_rfl, sizeof(__pyx_k_rfl), 0, 1, 0, 1},
11870  {&__pyx_n_s_rlut, __pyx_k_rlut, sizeof(__pyx_k_rlut), 0, 0, 1, 1},
11871  {&__pyx_n_s_rpts, __pyx_k_rpts, sizeof(__pyx_k_rpts), 0, 0, 1, 1},
11872  {&__pyx_n_s_rsd, __pyx_k_rsd, sizeof(__pyx_k_rsd), 0, 0, 1, 1},
11873  {&__pyx_n_s_rxi, __pyx_k_rxi, sizeof(__pyx_k_rxi), 0, 0, 1, 1},
11874  {&__pyx_n_s_scale, __pyx_k_scale, sizeof(__pyx_k_scale), 0, 0, 1, 1},
11875  {&__pyx_n_s_scipy_interpolate, __pyx_k_scipy_interpolate, sizeof(__pyx_k_scipy_interpolate), 0, 0, 1, 1},
11876  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
11877  {&__pyx_n_u_sensor_zenith, __pyx_k_sensor_zenith, sizeof(__pyx_k_sensor_zenith), 0, 1, 0, 1},
11878  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
11879  {&__pyx_n_s_show, __pyx_k_show, sizeof(__pyx_k_show), 0, 0, 1, 1},
11880  {&__pyx_n_u_solar_zenith, __pyx_k_solar_zenith, sizeof(__pyx_k_solar_zenith), 0, 1, 0, 1},
11881  {&__pyx_kp_u_square_side, __pyx_k_square_side, sizeof(__pyx_k_square_side), 0, 1, 0, 0},
11882  {&__pyx_n_s_sse, __pyx_k_sse, sizeof(__pyx_k_sse), 0, 0, 1, 1},
11883  {&__pyx_n_u_sse, __pyx_k_sse, sizeof(__pyx_k_sse), 0, 1, 0, 1},
11884  {&__pyx_n_s_stack, __pyx_k_stack, sizeof(__pyx_k_stack), 0, 0, 1, 1},
11885  {&__pyx_kp_u_start_line, __pyx_k_start_line, sizeof(__pyx_k_start_line), 0, 1, 0, 0},
11886  {&__pyx_kp_u_start_pixel, __pyx_k_start_pixel, sizeof(__pyx_k_start_pixel), 0, 1, 0, 0},
11887  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
11888  {&__pyx_n_s_sza, __pyx_k_sza, sizeof(__pyx_k_sza), 0, 0, 1, 1},
11889  {&__pyx_n_u_sza, __pyx_k_sza, sizeof(__pyx_k_sza), 0, 1, 0, 1},
11890  {&__pyx_n_s_sza_pts, __pyx_k_sza_pts, sizeof(__pyx_k_sza_pts), 0, 0, 1, 1},
11891  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
11892  {&__pyx_n_s_tic, __pyx_k_tic, sizeof(__pyx_k_tic), 0, 0, 1, 1},
11893  {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
11894  {&__pyx_n_s_title, __pyx_k_title, sizeof(__pyx_k_title), 0, 0, 1, 1},
11895  {&__pyx_n_s_tlut, __pyx_k_tlut, sizeof(__pyx_k_tlut), 0, 0, 1, 1},
11896  {&__pyx_n_s_to_netcdf, __pyx_k_to_netcdf, sizeof(__pyx_k_to_netcdf), 0, 0, 1, 1},
11897  {&__pyx_n_u_toa_reflectance, __pyx_k_toa_reflectance, sizeof(__pyx_k_toa_reflectance), 0, 1, 0, 1},
11898  {&__pyx_n_s_toc, __pyx_k_toc, sizeof(__pyx_k_toc), 0, 0, 1, 1},
11899  {&__pyx_n_s_tpp, __pyx_k_tpp, sizeof(__pyx_k_tpp), 0, 0, 1, 1},
11900  {&__pyx_n_s_transpose, __pyx_k_transpose, sizeof(__pyx_k_transpose), 0, 0, 1, 1},
11901  {&__pyx_n_s_trp, __pyx_k_trp, sizeof(__pyx_k_trp), 0, 0, 1, 1},
11902  {&__pyx_n_s_tstr, __pyx_k_tstr, sizeof(__pyx_k_tstr), 0, 0, 1, 1},
11903  {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
11904  {&__pyx_kp_u_upper_right, __pyx_k_upper_right, sizeof(__pyx_k_upper_right), 0, 1, 0, 0},
11905  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
11906  {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
11907  {&__pyx_n_s_vin, __pyx_k_vin, sizeof(__pyx_k_vin), 0, 0, 1, 1},
11908  {&__pyx_n_s_vout, __pyx_k_vout, sizeof(__pyx_k_vout), 0, 0, 1, 1},
11909  {&__pyx_n_s_vza, __pyx_k_vza, sizeof(__pyx_k_vza), 0, 0, 1, 1},
11910  {&__pyx_n_u_vza, __pyx_k_vza, sizeof(__pyx_k_vza), 0, 1, 0, 1},
11911  {&__pyx_n_s_vza_pts, __pyx_k_vza_pts, sizeof(__pyx_k_vza_pts), 0, 0, 1, 1},
11912  {&__pyx_n_u_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 1, 0, 1},
11913  {&__pyx_kp_u_wavelength_nm, __pyx_k_wavelength_nm, sizeof(__pyx_k_wavelength_nm), 0, 1, 0, 0},
11914  {&__pyx_n_u_wind_speed, __pyx_k_wind_speed, sizeof(__pyx_k_wind_speed), 0, 1, 0, 1},
11915  {&__pyx_n_u_wl, __pyx_k_wl, sizeof(__pyx_k_wl), 0, 1, 0, 1},
11916  {&__pyx_n_s_wl_pts, __pyx_k_wl_pts, sizeof(__pyx_k_wl_pts), 0, 0, 1, 1},
11917  {&__pyx_n_s_wnd, __pyx_k_wnd, sizeof(__pyx_k_wnd), 0, 0, 1, 1},
11918  {&__pyx_n_u_wnd, __pyx_k_wnd, sizeof(__pyx_k_wnd), 0, 1, 0, 1},
11919  {&__pyx_n_s_wnd_pts, __pyx_k_wnd_pts, sizeof(__pyx_k_wnd_pts), 0, 0, 1, 1},
11920  {&__pyx_n_s_wndc, __pyx_k_wndc, sizeof(__pyx_k_wndc), 0, 0, 1, 1},
11921  {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
11922  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
11923  {&__pyx_n_u_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 1, 0, 1},
11924  {&__pyx_n_s_xarray, __pyx_k_xarray, sizeof(__pyx_k_xarray), 0, 0, 1, 1},
11925  {&__pyx_n_s_xdim, __pyx_k_xdim, sizeof(__pyx_k_xdim), 0, 0, 1, 1},
11926  {&__pyx_n_s_xi, __pyx_k_xi, sizeof(__pyx_k_xi), 0, 0, 1, 1},
11927  {&__pyx_n_s_xlabel, __pyx_k_xlabel, sizeof(__pyx_k_xlabel), 0, 0, 1, 1},
11928  {&__pyx_n_s_xr, __pyx_k_xr, sizeof(__pyx_k_xr), 0, 0, 1, 1},
11929  {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1},
11930  {&__pyx_n_u_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 1, 0, 1},
11931  {&__pyx_n_s_ydim, __pyx_k_ydim, sizeof(__pyx_k_ydim), 0, 0, 1, 1},
11932  {&__pyx_n_s_ylabel, __pyx_k_ylabel, sizeof(__pyx_k_ylabel), 0, 0, 1, 1},
11933  {&__pyx_n_s_z, __pyx_k_z, sizeof(__pyx_k_z), 0, 0, 1, 1},
11934  {&__pyx_n_u_z, __pyx_k_z, sizeof(__pyx_k_z), 0, 1, 0, 1},
11935  {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
11936  {0, 0, 0, 0, 0, 0, 0}
11937 };
11938 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
11939  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 33, __pyx_L1_error)
11940  __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 36, __pyx_L1_error)
11941  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 262, __pyx_L1_error)
11942  return 0;
11943  __pyx_L1_error:;
11944  return -1;
11945 }
11946 
11947 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
11948  __Pyx_RefNannyDeclarations
11949  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
11950 
11951  /* "dbocean.pyx":43
11952  * fmf_pts = np.zeros((NFMF))
11953  * try:
11954  * self.lut[W470][:,:,0:NF1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_DUST')['IoverF_m03'] # <<<<<<<<<<<<<<
11955  * self.lut[W470][:,:,NF1-1:NF2-1,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_MIXED')['IoverF_m03']
11956  * self.lut[W470][:,:,NF2-2:NFMF,:,:,:,:]=xr.load_dataset(lut_filepath,group='/OCEAN_AEROSOL_FINE')['IoverF_m03']
11957  */
11958  __pyx_slice_ = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice_)) __PYX_ERR(0, 43, __pyx_L1_error)
11959  __Pyx_GOTREF(__pyx_slice_);
11960  __Pyx_GIVEREF(__pyx_slice_);
11961 
11962  /* "dbocean.pyx":82
11963  * self.rpts = (chl_pts, wnd_pts, raa_pts, vza_pts, sza_pts)
11964  * self.mpts = (fmf_pts, aot_pts)
11965  * self.lut = np.transpose(self.lut, (1,2,5,6,7,3,4,0)) # <<<<<<<<<<<<<<
11966  * elif(self.mode==2):
11967  * self.rpts = (wnd_pts, raa_pts, vza_pts, sza_pts)
11968  */
11969  __pyx_tuple__2 = PyTuple_Pack(8, __pyx_int_1, __pyx_int_2, __pyx_int_5, __pyx_int_6, __pyx_int_7, __pyx_int_3, __pyx_int_4, __pyx_int_0); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 82, __pyx_L1_error)
11970  __Pyx_GOTREF(__pyx_tuple__2);
11971  __Pyx_GIVEREF(__pyx_tuple__2);
11972 
11973  /* "dbocean.pyx":86
11974  * self.rpts = (wnd_pts, raa_pts, vza_pts, sza_pts)
11975  * self.mpts = (fmf_pts, aot_pts, chl_pts)
11976  * self.lut = np.transpose(self.lut, (2,5,6,7,3,4,1,0)) # <<<<<<<<<<<<<<
11977  * self.pars.add(name='chl', value=-2.0, min=-10.0, max=2.0)
11978  * elif(self.mode==3):
11979  */
11980  __pyx_tuple__3 = PyTuple_Pack(8, __pyx_int_2, __pyx_int_5, __pyx_int_6, __pyx_int_7, __pyx_int_3, __pyx_int_4, __pyx_int_1, __pyx_int_0); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 86, __pyx_L1_error)
11981  __Pyx_GOTREF(__pyx_tuple__3);
11982  __Pyx_GIVEREF(__pyx_tuple__3);
11983 
11984  /* "dbocean.pyx":91
11985  * self.rpts = (chl_pts, raa_pts, vza_pts, sza_pts)
11986  * self.mpts = (fmf_pts, aot_pts, wnd_pts)
11987  * self.lut = np.transpose(self.lut, (1,5,6,7,3,4,2,0)) # <<<<<<<<<<<<<<
11988  * self.pars.add(name='wnd', value=1.0, min=0, max=100)
11989  * elif(self.mode==4):
11990  */
11991  __pyx_tuple__4 = PyTuple_Pack(8, __pyx_int_1, __pyx_int_5, __pyx_int_6, __pyx_int_7, __pyx_int_3, __pyx_int_4, __pyx_int_2, __pyx_int_0); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 91, __pyx_L1_error)
11992  __Pyx_GOTREF(__pyx_tuple__4);
11993  __Pyx_GIVEREF(__pyx_tuple__4);
11994 
11995  /* "dbocean.pyx":96
11996  * self.rpts = (raa_pts, vza_pts, sza_pts)
11997  * self.mpts = (fmf_pts, aot_pts, chl_pts, wnd_pts)
11998  * self.lut = np.transpose(self.lut, (5,6,7,3,4,1,2,0)) # <<<<<<<<<<<<<<
11999  * self.pars.add(name='chl', value=-2.0, min=-10.0, max=2.0)
12000  * self.pars.add(name='wnd', value=1.0, min=0, max=100)
12001  */
12002  __pyx_tuple__5 = PyTuple_Pack(8, __pyx_int_5, __pyx_int_6, __pyx_int_7, __pyx_int_3, __pyx_int_4, __pyx_int_1, __pyx_int_2, __pyx_int_0); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 96, __pyx_L1_error)
12003  __Pyx_GOTREF(__pyx_tuple__5);
12004  __Pyx_GIVEREF(__pyx_tuple__5);
12005 
12006  /* "dbocean.pyx":102
12007  * print(type(inst))
12008  * print(inst)
12009  * print ("Unable to read LUT file ... exiting") # <<<<<<<<<<<<<<
12010  * sys.exit()
12011  *
12012  */
12013  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Unable_to_read_LUT_file_exiting); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 102, __pyx_L1_error)
12014  __Pyx_GOTREF(__pyx_tuple__6);
12015  __Pyx_GIVEREF(__pyx_tuple__6);
12016 
12017  /* "dbocean.pyx":182
12018  * print ("Reading sensor data: " + self.ifile)
12019  * try:
12020  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:], # <<<<<<<<<<<<<<
12021  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:],axis=0)
12022  * self.sza = xr.load_dataset(l1b_filepath,group='/geolocation')['solar_zenith'].values
12023  */
12024  __pyx_slice__8 = PySlice_New(__pyx_int_2, __pyx_int_7, Py_None); if (unlikely(!__pyx_slice__8)) __PYX_ERR(0, 182, __pyx_L1_error)
12025  __Pyx_GOTREF(__pyx_slice__8);
12026  __Pyx_GIVEREF(__pyx_slice__8);
12027  __pyx_tuple__9 = PyTuple_Pack(3, __pyx_slice__8, __pyx_slice_, __pyx_slice_); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 182, __pyx_L1_error)
12028  __Pyx_GOTREF(__pyx_tuple__9);
12029  __Pyx_GIVEREF(__pyx_tuple__9);
12030 
12031  /* "dbocean.pyx":183
12032  * try:
12033  * self.rfl = np.append(xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][2:7,:,:],
12034  * xr.load_dataset(l1b_filepath,group='/reflectance')['toa_reflectance'][8:,:,:],axis=0) # <<<<<<<<<<<<<<
12035  * self.sza = xr.load_dataset(l1b_filepath,group='/geolocation')['solar_zenith'].values
12036  * self.vza = xr.load_dataset(l1b_filepath,group='/geolocation')['sensor_zenith'].values
12037  */
12038  __pyx_slice__10 = PySlice_New(__pyx_int_8, Py_None, Py_None); if (unlikely(!__pyx_slice__10)) __PYX_ERR(0, 183, __pyx_L1_error)
12039  __Pyx_GOTREF(__pyx_slice__10);
12040  __Pyx_GIVEREF(__pyx_slice__10);
12041  __pyx_tuple__11 = PyTuple_Pack(3, __pyx_slice__10, __pyx_slice_, __pyx_slice_); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 183, __pyx_L1_error)
12042  __Pyx_GOTREF(__pyx_tuple__11);
12043  __Pyx_GIVEREF(__pyx_tuple__11);
12044 
12045  /* "dbocean.pyx":192
12046  * self.wnd = xr.load_dataset(l1b_filepath,group='/ancillary')['wind_speed'].values
12047  * self.chl = xr.load_dataset(l1b_filepath,group='/ancillary')['chlorophyll'].values
12048  * self.rfl = np.transpose(self.rfl, (1,2,0)) # <<<<<<<<<<<<<<
12049  * self.shape = self.sza.shape
12050  * except Exception as inst:
12051  */
12052  __pyx_tuple__12 = PyTuple_Pack(3, __pyx_int_1, __pyx_int_2, __pyx_int_0); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 192, __pyx_L1_error)
12053  __Pyx_GOTREF(__pyx_tuple__12);
12054  __Pyx_GIVEREF(__pyx_tuple__12);
12055 
12056  /* "dbocean.pyx":197
12057  * print(type(inst))
12058  * print(inst)
12059  * print ("Unable to read from file ... exiting") # <<<<<<<<<<<<<<
12060  * sys.exit()
12061  *
12062  */
12063  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_u_Unable_to_read_from_file_exiting); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 197, __pyx_L1_error)
12064  __Pyx_GOTREF(__pyx_tuple__13);
12065  __Pyx_GIVEREF(__pyx_tuple__13);
12066 
12067  /* "dbocean.pyx":207
12068  * self.xdim = xdim
12069  * try:
12070  * rfl = xr.DataArray(np.zeros((NWL,ydim,xdim)),dims=('wl','y', 'x')) # <<<<<<<<<<<<<<
12071  * lat = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12072  * lon = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12073  */
12074  __pyx_tuple__14 = PyTuple_Pack(3, __pyx_n_u_wl, __pyx_n_u_y, __pyx_n_u_x); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 207, __pyx_L1_error)
12075  __Pyx_GOTREF(__pyx_tuple__14);
12076  __Pyx_GIVEREF(__pyx_tuple__14);
12077 
12078  /* "dbocean.pyx":208
12079  * try:
12080  * rfl = xr.DataArray(np.zeros((NWL,ydim,xdim)),dims=('wl','y', 'x'))
12081  * lat = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x')) # <<<<<<<<<<<<<<
12082  * lon = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12083  * sza = xr.DataArray(np.zeros((ydim,xdim)),dims=('y', 'x'))
12084  */
12085  __pyx_tuple__15 = PyTuple_Pack(2, __pyx_n_u_y, __pyx_n_u_x); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 208, __pyx_L1_error)
12086  __Pyx_GOTREF(__pyx_tuple__15);
12087  __Pyx_GIVEREF(__pyx_tuple__15);
12088 
12089  /* "dbocean.pyx":225
12090  * print(type(inst))
12091  * print(inst)
12092  * print ("Unable to initialize output file ... exiting") # <<<<<<<<<<<<<<
12093  * sys.exit()
12094  *
12095  */
12096  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_u_Unable_to_initialize_output_file); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 225, __pyx_L1_error)
12097  __Pyx_GOTREF(__pyx_tuple__16);
12098  __Pyx_GIVEREF(__pyx_tuple__16);
12099 
12100  /* "dbocean.pyx":235
12101  *
12102  * parser = argparse.ArgumentParser()
12103  * parser.add_argument("-if", "--ifile", type=argparse.FileType('r'), # <<<<<<<<<<<<<<
12104  * help="input file", required=True)
12105  * parser.add_argument("-of", "--ofile", type=argparse.FileType('w'),
12106  */
12107  __pyx_tuple__17 = PyTuple_Pack(2, __pyx_kp_u_if, __pyx_kp_u_ifile_2); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 235, __pyx_L1_error)
12108  __Pyx_GOTREF(__pyx_tuple__17);
12109  __Pyx_GIVEREF(__pyx_tuple__17);
12110 
12111  /* "dbocean.pyx":237
12112  * parser.add_argument("-if", "--ifile", type=argparse.FileType('r'),
12113  * help="input file", required=True)
12114  * parser.add_argument("-of", "--ofile", type=argparse.FileType('w'), # <<<<<<<<<<<<<<
12115  * help="output file", required=False)
12116  * parser.add_argument("-lf", "--lut", type=argparse.FileType('r'),
12117  */
12118  __pyx_tuple__18 = PyTuple_Pack(2, __pyx_kp_u_of, __pyx_kp_u_ofile_2); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 237, __pyx_L1_error)
12119  __Pyx_GOTREF(__pyx_tuple__18);
12120  __Pyx_GIVEREF(__pyx_tuple__18);
12121 
12122  /* "dbocean.pyx":239
12123  * parser.add_argument("-of", "--ofile", type=argparse.FileType('w'),
12124  * help="output file", required=False)
12125  * parser.add_argument("-lf", "--lut", type=argparse.FileType('r'), # <<<<<<<<<<<<<<
12126  * help="lookup table file", required=True)
12127  * parser.add_argument("-pf", "--plot", type=bool, default=False,
12128  */
12129  __pyx_tuple__19 = PyTuple_Pack(2, __pyx_kp_u_lf, __pyx_kp_u_lut_2); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 239, __pyx_L1_error)
12130  __Pyx_GOTREF(__pyx_tuple__19);
12131  __Pyx_GIVEREF(__pyx_tuple__19);
12132 
12133  /* "dbocean.pyx":241
12134  * parser.add_argument("-lf", "--lut", type=argparse.FileType('r'),
12135  * help="lookup table file", required=True)
12136  * parser.add_argument("-pf", "--plot", type=bool, default=False, # <<<<<<<<<<<<<<
12137  * help="plot pixel data", required=False)
12138  * parser.add_argument("-mf", "--mode", type=int, default=0,
12139  */
12140  __pyx_tuple__20 = PyTuple_Pack(2, __pyx_kp_u_pf, __pyx_kp_u_plot_2); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 241, __pyx_L1_error)
12141  __Pyx_GOTREF(__pyx_tuple__20);
12142  __Pyx_GIVEREF(__pyx_tuple__20);
12143 
12144  /* "dbocean.pyx":243
12145  * parser.add_argument("-pf", "--plot", type=bool, default=False,
12146  * help="plot pixel data", required=False)
12147  * parser.add_argument("-mf", "--mode", type=int, default=0, # <<<<<<<<<<<<<<
12148  * help="mode option", required=False)
12149  * parser.add_argument("y", type=int, help="start line")
12150  */
12151  __pyx_tuple__21 = PyTuple_Pack(2, __pyx_kp_u_mf, __pyx_kp_u_mode_2); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 243, __pyx_L1_error)
12152  __Pyx_GOTREF(__pyx_tuple__21);
12153  __Pyx_GIVEREF(__pyx_tuple__21);
12154 
12155  /* "dbocean.pyx":245
12156  * parser.add_argument("-mf", "--mode", type=int, default=0,
12157  * help="mode option", required=False)
12158  * parser.add_argument("y", type=int, help="start line") # <<<<<<<<<<<<<<
12159  * parser.add_argument("x", type=int, help="start pixel")
12160  * parser.add_argument("z", type=int, help="square side ")
12161  */
12162  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_n_u_y); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 245, __pyx_L1_error)
12163  __Pyx_GOTREF(__pyx_tuple__22);
12164  __Pyx_GIVEREF(__pyx_tuple__22);
12165 
12166  /* "dbocean.pyx":246
12167  * help="mode option", required=False)
12168  * parser.add_argument("y", type=int, help="start line")
12169  * parser.add_argument("x", type=int, help="start pixel") # <<<<<<<<<<<<<<
12170  * parser.add_argument("z", type=int, help="square side ")
12171  *
12172  */
12173  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_n_u_x); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 246, __pyx_L1_error)
12174  __Pyx_GOTREF(__pyx_tuple__23);
12175  __Pyx_GIVEREF(__pyx_tuple__23);
12176 
12177  /* "dbocean.pyx":247
12178  * parser.add_argument("y", type=int, help="start line")
12179  * parser.add_argument("x", type=int, help="start pixel")
12180  * parser.add_argument("z", type=int, help="square side ") # <<<<<<<<<<<<<<
12181  *
12182  * args = parser.parse_args()
12183  */
12184  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_n_u_z); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 247, __pyx_L1_error)
12185  __Pyx_GOTREF(__pyx_tuple__24);
12186  __Pyx_GIVEREF(__pyx_tuple__24);
12187 
12188  /* "dbocean.pyx":297
12189  * # print('.', end = '', flush=True)
12190  * print(iy, tpp, flush=True)
12191  * print(' Done!') # <<<<<<<<<<<<<<
12192  * vout.write()
12193  *
12194  */
12195  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_u_Done); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 297, __pyx_L1_error)
12196  __Pyx_GOTREF(__pyx_tuple__25);
12197  __Pyx_GIVEREF(__pyx_tuple__25);
12198 
12199  /* "dbocean.pyx":33
12200  * cdef int D2R = np.pi/180.0
12201  *
12202  * class dbocean(object): # <<<<<<<<<<<<<<
12203  *
12204  * def __init__(self, lut_filepath, mode):
12205  */
12206  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 33, __pyx_L1_error)
12207  __Pyx_GOTREF(__pyx_tuple__27);
12208  __Pyx_GIVEREF(__pyx_tuple__27);
12209 
12210  /* "dbocean.pyx":35
12211  * class dbocean(object):
12212  *
12213  * def __init__(self, lut_filepath, mode): # <<<<<<<<<<<<<<
12214  * print ("Reading Deepblue LUT: " + lut_filepath)
12215  * self.mode = mode
12216  */
12217  __pyx_tuple__28 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_lut_filepath, __pyx_n_s_mode, __pyx_n_s_fmf_pts, __pyx_n_s_raa_pts, __pyx_n_s_vza_pts, __pyx_n_s_sza_pts, __pyx_n_s_wnd_pts, __pyx_n_s_chl_pts, __pyx_n_s_aot_pts, __pyx_n_s_inst); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 35, __pyx_L1_error)
12218  __Pyx_GOTREF(__pyx_tuple__28);
12219  __Pyx_GIVEREF(__pyx_tuple__28);
12220  __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dbocean_pyx, __pyx_n_s_init, 35, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 35, __pyx_L1_error)
12221 
12222  /* "dbocean.pyx":105
12223  * sys.exit()
12224  *
12225  * def minfun(self, pars, data, scale, rlut): # <<<<<<<<<<<<<<
12226  * if(self.mode==0 or self.mode==1):
12227  * rxi = np.stack((pars['fmf'], pars['aot']))
12228  */
12229  __pyx_tuple__30 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_pars, __pyx_n_s_data, __pyx_n_s_scale, __pyx_n_s_rlut, __pyx_n_s_rxi, __pyx_n_s_model); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 105, __pyx_L1_error)
12230  __Pyx_GOTREF(__pyx_tuple__30);
12231  __Pyx_GIVEREF(__pyx_tuple__30);
12232  __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dbocean_pyx, __pyx_n_s_minfun, 105, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 105, __pyx_L1_error)
12233 
12234  /* "dbocean.pyx":118
12235  * return (model - data)*scale
12236  *
12237  * def process(self,rfl,sza,vza,raa,wnd,chl): # <<<<<<<<<<<<<<
12238  * if(self.mode==0 or self.mode==1):
12239  * if(self.mode==1):
12240  */
12241  __pyx_tuple__32 = PyTuple_Pack(13, __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_chl, __pyx_n_s_xi, __pyx_n_s_tlut, __pyx_n_s_scale, __pyx_n_s_mfit, __pyx_n_s_mxi, __pyx_n_s_mrfl); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 118, __pyx_L1_error)
12242  __Pyx_GOTREF(__pyx_tuple__32);
12243  __Pyx_GIVEREF(__pyx_tuple__32);
12244  __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(7, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dbocean_pyx, __pyx_n_s_process, 118, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 118, __pyx_L1_error)
12245 
12246  /* "dbocean.pyx":162
12247  * return self.fmf, self.aot, self.chl, self.wnd, self.sse
12248  *
12249  * def plot(self, iy, ix): # <<<<<<<<<<<<<<
12250  * plt.clf()
12251  * plt.grid(True)
12252  */
12253  __pyx_tuple__34 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_iy, __pyx_n_s_ix, __pyx_n_s_tstr); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 162, __pyx_L1_error)
12254  __Pyx_GOTREF(__pyx_tuple__34);
12255  __Pyx_GIVEREF(__pyx_tuple__34);
12256  __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_dbocean_pyx, __pyx_n_s_plot, 162, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 162, __pyx_L1_error)
12257 
12258  /* "dbocean.pyx":176
12259  *
12260  *
12261  * class input(object): # <<<<<<<<<<<<<<
12262  *
12263  * def __init__(self, l1b_filepath):
12264  */
12265  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 176, __pyx_L1_error)
12266  __Pyx_GOTREF(__pyx_tuple__36);
12267  __Pyx_GIVEREF(__pyx_tuple__36);
12268 
12269  /* "dbocean.pyx":178
12270  * class input(object):
12271  *
12272  * def __init__(self, l1b_filepath): # <<<<<<<<<<<<<<
12273  * self.ifile = l1b_filepath
12274  * print ("Reading sensor data: " + self.ifile)
12275  */
12276  __pyx_tuple__37 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_l1b_filepath, __pyx_n_s_inst); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 178, __pyx_L1_error)
12277  __Pyx_GOTREF(__pyx_tuple__37);
12278  __Pyx_GIVEREF(__pyx_tuple__37);
12279  __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dbocean_pyx, __pyx_n_s_init, 178, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 178, __pyx_L1_error)
12280 
12281  /* "dbocean.pyx":200
12282  * sys.exit()
12283  *
12284  * class output(object): # <<<<<<<<<<<<<<
12285  *
12286  * def __init__(self, out_filepath, ydim, xdim):
12287  */
12288  __pyx_tuple__39 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 200, __pyx_L1_error)
12289  __Pyx_GOTREF(__pyx_tuple__39);
12290  __Pyx_GIVEREF(__pyx_tuple__39);
12291 
12292  /* "dbocean.pyx":202
12293  * class output(object):
12294  *
12295  * def __init__(self, out_filepath, ydim, xdim): # <<<<<<<<<<<<<<
12296  * self.ofile = out_filepath
12297  * self.ydim = ydim
12298  */
12299  __pyx_tuple__40 = PyTuple_Pack(16, __pyx_n_s_self, __pyx_n_s_out_filepath, __pyx_n_s_ydim, __pyx_n_s_xdim, __pyx_n_s_rfl, __pyx_n_s_lat, __pyx_n_s_lon, __pyx_n_s_sza, __pyx_n_s_vza, __pyx_n_s_raa, __pyx_n_s_wnd, __pyx_n_s_chl, __pyx_n_s_aot, __pyx_n_s_fmf, __pyx_n_s_sse, __pyx_n_s_inst); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 202, __pyx_L1_error)
12300  __Pyx_GOTREF(__pyx_tuple__40);
12301  __Pyx_GIVEREF(__pyx_tuple__40);
12302  __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(4, 0, 16, 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_dbocean_pyx, __pyx_n_s_init, 202, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 202, __pyx_L1_error)
12303 
12304  /* "dbocean.pyx":228
12305  * sys.exit()
12306  *
12307  * def write(self): # <<<<<<<<<<<<<<
12308  * print ("Writing to file: " + self.ofile)
12309  * self.ds.to_netcdf(self.ofile)
12310  */
12311  __pyx_tuple__42 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 228, __pyx_L1_error)
12312  __Pyx_GOTREF(__pyx_tuple__42);
12313  __Pyx_GIVEREF(__pyx_tuple__42);
12314  __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_dbocean_pyx, __pyx_n_s_write, 228, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 228, __pyx_L1_error)
12315 
12316  /* "dbocean.pyx":232
12317  * self.ds.to_netcdf(self.ofile)
12318  *
12319  * def main(): # <<<<<<<<<<<<<<
12320  *
12321  * parser = argparse.ArgumentParser()
12322  */
12323  __pyx_tuple__44 = PyTuple_Pack(18, __pyx_n_s_parser, __pyx_n_s_args, __pyx_n_s_vin, __pyx_n_s_dimx, __pyx_n_s_dimy, __pyx_n_s_vout, __pyx_n_s_dbo, __pyx_n_s_iy, __pyx_n_s_tic, __pyx_n_s_ix, __pyx_n_s_fmf, __pyx_n_s_aot, __pyx_n_s_chl, __pyx_n_s_wnd, __pyx_n_s_sse, __pyx_n_s_inst, __pyx_n_s_toc, __pyx_n_s_tpp); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 232, __pyx_L1_error)
12324  __Pyx_GOTREF(__pyx_tuple__44);
12325  __Pyx_GIVEREF(__pyx_tuple__44);
12326  __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(0, 0, 18, 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_dbocean_pyx, __pyx_n_s_main_2, 232, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 232, __pyx_L1_error)
12327  __Pyx_RefNannyFinishContext();
12328  return 0;
12329  __pyx_L1_error:;
12330  __Pyx_RefNannyFinishContext();
12331  return -1;
12332 }
12333 
12334 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
12335  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
12336  __pyx_float_0_1 = PyFloat_FromDouble(0.1); if (unlikely(!__pyx_float_0_1)) __PYX_ERR(0, 1, __pyx_L1_error)
12337  __pyx_float_0_5 = PyFloat_FromDouble(0.5); if (unlikely(!__pyx_float_0_5)) __PYX_ERR(0, 1, __pyx_L1_error)
12338  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
12339  __pyx_float_2_0 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_float_2_0)) __PYX_ERR(0, 1, __pyx_L1_error)
12340  __pyx_float_0_04 = PyFloat_FromDouble(0.04); if (unlikely(!__pyx_float_0_04)) __PYX_ERR(0, 1, __pyx_L1_error)
12341  __pyx_float_0_06 = PyFloat_FromDouble(0.06); if (unlikely(!__pyx_float_0_06)) __PYX_ERR(0, 1, __pyx_L1_error)
12342  __pyx_float_0_07 = PyFloat_FromDouble(0.07); if (unlikely(!__pyx_float_0_07)) __PYX_ERR(0, 1, __pyx_L1_error)
12343  __pyx_float_180_0 = PyFloat_FromDouble(180.0); if (unlikely(!__pyx_float_180_0)) __PYX_ERR(0, 1, __pyx_L1_error)
12344  __pyx_float_0_00001 = PyFloat_FromDouble(0.00001); if (unlikely(!__pyx_float_0_00001)) __PYX_ERR(0, 1, __pyx_L1_error)
12345  __pyx_float_neg_2_0 = PyFloat_FromDouble(-2.0); if (unlikely(!__pyx_float_neg_2_0)) __PYX_ERR(0, 1, __pyx_L1_error)
12346  __pyx_float_neg_10_0 = PyFloat_FromDouble(-10.0); if (unlikely(!__pyx_float_neg_10_0)) __PYX_ERR(0, 1, __pyx_L1_error)
12347  __pyx_float_neg_999_9 = PyFloat_FromDouble(-999.9); if (unlikely(!__pyx_float_neg_999_9)) __PYX_ERR(0, 1, __pyx_L1_error)
12348  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
12349  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
12350  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
12351  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
12352  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
12353  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
12354  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(0, 1, __pyx_L1_error)
12355  __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) __PYX_ERR(0, 1, __pyx_L1_error)
12356  __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) __PYX_ERR(0, 1, __pyx_L1_error)
12357  __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) __PYX_ERR(0, 1, __pyx_L1_error)
12358  __pyx_int_neg_999 = PyInt_FromLong(-999); if (unlikely(!__pyx_int_neg_999)) __PYX_ERR(0, 1, __pyx_L1_error)
12359  return 0;
12360  __pyx_L1_error:;
12361  return -1;
12362 }
12363 
12364 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
12365 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
12366 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
12367 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
12368 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
12369 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
12370 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
12371 
12372 static int __Pyx_modinit_global_init_code(void) {
12373  __Pyx_RefNannyDeclarations
12374  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
12375  /*--- Global init code ---*/
12376  __Pyx_RefNannyFinishContext();
12377  return 0;
12378 }
12379 
12380 static int __Pyx_modinit_variable_export_code(void) {
12381  __Pyx_RefNannyDeclarations
12382  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
12383  /*--- Variable export code ---*/
12384  __Pyx_RefNannyFinishContext();
12385  return 0;
12386 }
12387 
12388 static int __Pyx_modinit_function_export_code(void) {
12389  __Pyx_RefNannyDeclarations
12390  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
12391  /*--- Function export code ---*/
12392  __Pyx_RefNannyFinishContext();
12393  return 0;
12394 }
12395 
12396 static int __Pyx_modinit_type_init_code(void) {
12397  __Pyx_RefNannyDeclarations
12398  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
12399  /*--- Type init code ---*/
12400  __Pyx_RefNannyFinishContext();
12401  return 0;
12402 }
12403 
12404 static int __Pyx_modinit_type_import_code(void) {
12405  __Pyx_RefNannyDeclarations
12406  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
12407  /*--- Type import code ---*/
12408  __Pyx_RefNannyFinishContext();
12409  return 0;
12410 }
12411 
12412 static int __Pyx_modinit_variable_import_code(void) {
12413  __Pyx_RefNannyDeclarations
12414  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
12415  /*--- Variable import code ---*/
12416  __Pyx_RefNannyFinishContext();
12417  return 0;
12418 }
12419 
12420 static int __Pyx_modinit_function_import_code(void) {
12421  __Pyx_RefNannyDeclarations
12422  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
12423  /*--- Function import code ---*/
12424  __Pyx_RefNannyFinishContext();
12425  return 0;
12426 }
12427 
12428 
12429 #ifndef CYTHON_NO_PYINIT_EXPORT
12430 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
12431 #elif PY_MAJOR_VERSION < 3
12432 #ifdef __cplusplus
12433 #define __Pyx_PyMODINIT_FUNC extern "C" void
12434 #else
12435 #define __Pyx_PyMODINIT_FUNC void
12436 #endif
12437 #else
12438 #ifdef __cplusplus
12439 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
12440 #else
12441 #define __Pyx_PyMODINIT_FUNC PyObject *
12442 #endif
12443 #endif
12444 
12445 
12446 #if PY_MAJOR_VERSION < 3
12447 __Pyx_PyMODINIT_FUNC initdbocean(void) CYTHON_SMALL_CODE; /*proto*/
12448 __Pyx_PyMODINIT_FUNC initdbocean(void)
12449 #else
12450 __Pyx_PyMODINIT_FUNC PyInit_dbocean(void) CYTHON_SMALL_CODE; /*proto*/
12451 __Pyx_PyMODINIT_FUNC PyInit_dbocean(void)
12452 #if CYTHON_PEP489_MULTI_PHASE_INIT
12453 {
12454  return PyModuleDef_Init(&__pyx_moduledef);
12455 }
12456 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
12457  #if PY_VERSION_HEX >= 0x030700A1
12458  static PY_INT64_T main_interpreter_id = -1;
12459  PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
12460  if (main_interpreter_id == -1) {
12461  main_interpreter_id = current_id;
12462  return (unlikely(current_id == -1)) ? -1 : 0;
12463  } else if (unlikely(main_interpreter_id != current_id))
12464  #else
12465  static PyInterpreterState *main_interpreter = NULL;
12466  PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
12467  if (!main_interpreter) {
12468  main_interpreter = current_interpreter;
12469  } else if (unlikely(main_interpreter != current_interpreter))
12470  #endif
12471  {
12472  PyErr_SetString(
12473  PyExc_ImportError,
12474  "Interpreter change detected - this module can only be loaded into one interpreter per process.");
12475  return -1;
12476  }
12477  return 0;
12478 }
12479 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) {
12480  PyObject *value = PyObject_GetAttrString(spec, from_name);
12481  int result = 0;
12482  if (likely(value)) {
12483  if (allow_none || value != Py_None) {
12484  result = PyDict_SetItemString(moddict, to_name, value);
12485  }
12486  Py_DECREF(value);
12487  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
12488  PyErr_Clear();
12489  } else {
12490  result = -1;
12491  }
12492  return result;
12493 }
12494 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
12495  PyObject *module = NULL, *moddict, *modname;
12496  if (__Pyx_check_single_interpreter())
12497  return NULL;
12498  if (__pyx_m)
12499  return __Pyx_NewRef(__pyx_m);
12500  modname = PyObject_GetAttrString(spec, "name");
12501  if (unlikely(!modname)) goto bad;
12502  module = PyModule_NewObject(modname);
12503  Py_DECREF(modname);
12504  if (unlikely(!module)) goto bad;
12505  moddict = PyModule_GetDict(module);
12506  if (unlikely(!moddict)) goto bad;
12507  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
12508  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
12509  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
12510  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
12511  return module;
12512 bad:
12513  Py_XDECREF(module);
12514  return NULL;
12515 }
12516 
12517 
12518 static CYTHON_SMALL_CODE int __pyx_pymod_exec_dbocean(PyObject *__pyx_pyinit_module)
12519 #endif
12520 #endif
12521 {
12522  PyObject *__pyx_t_1 = NULL;
12523  PyObject *__pyx_t_2 = NULL;
12524  int __pyx_t_3;
12525  PyObject *__pyx_t_4 = NULL;
12526  int __pyx_t_5;
12527  int __pyx_lineno = 0;
12528  const char *__pyx_filename = NULL;
12529  int __pyx_clineno = 0;
12530  __Pyx_RefNannyDeclarations
12531  #if CYTHON_PEP489_MULTI_PHASE_INIT
12532  if (__pyx_m) {
12533  if (__pyx_m == __pyx_pyinit_module) return 0;
12534  PyErr_SetString(PyExc_RuntimeError, "Module 'dbocean' has already been imported. Re-initialisation is not supported.");
12535  return -1;
12536  }
12537  #elif PY_MAJOR_VERSION >= 3
12538  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
12539  #endif
12540  #if CYTHON_REFNANNY
12541 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
12542 if (!__Pyx_RefNanny) {
12543  PyErr_Clear();
12544  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
12545  if (!__Pyx_RefNanny)
12546  Py_FatalError("failed to import 'refnanny' module");
12547 }
12548 #endif
12549  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_dbocean(void)", 0);
12550  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12551  #ifdef __Pxy_PyFrame_Initialize_Offsets
12552  __Pxy_PyFrame_Initialize_Offsets();
12553  #endif
12554  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
12555  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
12556  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
12557  #ifdef __Pyx_CyFunction_USED
12558  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12559  #endif
12560  #ifdef __Pyx_FusedFunction_USED
12561  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12562  #endif
12563  #ifdef __Pyx_Coroutine_USED
12564  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12565  #endif
12566  #ifdef __Pyx_Generator_USED
12567  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12568  #endif
12569  #ifdef __Pyx_AsyncGen_USED
12570  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12571  #endif
12572  #ifdef __Pyx_StopAsyncIteration_USED
12573  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12574  #endif
12575  /*--- Library function declarations ---*/
12576  /*--- Threads initialization code ---*/
12577  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
12578  #ifdef WITH_THREAD /* Python build with threading support? */
12579  PyEval_InitThreads();
12580  #endif
12581  #endif
12582  /*--- Module creation code ---*/
12583  #if CYTHON_PEP489_MULTI_PHASE_INIT
12584  __pyx_m = __pyx_pyinit_module;
12585  Py_INCREF(__pyx_m);
12586  #else
12587  #if PY_MAJOR_VERSION < 3
12588  __pyx_m = Py_InitModule4("dbocean", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
12589  #else
12590  __pyx_m = PyModule_Create(&__pyx_moduledef);
12591  #endif
12592  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
12593  #endif
12594  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
12595  Py_INCREF(__pyx_d);
12596  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
12597  Py_INCREF(__pyx_b);
12598  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
12599  Py_INCREF(__pyx_cython_runtime);
12600  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
12601  /*--- Initialize various global constants etc. ---*/
12602  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12603  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
12604  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12605  #endif
12606  if (__pyx_module_is_main_dbocean) {
12607  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12608  }
12609  #if PY_MAJOR_VERSION >= 3
12610  {
12611  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
12612  if (!PyDict_GetItemString(modules, "dbocean")) {
12613  if (unlikely(PyDict_SetItemString(modules, "dbocean", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
12614  }
12615  }
12616  #endif
12617  /*--- Builtin init code ---*/
12618  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12619  /*--- Constants init code ---*/
12620  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12621  /*--- Global type/function init code ---*/
12622  (void)__Pyx_modinit_global_init_code();
12623  (void)__Pyx_modinit_variable_export_code();
12624  (void)__Pyx_modinit_function_export_code();
12625  (void)__Pyx_modinit_type_init_code();
12626  (void)__Pyx_modinit_type_import_code();
12627  (void)__Pyx_modinit_variable_import_code();
12628  (void)__Pyx_modinit_function_import_code();
12629  /*--- Execution code ---*/
12630  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
12631  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12632  #endif
12633 
12634  /* "dbocean.pyx":3
12635  * # cython: language_level=3
12636  *
12637  * import os # <<<<<<<<<<<<<<
12638  * import sys
12639  * import math
12640  */
12641  __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error)
12642  __Pyx_GOTREF(__pyx_t_1);
12643  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
12644  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12645 
12646  /* "dbocean.pyx":4
12647  *
12648  * import os
12649  * import sys # <<<<<<<<<<<<<<
12650  * import math
12651  * import time
12652  */
12653  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
12654  __Pyx_GOTREF(__pyx_t_1);
12655  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 4, __pyx_L1_error)
12656  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12657 
12658  /* "dbocean.pyx":5
12659  * import os
12660  * import sys
12661  * import math # <<<<<<<<<<<<<<
12662  * import time
12663  * import argparse
12664  */
12665  __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
12666  __Pyx_GOTREF(__pyx_t_1);
12667  if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
12668  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12669 
12670  /* "dbocean.pyx":6
12671  * import sys
12672  * import math
12673  * import time # <<<<<<<<<<<<<<
12674  * import argparse
12675  * import numpy as np
12676  */
12677  __pyx_t_1 = __Pyx_Import(__pyx_n_s_time, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
12678  __Pyx_GOTREF(__pyx_t_1);
12679  if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_1) < 0) __PYX_ERR(0, 6, __pyx_L1_error)
12680  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12681 
12682  /* "dbocean.pyx":7
12683  * import math
12684  * import time
12685  * import argparse # <<<<<<<<<<<<<<
12686  * import numpy as np
12687  * import lmfit as lm
12688  */
12689  __pyx_t_1 = __Pyx_Import(__pyx_n_s_argparse, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error)
12690  __Pyx_GOTREF(__pyx_t_1);
12691  if (PyDict_SetItem(__pyx_d, __pyx_n_s_argparse, __pyx_t_1) < 0) __PYX_ERR(0, 7, __pyx_L1_error)
12692  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12693 
12694  /* "dbocean.pyx":8
12695  * import time
12696  * import argparse
12697  * import numpy as np # <<<<<<<<<<<<<<
12698  * import lmfit as lm
12699  * import xarray as xr
12700  */
12701  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
12702  __Pyx_GOTREF(__pyx_t_1);
12703  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
12704  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12705 
12706  /* "dbocean.pyx":9
12707  * import argparse
12708  * import numpy as np
12709  * import lmfit as lm # <<<<<<<<<<<<<<
12710  * import xarray as xr
12711  * import matplotlib.pyplot as plt
12712  */
12713  __pyx_t_1 = __Pyx_Import(__pyx_n_s_lmfit, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error)
12714  __Pyx_GOTREF(__pyx_t_1);
12715  if (PyDict_SetItem(__pyx_d, __pyx_n_s_lm, __pyx_t_1) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
12716  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12717 
12718  /* "dbocean.pyx":10
12719  * import numpy as np
12720  * import lmfit as lm
12721  * import xarray as xr # <<<<<<<<<<<<<<
12722  * import matplotlib.pyplot as plt
12723  * import scipy.interpolate as trp
12724  */
12725  __pyx_t_1 = __Pyx_Import(__pyx_n_s_xarray, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error)
12726  __Pyx_GOTREF(__pyx_t_1);
12727  if (PyDict_SetItem(__pyx_d, __pyx_n_s_xr, __pyx_t_1) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
12728  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12729 
12730  /* "dbocean.pyx":11
12731  * import lmfit as lm
12732  * import xarray as xr
12733  * import matplotlib.pyplot as plt # <<<<<<<<<<<<<<
12734  * import scipy.interpolate as trp
12735  *
12736  */
12737  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)
12738  __Pyx_GOTREF(__pyx_t_1);
12739  __Pyx_INCREF(__pyx_n_s__26);
12740  __Pyx_GIVEREF(__pyx_n_s__26);
12741  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s__26);
12742  __pyx_t_2 = __Pyx_Import(__pyx_n_s_matplotlib_pyplot, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error)
12743  __Pyx_GOTREF(__pyx_t_2);
12744  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12745  if (PyDict_SetItem(__pyx_d, __pyx_n_s_plt, __pyx_t_2) < 0) __PYX_ERR(0, 11, __pyx_L1_error)
12746  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12747 
12748  /* "dbocean.pyx":12
12749  * import xarray as xr
12750  * import matplotlib.pyplot as plt
12751  * import scipy.interpolate as trp # <<<<<<<<<<<<<<
12752  *
12753  * cdef int W470 = 0
12754  */
12755  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
12756  __Pyx_GOTREF(__pyx_t_2);
12757  __Pyx_INCREF(__pyx_n_s__26);
12758  __Pyx_GIVEREF(__pyx_n_s__26);
12759  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s__26);
12760  __pyx_t_1 = __Pyx_Import(__pyx_n_s_scipy_interpolate, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
12761  __Pyx_GOTREF(__pyx_t_1);
12762  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12763  if (PyDict_SetItem(__pyx_d, __pyx_n_s_trp, __pyx_t_1) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
12764  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12765 
12766  /* "dbocean.pyx":14
12767  * import scipy.interpolate as trp
12768  *
12769  * cdef int W470 = 0 # <<<<<<<<<<<<<<
12770  * cdef int W550 = 1
12771  * cdef int W659 = 2
12772  */
12773  __pyx_v_7dbocean_W470 = 0;
12774 
12775  /* "dbocean.pyx":15
12776  *
12777  * cdef int W470 = 0
12778  * cdef int W550 = 1 # <<<<<<<<<<<<<<
12779  * cdef int W659 = 2
12780  * cdef int W860 = 3
12781  */
12782  __pyx_v_7dbocean_W550 = 1;
12783 
12784  /* "dbocean.pyx":16
12785  * cdef int W470 = 0
12786  * cdef int W550 = 1
12787  * cdef int W659 = 2 # <<<<<<<<<<<<<<
12788  * cdef int W860 = 3
12789  * cdef int W124 = 4
12790  */
12791  __pyx_v_7dbocean_W659 = 2;
12792 
12793  /* "dbocean.pyx":17
12794  * cdef int W550 = 1
12795  * cdef int W659 = 2
12796  * cdef int W860 = 3 # <<<<<<<<<<<<<<
12797  * cdef int W124 = 4
12798  * cdef int W164 = 5
12799  */
12800  __pyx_v_7dbocean_W860 = 3;
12801 
12802  /* "dbocean.pyx":18
12803  * cdef int W659 = 2
12804  * cdef int W860 = 3
12805  * cdef int W124 = 4 # <<<<<<<<<<<<<<
12806  * cdef int W164 = 5
12807  * cdef int W213 = 6
12808  */
12809  __pyx_v_7dbocean_W124 = 4;
12810 
12811  /* "dbocean.pyx":19
12812  * cdef int W860 = 3
12813  * cdef int W124 = 4
12814  * cdef int W164 = 5 # <<<<<<<<<<<<<<
12815  * cdef int W213 = 6
12816  * cdef int NWL = 7
12817  */
12818  __pyx_v_7dbocean_W164 = 5;
12819 
12820  /* "dbocean.pyx":20
12821  * cdef int W124 = 4
12822  * cdef int W164 = 5
12823  * cdef int W213 = 6 # <<<<<<<<<<<<<<
12824  * cdef int NWL = 7
12825  * cdef int NSZA = 22
12826  */
12827  __pyx_v_7dbocean_W213 = 6;
12828 
12829  /* "dbocean.pyx":21
12830  * cdef int W164 = 5
12831  * cdef int W213 = 6
12832  * cdef int NWL = 7 # <<<<<<<<<<<<<<
12833  * cdef int NSZA = 22
12834  * cdef int NVZA = 20
12835  */
12836  __pyx_v_7dbocean_NWL = 7;
12837 
12838  /* "dbocean.pyx":22
12839  * cdef int W213 = 6
12840  * cdef int NWL = 7
12841  * cdef int NSZA = 22 # <<<<<<<<<<<<<<
12842  * cdef int NVZA = 20
12843  * cdef int NRAA = 21
12844  */
12845  __pyx_v_7dbocean_NSZA = 22;
12846 
12847  /* "dbocean.pyx":23
12848  * cdef int NWL = 7
12849  * cdef int NSZA = 22
12850  * cdef int NVZA = 20 # <<<<<<<<<<<<<<
12851  * cdef int NRAA = 21
12852  * cdef int NAOT = 14
12853  */
12854  __pyx_v_7dbocean_NVZA = 20;
12855 
12856  /* "dbocean.pyx":24
12857  * cdef int NSZA = 22
12858  * cdef int NVZA = 20
12859  * cdef int NRAA = 21 # <<<<<<<<<<<<<<
12860  * cdef int NAOT = 14
12861  * cdef int NFMF = 14
12862  */
12863  __pyx_v_7dbocean_NRAA = 21;
12864 
12865  /* "dbocean.pyx":25
12866  * cdef int NVZA = 20
12867  * cdef int NRAA = 21
12868  * cdef int NAOT = 14 # <<<<<<<<<<<<<<
12869  * cdef int NFMF = 14
12870  * cdef int NF1 = 5
12871  */
12872  __pyx_v_7dbocean_NAOT = 14;
12873 
12874  /* "dbocean.pyx":26
12875  * cdef int NRAA = 21
12876  * cdef int NAOT = 14
12877  * cdef int NFMF = 14 # <<<<<<<<<<<<<<
12878  * cdef int NF1 = 5
12879  * cdef int NF2 = 9
12880  */
12881  __pyx_v_7dbocean_NFMF = 14;
12882 
12883  /* "dbocean.pyx":27
12884  * cdef int NAOT = 14
12885  * cdef int NFMF = 14
12886  * cdef int NF1 = 5 # <<<<<<<<<<<<<<
12887  * cdef int NF2 = 9
12888  * cdef int NWS = 6
12889  */
12890  __pyx_v_7dbocean_NF1 = 5;
12891 
12892  /* "dbocean.pyx":28
12893  * cdef int NFMF = 14
12894  * cdef int NF1 = 5
12895  * cdef int NF2 = 9 # <<<<<<<<<<<<<<
12896  * cdef int NWS = 6
12897  * cdef int NCHL = 4
12898  */
12899  __pyx_v_7dbocean_NF2 = 9;
12900 
12901  /* "dbocean.pyx":29
12902  * cdef int NF1 = 5
12903  * cdef int NF2 = 9
12904  * cdef int NWS = 6 # <<<<<<<<<<<<<<
12905  * cdef int NCHL = 4
12906  * cdef int D2R = np.pi/180.0
12907  */
12908  __pyx_v_7dbocean_NWS = 6;
12909 
12910  /* "dbocean.pyx":30
12911  * cdef int NF2 = 9
12912  * cdef int NWS = 6
12913  * cdef int NCHL = 4 # <<<<<<<<<<<<<<
12914  * cdef int D2R = np.pi/180.0
12915  *
12916  */
12917  __pyx_v_7dbocean_NCHL = 4;
12918 
12919  /* "dbocean.pyx":31
12920  * cdef int NWS = 6
12921  * cdef int NCHL = 4
12922  * cdef int D2R = np.pi/180.0 # <<<<<<<<<<<<<<
12923  *
12924  * class dbocean(object):
12925  */
12926  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
12927  __Pyx_GOTREF(__pyx_t_1);
12928  __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)
12929  __Pyx_GOTREF(__pyx_t_2);
12930  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12931  __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)
12932  __Pyx_GOTREF(__pyx_t_1);
12933  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12934  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 31, __pyx_L1_error)
12935  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12936  __pyx_v_7dbocean_D2R = __pyx_t_3;
12937 
12938  /* "dbocean.pyx":33
12939  * cdef int D2R = np.pi/180.0
12940  *
12941  * class dbocean(object): # <<<<<<<<<<<<<<
12942  *
12943  * def __init__(self, lut_filepath, mode):
12944  */
12945  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__27); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
12946  __Pyx_GOTREF(__pyx_t_1);
12947  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__27, __pyx_n_s_dbocean, __pyx_n_s_dbocean, (PyObject *) NULL, __pyx_n_s_dbocean, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
12948  __Pyx_GOTREF(__pyx_t_2);
12949 
12950  /* "dbocean.pyx":35
12951  * class dbocean(object):
12952  *
12953  * def __init__(self, lut_filepath, mode): # <<<<<<<<<<<<<<
12954  * print ("Reading Deepblue LUT: " + lut_filepath)
12955  * self.mode = mode
12956  */
12957  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7dbocean_7dbocean_1__init__, 0, __pyx_n_s_dbocean___init, NULL, __pyx_n_s_dbocean, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 35, __pyx_L1_error)
12958  __Pyx_GOTREF(__pyx_t_4);
12959  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
12960  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12961 
12962  /* "dbocean.pyx":105
12963  * sys.exit()
12964  *
12965  * def minfun(self, pars, data, scale, rlut): # <<<<<<<<<<<<<<
12966  * if(self.mode==0 or self.mode==1):
12967  * rxi = np.stack((pars['fmf'], pars['aot']))
12968  */
12969  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7dbocean_7dbocean_3minfun, 0, __pyx_n_s_dbocean_minfun, NULL, __pyx_n_s_dbocean, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error)
12970  __Pyx_GOTREF(__pyx_t_4);
12971  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_minfun, __pyx_t_4) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
12972  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12973 
12974  /* "dbocean.pyx":118
12975  * return (model - data)*scale
12976  *
12977  * def process(self,rfl,sza,vza,raa,wnd,chl): # <<<<<<<<<<<<<<
12978  * if(self.mode==0 or self.mode==1):
12979  * if(self.mode==1):
12980  */
12981  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7dbocean_7dbocean_5process, 0, __pyx_n_s_dbocean_process, NULL, __pyx_n_s_dbocean, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 118, __pyx_L1_error)
12982  __Pyx_GOTREF(__pyx_t_4);
12983  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_process, __pyx_t_4) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
12984  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12985 
12986  /* "dbocean.pyx":162
12987  * return self.fmf, self.aot, self.chl, self.wnd, self.sse
12988  *
12989  * def plot(self, iy, ix): # <<<<<<<<<<<<<<
12990  * plt.clf()
12991  * plt.grid(True)
12992  */
12993  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7dbocean_7dbocean_7plot, 0, __pyx_n_s_dbocean_plot, NULL, __pyx_n_s_dbocean, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 162, __pyx_L1_error)
12994  __Pyx_GOTREF(__pyx_t_4);
12995  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_plot, __pyx_t_4) < 0) __PYX_ERR(0, 162, __pyx_L1_error)
12996  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12997 
12998  /* "dbocean.pyx":33
12999  * cdef int D2R = np.pi/180.0
13000  *
13001  * class dbocean(object): # <<<<<<<<<<<<<<
13002  *
13003  * def __init__(self, lut_filepath, mode):
13004  */
13005  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_dbocean, __pyx_tuple__27, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33, __pyx_L1_error)
13006  __Pyx_GOTREF(__pyx_t_4);
13007  if (PyDict_SetItem(__pyx_d, __pyx_n_s_dbocean, __pyx_t_4) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
13008  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13009  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13010  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13011 
13012  /* "dbocean.pyx":176
13013  *
13014  *
13015  * class input(object): # <<<<<<<<<<<<<<
13016  *
13017  * def __init__(self, l1b_filepath):
13018  */
13019  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__36); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error)
13020  __Pyx_GOTREF(__pyx_t_1);
13021  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__36, __pyx_n_s_input, __pyx_n_s_input, (PyObject *) NULL, __pyx_n_s_dbocean, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error)
13022  __Pyx_GOTREF(__pyx_t_2);
13023 
13024  /* "dbocean.pyx":178
13025  * class input(object):
13026  *
13027  * def __init__(self, l1b_filepath): # <<<<<<<<<<<<<<
13028  * self.ifile = l1b_filepath
13029  * print ("Reading sensor data: " + self.ifile)
13030  */
13031  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7dbocean_5input_1__init__, 0, __pyx_n_s_input___init, NULL, __pyx_n_s_dbocean, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 178, __pyx_L1_error)
13032  __Pyx_GOTREF(__pyx_t_4);
13033  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 178, __pyx_L1_error)
13034  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13035 
13036  /* "dbocean.pyx":176
13037  *
13038  *
13039  * class input(object): # <<<<<<<<<<<<<<
13040  *
13041  * def __init__(self, l1b_filepath):
13042  */
13043  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_input, __pyx_tuple__36, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 176, __pyx_L1_error)
13044  __Pyx_GOTREF(__pyx_t_4);
13045  if (PyDict_SetItem(__pyx_d, __pyx_n_s_input, __pyx_t_4) < 0) __PYX_ERR(0, 176, __pyx_L1_error)
13046  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13047  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13048  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13049 
13050  /* "dbocean.pyx":200
13051  * sys.exit()
13052  *
13053  * class output(object): # <<<<<<<<<<<<<<
13054  *
13055  * def __init__(self, out_filepath, ydim, xdim):
13056  */
13057  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__39); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error)
13058  __Pyx_GOTREF(__pyx_t_1);
13059  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__39, __pyx_n_s_output, __pyx_n_s_output, (PyObject *) NULL, __pyx_n_s_dbocean, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error)
13060  __Pyx_GOTREF(__pyx_t_2);
13061 
13062  /* "dbocean.pyx":202
13063  * class output(object):
13064  *
13065  * def __init__(self, out_filepath, ydim, xdim): # <<<<<<<<<<<<<<
13066  * self.ofile = out_filepath
13067  * self.ydim = ydim
13068  */
13069  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7dbocean_6output_1__init__, 0, __pyx_n_s_output___init, NULL, __pyx_n_s_dbocean, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 202, __pyx_L1_error)
13070  __Pyx_GOTREF(__pyx_t_4);
13071  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 202, __pyx_L1_error)
13072  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13073 
13074  /* "dbocean.pyx":228
13075  * sys.exit()
13076  *
13077  * def write(self): # <<<<<<<<<<<<<<
13078  * print ("Writing to file: " + self.ofile)
13079  * self.ds.to_netcdf(self.ofile)
13080  */
13081  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7dbocean_6output_3write, 0, __pyx_n_s_output_write, NULL, __pyx_n_s_dbocean, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error)
13082  __Pyx_GOTREF(__pyx_t_4);
13083  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_write, __pyx_t_4) < 0) __PYX_ERR(0, 228, __pyx_L1_error)
13084  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13085 
13086  /* "dbocean.pyx":200
13087  * sys.exit()
13088  *
13089  * class output(object): # <<<<<<<<<<<<<<
13090  *
13091  * def __init__(self, out_filepath, ydim, xdim):
13092  */
13093  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_output, __pyx_tuple__39, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 200, __pyx_L1_error)
13094  __Pyx_GOTREF(__pyx_t_4);
13095  if (PyDict_SetItem(__pyx_d, __pyx_n_s_output, __pyx_t_4) < 0) __PYX_ERR(0, 200, __pyx_L1_error)
13096  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13097  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13098  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13099 
13100  /* "dbocean.pyx":232
13101  * self.ds.to_netcdf(self.ofile)
13102  *
13103  * def main(): # <<<<<<<<<<<<<<
13104  *
13105  * parser = argparse.ArgumentParser()
13106  */
13107  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7dbocean_1main, NULL, __pyx_n_s_dbocean); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error)
13108  __Pyx_GOTREF(__pyx_t_1);
13109  if (PyDict_SetItem(__pyx_d, __pyx_n_s_main_2, __pyx_t_1) < 0) __PYX_ERR(0, 232, __pyx_L1_error)
13110  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13111 
13112  /* "dbocean.pyx":300
13113  * vout.write()
13114  *
13115  * if __name__ == "__main__": # <<<<<<<<<<<<<<
13116  *
13117  * main()
13118  */
13119  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
13120  __Pyx_GOTREF(__pyx_t_1);
13121  __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_main, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 300, __pyx_L1_error)
13122  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13123  if (__pyx_t_5) {
13124 
13125  /* "dbocean.pyx":302
13126  * if __name__ == "__main__":
13127  *
13128  * main() # <<<<<<<<<<<<<<
13129  */
13130  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_main_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
13131  __Pyx_GOTREF(__pyx_t_1);
13132  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error)
13133  __Pyx_GOTREF(__pyx_t_2);
13134  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13135  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13136 
13137  /* "dbocean.pyx":300
13138  * vout.write()
13139  *
13140  * if __name__ == "__main__": # <<<<<<<<<<<<<<
13141  *
13142  * main()
13143  */
13144  }
13145 
13146  /* "dbocean.pyx":1
13147  * # cython: language_level=3 # <<<<<<<<<<<<<<
13148  *
13149  * import os
13150  */
13151  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
13152  __Pyx_GOTREF(__pyx_t_2);
13153  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
13154  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13155 
13156  /*--- Wrapped vars code ---*/
13157 
13158  goto __pyx_L0;
13159  __pyx_L1_error:;
13160  __Pyx_XDECREF(__pyx_t_1);
13161  __Pyx_XDECREF(__pyx_t_2);
13162  __Pyx_XDECREF(__pyx_t_4);
13163  if (__pyx_m) {
13164  if (__pyx_d) {
13165  __Pyx_AddTraceback("init dbocean", __pyx_clineno, __pyx_lineno, __pyx_filename);
13166  }
13167  Py_CLEAR(__pyx_m);
13168  } else if (!PyErr_Occurred()) {
13169  PyErr_SetString(PyExc_ImportError, "init dbocean");
13170  }
13171  __pyx_L0:;
13172  __Pyx_RefNannyFinishContext();
13173  #if CYTHON_PEP489_MULTI_PHASE_INIT
13174  return (__pyx_m != NULL) ? 0 : -1;
13175  #elif PY_MAJOR_VERSION >= 3
13176  return __pyx_m;
13177  #else
13178  return;
13179  #endif
13180 }
13181 
13182 /* --- Runtime support code --- */
13183 /* Refnanny */
13184 #if CYTHON_REFNANNY
13185 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
13186  PyObject *m = NULL, *p = NULL;
13187  void *r = NULL;
13188  m = PyImport_ImportModule(modname);
13189  if (!m) goto end;
13190  p = PyObject_GetAttrString(m, "RefNannyAPI");
13191  if (!p) goto end;
13192  r = PyLong_AsVoidPtr(p);
13193 end:
13194  Py_XDECREF(p);
13195  Py_XDECREF(m);
13196  return (__Pyx_RefNannyAPIStruct *)r;
13197 }
13198 #endif
13199 
13200 /* PyObjectGetAttrStr */
13201 #if CYTHON_USE_TYPE_SLOTS
13202 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
13203  PyTypeObject* tp = Py_TYPE(obj);
13204  if (likely(tp->tp_getattro))
13205  return tp->tp_getattro(obj, attr_name);
13206 #if PY_MAJOR_VERSION < 3
13207  if (likely(tp->tp_getattr))
13208  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
13209 #endif
13210  return PyObject_GetAttr(obj, attr_name);
13211 }
13212 #endif
13213 
13214 /* GetBuiltinName */
13215 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
13216  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
13217  if (unlikely(!result)) {
13218  PyErr_Format(PyExc_NameError,
13219 #if PY_MAJOR_VERSION >= 3
13220  "name '%U' is not defined", name);
13221 #else
13222  "name '%.200s' is not defined", PyString_AS_STRING(name));
13223 #endif
13224  }
13225  return result;
13226 }
13227 
13228 /* RaiseArgTupleInvalid */
13229 static void __Pyx_RaiseArgtupleInvalid(
13230  const char* func_name,
13231  int exact,
13232  Py_ssize_t num_min,
13233  Py_ssize_t num_max,
13234  Py_ssize_t num_found)
13235 {
13236  Py_ssize_t num_expected;
13237  const char *more_or_less;
13238  if (num_found < num_min) {
13239  num_expected = num_min;
13240  more_or_less = "at least";
13241  } else {
13242  num_expected = num_max;
13243  more_or_less = "at most";
13244  }
13245  if (exact) {
13246  more_or_less = "exactly";
13247  }
13248  PyErr_Format(PyExc_TypeError,
13249  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
13250  func_name, more_or_less, num_expected,
13251  (num_expected == 1) ? "" : "s", num_found);
13252 }
13253 
13254 /* RaiseDoubleKeywords */
13255 static void __Pyx_RaiseDoubleKeywordsError(
13256  const char* func_name,
13257  PyObject* kw_name)
13258 {
13259  PyErr_Format(PyExc_TypeError,
13260  #if PY_MAJOR_VERSION >= 3
13261  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
13262  #else
13263  "%s() got multiple values for keyword argument '%s'", func_name,
13264  PyString_AsString(kw_name));
13265  #endif
13266 }
13267 
13268 /* ParseKeywords */
13269 static int __Pyx_ParseOptionalKeywords(
13270  PyObject *kwds,
13271  PyObject **argnames[],
13272  PyObject *kwds2,
13273  PyObject *values[],
13274  Py_ssize_t num_pos_args,
13275  const char* function_name)
13276 {
13277  PyObject *key = 0, *value = 0;
13278  Py_ssize_t pos = 0;
13279  PyObject*** name;
13280  PyObject*** first_kw_arg = argnames + num_pos_args;
13281  while (PyDict_Next(kwds, &pos, &key, &value)) {
13282  name = first_kw_arg;
13283  while (*name && (**name != key)) name++;
13284  if (*name) {
13285  values[name-argnames] = value;
13286  continue;
13287  }
13288  name = first_kw_arg;
13289  #if PY_MAJOR_VERSION < 3
13290  if (likely(PyString_Check(key))) {
13291  while (*name) {
13292  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
13293  && _PyString_Eq(**name, key)) {
13294  values[name-argnames] = value;
13295  break;
13296  }
13297  name++;
13298  }
13299  if (*name) continue;
13300  else {
13301  PyObject*** argname = argnames;
13302  while (argname != first_kw_arg) {
13303  if ((**argname == key) || (
13304  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
13305  && _PyString_Eq(**argname, key))) {
13306  goto arg_passed_twice;
13307  }
13308  argname++;
13309  }
13310  }
13311  } else
13312  #endif
13313  if (likely(PyUnicode_Check(key))) {
13314  while (*name) {
13315  int cmp = (**name == key) ? 0 :
13316  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
13317  (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
13318  #endif
13319  PyUnicode_Compare(**name, key);
13320  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
13321  if (cmp == 0) {
13322  values[name-argnames] = value;
13323  break;
13324  }
13325  name++;
13326  }
13327  if (*name) continue;
13328  else {
13329  PyObject*** argname = argnames;
13330  while (argname != first_kw_arg) {
13331  int cmp = (**argname == key) ? 0 :
13332  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
13333  (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
13334  #endif
13335  PyUnicode_Compare(**argname, key);
13336  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
13337  if (cmp == 0) goto arg_passed_twice;
13338  argname++;
13339  }
13340  }
13341  } else
13342  goto invalid_keyword_type;
13343  if (kwds2) {
13344  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
13345  } else {
13346  goto invalid_keyword;
13347  }
13348  }
13349  return 0;
13350 arg_passed_twice:
13351  __Pyx_RaiseDoubleKeywordsError(function_name, key);
13352  goto bad;
13353 invalid_keyword_type:
13354  PyErr_Format(PyExc_TypeError,
13355  "%.200s() keywords must be strings", function_name);
13356  goto bad;
13357 invalid_keyword:
13358  PyErr_Format(PyExc_TypeError,
13359  #if PY_MAJOR_VERSION < 3
13360  "%.200s() got an unexpected keyword argument '%.200s'",
13361  function_name, PyString_AsString(key));
13362  #else
13363  "%s() got an unexpected keyword argument '%U'",
13364  function_name, key);
13365  #endif
13366 bad:
13367  return -1;
13368 }
13369 
13370 /* PyCFunctionFastCall */
13371 #if CYTHON_FAST_PYCCALL
13372 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
13373  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
13374  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
13375  PyObject *self = PyCFunction_GET_SELF(func);
13376  int flags = PyCFunction_GET_FLAGS(func);
13377  assert(PyCFunction_Check(func));
13378  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
13379  assert(nargs >= 0);
13380  assert(nargs == 0 || args != NULL);
13381  /* _PyCFunction_FastCallDict() must not be called with an exception set,
13382  because it may clear it (directly or indirectly) and so the
13383  caller loses its exception */
13384  assert(!PyErr_Occurred());
13385  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
13386  return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
13387  } else {
13388  return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
13389  }
13390 }
13391 #endif
13392 
13393 /* PyFunctionFastCall */
13394 #if CYTHON_FAST_PYCALL
13395 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
13396  PyObject *globals) {
13397  PyFrameObject *f;
13398  PyThreadState *tstate = __Pyx_PyThreadState_Current;
13399  PyObject **fastlocals;
13400  Py_ssize_t i;
13401  PyObject *result;
13402  assert(globals != NULL);
13403  /* XXX Perhaps we should create a specialized
13404  PyFrame_New() that doesn't take locals, but does
13405  take builtins without sanity checking them.
13406  */
13407  assert(tstate != NULL);
13408  f = PyFrame_New(tstate, co, globals, NULL);
13409  if (f == NULL) {
13410  return NULL;
13411  }
13412  fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
13413  for (i = 0; i < na; i++) {
13414  Py_INCREF(*args);
13415  fastlocals[i] = *args++;
13416  }
13417  result = PyEval_EvalFrameEx(f,0);
13418  ++tstate->recursion_depth;
13419  Py_DECREF(f);
13420  --tstate->recursion_depth;
13421  return result;
13422 }
13423 #if 1 || PY_VERSION_HEX < 0x030600B1
13424 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
13425  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
13426  PyObject *globals = PyFunction_GET_GLOBALS(func);
13427  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
13428  PyObject *closure;
13429 #if PY_MAJOR_VERSION >= 3
13430  PyObject *kwdefs;
13431 #endif
13432  PyObject *kwtuple, **k;
13433  PyObject **d;
13434  Py_ssize_t nd;
13435  Py_ssize_t nk;
13436  PyObject *result;
13437  assert(kwargs == NULL || PyDict_Check(kwargs));
13438  nk = kwargs ? PyDict_Size(kwargs) : 0;
13439  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
13440  return NULL;
13441  }
13442  if (
13443 #if PY_MAJOR_VERSION >= 3
13444  co->co_kwonlyargcount == 0 &&
13445 #endif
13446  likely(kwargs == NULL || nk == 0) &&
13447  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
13448  if (argdefs == NULL && co->co_argcount == nargs) {
13449  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
13450  goto done;
13451  }
13452  else if (nargs == 0 && argdefs != NULL
13453  && co->co_argcount == Py_SIZE(argdefs)) {
13454  /* function called with no arguments, but all parameters have
13455  a default value: use default values as arguments .*/
13456  args = &PyTuple_GET_ITEM(argdefs, 0);
13457  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
13458  goto done;
13459  }
13460  }
13461  if (kwargs != NULL) {
13462  Py_ssize_t pos, i;
13463  kwtuple = PyTuple_New(2 * nk);
13464  if (kwtuple == NULL) {
13465  result = NULL;
13466  goto done;
13467  }
13468  k = &PyTuple_GET_ITEM(kwtuple, 0);
13469  pos = i = 0;
13470  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
13471  Py_INCREF(k[i]);
13472  Py_INCREF(k[i+1]);
13473  i += 2;
13474  }
13475  nk = i / 2;
13476  }
13477  else {
13478  kwtuple = NULL;
13479  k = NULL;
13480  }
13481  closure = PyFunction_GET_CLOSURE(func);
13482 #if PY_MAJOR_VERSION >= 3
13483  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
13484 #endif
13485  if (argdefs != NULL) {
13486  d = &PyTuple_GET_ITEM(argdefs, 0);
13487  nd = Py_SIZE(argdefs);
13488  }
13489  else {
13490  d = NULL;
13491  nd = 0;
13492  }
13493 #if PY_MAJOR_VERSION >= 3
13494  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
13495  args, (int)nargs,
13496  k, (int)nk,
13497  d, (int)nd, kwdefs, closure);
13498 #else
13499  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
13500  args, (int)nargs,
13501  k, (int)nk,
13502  d, (int)nd, closure);
13503 #endif
13504  Py_XDECREF(kwtuple);
13505 done:
13506  Py_LeaveRecursiveCall();
13507  return result;
13508 }
13509 #endif
13510 #endif
13511 
13512 /* PyObjectCall */
13513 #if CYTHON_COMPILING_IN_CPYTHON
13514 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
13515  PyObject *result;
13516  ternaryfunc call = func->ob_type->tp_call;
13517  if (unlikely(!call))
13518  return PyObject_Call(func, arg, kw);
13519  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
13520  return NULL;
13521  result = (*call)(func, arg, kw);
13522  Py_LeaveRecursiveCall();
13523  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
13524  PyErr_SetString(
13525  PyExc_SystemError,
13526  "NULL result without error in PyObject_Call");
13527  }
13528  return result;
13529 }
13530 #endif
13531 
13532 /* PyObjectCallMethO */
13533 #if CYTHON_COMPILING_IN_CPYTHON
13534 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
13535  PyObject *self, *result;
13536  PyCFunction cfunc;
13537  cfunc = PyCFunction_GET_FUNCTION(func);
13538  self = PyCFunction_GET_SELF(func);
13539  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
13540  return NULL;
13541  result = cfunc(self, arg);
13542  Py_LeaveRecursiveCall();
13543  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
13544  PyErr_SetString(
13545  PyExc_SystemError,
13546  "NULL result without error in PyObject_Call");
13547  }
13548  return result;
13549 }
13550 #endif
13551 
13552 /* PyObjectCallOneArg */
13553 #if CYTHON_COMPILING_IN_CPYTHON
13554 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
13555  PyObject *result;
13556  PyObject *args = PyTuple_New(1);
13557  if (unlikely(!args)) return NULL;
13558  Py_INCREF(arg);
13559  PyTuple_SET_ITEM(args, 0, arg);
13560  result = __Pyx_PyObject_Call(func, args, NULL);
13561  Py_DECREF(args);
13562  return result;
13563 }
13564 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
13565 #if CYTHON_FAST_PYCALL
13566  if (PyFunction_Check(func)) {
13567  return __Pyx_PyFunction_FastCall(func, &arg, 1);
13568  }
13569 #endif
13570  if (likely(PyCFunction_Check(func))) {
13571  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
13572  return __Pyx_PyObject_CallMethO(func, arg);
13573 #if CYTHON_FAST_PYCCALL
13574  } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
13575  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
13576 #endif
13577  }
13578  }
13579  return __Pyx__PyObject_CallOneArg(func, arg);
13580 }
13581 #else
13582 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
13583  PyObject *result;
13584  PyObject *args = PyTuple_Pack(1, arg);
13585  if (unlikely(!args)) return NULL;
13586  result = __Pyx_PyObject_Call(func, args, NULL);
13587  Py_DECREF(args);
13588  return result;
13589 }
13590 #endif
13591 
13592 /* PyObjectSetAttrStr */
13593 #if CYTHON_USE_TYPE_SLOTS
13594 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
13595  PyTypeObject* tp = Py_TYPE(obj);
13596  if (likely(tp->tp_setattro))
13597  return tp->tp_setattro(obj, attr_name, value);
13598 #if PY_MAJOR_VERSION < 3
13599  if (likely(tp->tp_setattr))
13600  return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
13601 #endif
13602  return PyObject_SetAttr(obj, attr_name, value);
13603 }
13604 #endif
13605 
13606 /* PyDictVersioning */
13607 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
13608 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
13609  PyObject *dict = Py_TYPE(obj)->tp_dict;
13610  return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
13611 }
13612 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
13613  PyObject **dictptr = NULL;
13614  Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
13615  if (offset) {
13616 #if CYTHON_COMPILING_IN_CPYTHON
13617  dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
13618 #else
13619  dictptr = _PyObject_GetDictPtr(obj);
13620 #endif
13621  }
13622  return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
13623 }
13624 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
13625  PyObject *dict = Py_TYPE(obj)->tp_dict;
13626  if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
13627  return 0;
13628  return obj_dict_version == __Pyx_get_object_dict_version(obj);
13629 }
13630 #endif
13631 
13632 /* GetModuleGlobalName */
13633 #if CYTHON_USE_DICT_VERSIONS
13634 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
13635 #else
13636 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
13637 #endif
13638 {
13639  PyObject *result;
13640 #if !CYTHON_AVOID_BORROWED_REFS
13641 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
13642  result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
13643  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
13644  if (likely(result)) {
13645  return __Pyx_NewRef(result);
13646  } else if (unlikely(PyErr_Occurred())) {
13647  return NULL;
13648  }
13649 #else
13650  result = PyDict_GetItem(__pyx_d, name);
13651  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
13652  if (likely(result)) {
13653  return __Pyx_NewRef(result);
13654  }
13655 #endif
13656 #else
13657  result = PyObject_GetItem(__pyx_d, name);
13658  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
13659  if (likely(result)) {
13660  return __Pyx_NewRef(result);
13661  }
13662  PyErr_Clear();
13663 #endif
13664  return __Pyx_GetBuiltinName(name);
13665 }
13666 
13667 /* PyObjectCall2Args */
13668 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
13669  PyObject *args, *result = NULL;
13670  #if CYTHON_FAST_PYCALL
13671  if (PyFunction_Check(function)) {
13672  PyObject *args[2] = {arg1, arg2};
13673  return __Pyx_PyFunction_FastCall(function, args, 2);
13674  }
13675  #endif
13676  #if CYTHON_FAST_PYCCALL
13677  if (__Pyx_PyFastCFunction_Check(function)) {
13678  PyObject *args[2] = {arg1, arg2};
13679  return __Pyx_PyCFunction_FastCall(function, args, 2);
13680  }
13681  #endif
13682  args = PyTuple_New(2);
13683  if (unlikely(!args)) goto done;
13684  Py_INCREF(arg1);
13685  PyTuple_SET_ITEM(args, 0, arg1);
13686  Py_INCREF(arg2);
13687  PyTuple_SET_ITEM(args, 1, arg2);
13688  Py_INCREF(function);
13689  result = __Pyx_PyObject_Call(function, args, NULL);
13690  Py_DECREF(args);
13691  Py_DECREF(function);
13692 done:
13693  return result;
13694 }
13695 
13696 /* DictGetItem */
13697 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
13698 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
13699  PyObject *value;
13700  value = PyDict_GetItemWithError(d, key);
13701  if (unlikely(!value)) {
13702  if (!PyErr_Occurred()) {
13703  if (unlikely(PyTuple_Check(key))) {
13704  PyObject* args = PyTuple_Pack(1, key);
13705  if (likely(args)) {
13706  PyErr_SetObject(PyExc_KeyError, args);
13707  Py_DECREF(args);
13708  }
13709  } else {
13710  PyErr_SetObject(PyExc_KeyError, key);
13711  }
13712  }
13713  return NULL;
13714  }
13715  Py_INCREF(value);
13716  return value;
13717 }
13718 #endif
13719 
13720 /* GetItemInt */
13721 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
13722  PyObject *r;
13723  if (!j) return NULL;
13724  r = PyObject_GetItem(o, j);
13725  Py_DECREF(j);
13726  return r;
13727 }
13728 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
13729  CYTHON_NCP_UNUSED int wraparound,
13730  CYTHON_NCP_UNUSED int boundscheck) {
13731 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13732  Py_ssize_t wrapped_i = i;
13733  if (wraparound & unlikely(i < 0)) {
13734  wrapped_i += PyList_GET_SIZE(o);
13735  }
13736  if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
13737  PyObject *r = PyList_GET_ITEM(o, wrapped_i);
13738  Py_INCREF(r);
13739  return r;
13740  }
13741  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
13742 #else
13743  return PySequence_GetItem(o, i);
13744 #endif
13745 }
13746 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
13747  CYTHON_NCP_UNUSED int wraparound,
13748  CYTHON_NCP_UNUSED int boundscheck) {
13749 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13750  Py_ssize_t wrapped_i = i;
13751  if (wraparound & unlikely(i < 0)) {
13752  wrapped_i += PyTuple_GET_SIZE(o);
13753  }
13754  if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
13755  PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
13756  Py_INCREF(r);
13757  return r;
13758  }
13759  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
13760 #else
13761  return PySequence_GetItem(o, i);
13762 #endif
13763 }
13764 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
13765  CYTHON_NCP_UNUSED int wraparound,
13766  CYTHON_NCP_UNUSED int boundscheck) {
13767 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
13768  if (is_list || PyList_CheckExact(o)) {
13769  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
13770  if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
13771  PyObject *r = PyList_GET_ITEM(o, n);
13772  Py_INCREF(r);
13773  return r;
13774  }
13775  }
13776  else if (PyTuple_CheckExact(o)) {
13777  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
13778  if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
13779  PyObject *r = PyTuple_GET_ITEM(o, n);
13780  Py_INCREF(r);
13781  return r;
13782  }
13783  } else {
13784  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
13785  if (likely(m && m->sq_item)) {
13786  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
13787  Py_ssize_t l = m->sq_length(o);
13788  if (likely(l >= 0)) {
13789  i += l;
13790  } else {
13791  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
13792  return NULL;
13793  PyErr_Clear();
13794  }
13795  }
13796  return m->sq_item(o, i);
13797  }
13798  }
13799 #else
13800  if (is_list || PySequence_Check(o)) {
13801  return PySequence_GetItem(o, i);
13802  }
13803 #endif
13804  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
13805 }
13806 
13807 /* SliceObject */
13808 static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value,
13809  Py_ssize_t cstart, Py_ssize_t cstop,
13810  PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
13811  int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
13812 #if CYTHON_USE_TYPE_SLOTS
13813  PyMappingMethods* mp;
13814 #if PY_MAJOR_VERSION < 3
13815  PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
13816  if (likely(ms && ms->sq_ass_slice)) {
13817  if (!has_cstart) {
13818  if (_py_start && (*_py_start != Py_None)) {
13819  cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
13820  if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
13821  } else
13822  cstart = 0;
13823  }
13824  if (!has_cstop) {
13825  if (_py_stop && (*_py_stop != Py_None)) {
13826  cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
13827  if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
13828  } else
13829  cstop = PY_SSIZE_T_MAX;
13830  }
13831  if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
13832  Py_ssize_t l = ms->sq_length(obj);
13833  if (likely(l >= 0)) {
13834  if (cstop < 0) {
13835  cstop += l;
13836  if (cstop < 0) cstop = 0;
13837  }
13838  if (cstart < 0) {
13839  cstart += l;
13840  if (cstart < 0) cstart = 0;
13841  }
13842  } else {
13843  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
13844  goto bad;
13845  PyErr_Clear();
13846  }
13847  }
13848  return ms->sq_ass_slice(obj, cstart, cstop, value);
13849  }
13850 #endif
13851  mp = Py_TYPE(obj)->tp_as_mapping;
13852  if (likely(mp && mp->mp_ass_subscript))
13853 #endif
13854  {
13855  int result;
13856  PyObject *py_slice, *py_start, *py_stop;
13857  if (_py_slice) {
13858  py_slice = *_py_slice;
13859  } else {
13860  PyObject* owned_start = NULL;
13861  PyObject* owned_stop = NULL;
13862  if (_py_start) {
13863  py_start = *_py_start;
13864  } else {
13865  if (has_cstart) {
13866  owned_start = py_start = PyInt_FromSsize_t(cstart);
13867  if (unlikely(!py_start)) goto bad;
13868  } else
13869  py_start = Py_None;
13870  }
13871  if (_py_stop) {
13872  py_stop = *_py_stop;
13873  } else {
13874  if (has_cstop) {
13875  owned_stop = py_stop = PyInt_FromSsize_t(cstop);
13876  if (unlikely(!py_stop)) {
13877  Py_XDECREF(owned_start);
13878  goto bad;
13879  }
13880  } else
13881  py_stop = Py_None;
13882  }
13883  py_slice = PySlice_New(py_start, py_stop, Py_None);
13884  Py_XDECREF(owned_start);
13885  Py_XDECREF(owned_stop);
13886  if (unlikely(!py_slice)) goto bad;
13887  }
13888 #if CYTHON_USE_TYPE_SLOTS
13889  result = mp->mp_ass_subscript(obj, py_slice, value);
13890 #else
13891  result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice);
13892 #endif
13893  if (!_py_slice) {
13894  Py_DECREF(py_slice);
13895  }
13896  return result;
13897  }
13898  PyErr_Format(PyExc_TypeError,
13899  "'%.200s' object does not support slice %.10s",
13900  Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion");
13901 bad:
13902  return -1;
13903 }
13904 
13905 /* PyObjectCallNoArg */
13906 #if CYTHON_COMPILING_IN_CPYTHON
13907 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
13908 #if CYTHON_FAST_PYCALL
13909  if (PyFunction_Check(func)) {
13910  return __Pyx_PyFunction_FastCall(func, NULL, 0);
13911  }
13912 #endif
13913 #ifdef __Pyx_CyFunction_USED
13914  if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
13915 #else
13916  if (likely(PyCFunction_Check(func)))
13917 #endif
13918  {
13919  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
13920  return __Pyx_PyObject_CallMethO(func, NULL);
13921  }
13922  }
13923  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
13924 }
13925 #endif
13926 
13927 /* PyIntCompare */
13928 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
13929  if (op1 == op2) {
13930  Py_RETURN_TRUE;
13931  }
13932  #if PY_MAJOR_VERSION < 3
13933  if (likely(PyInt_CheckExact(op1))) {
13934  const long b = intval;
13935  long a = PyInt_AS_LONG(op1);
13936  if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
13937  }
13938  #endif
13939  #if CYTHON_USE_PYLONG_INTERNALS
13940  if (likely(PyLong_CheckExact(op1))) {
13941  int unequal;
13942  unsigned long uintval;
13943  Py_ssize_t size = Py_SIZE(op1);
13944  const digit* digits = ((PyLongObject*)op1)->ob_digit;
13945  if (intval == 0) {
13946  if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
13947  } else if (intval < 0) {
13948  if (size >= 0)
13949  Py_RETURN_FALSE;
13950  intval = -intval;
13951  size = -size;
13952  } else {
13953  if (size <= 0)
13954  Py_RETURN_FALSE;
13955  }
13956  uintval = (unsigned long) intval;
13957 #if PyLong_SHIFT * 4 < SIZEOF_LONG*8
13958  if (uintval >> (PyLong_SHIFT * 4)) {
13959  unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
13960  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
13961  } else
13962 #endif
13963 #if PyLong_SHIFT * 3 < SIZEOF_LONG*8
13964  if (uintval >> (PyLong_SHIFT * 3)) {
13965  unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
13966  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
13967  } else
13968 #endif
13969 #if PyLong_SHIFT * 2 < SIZEOF_LONG*8
13970  if (uintval >> (PyLong_SHIFT * 2)) {
13971  unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
13972  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
13973  } else
13974 #endif
13975 #if PyLong_SHIFT * 1 < SIZEOF_LONG*8
13976  if (uintval >> (PyLong_SHIFT * 1)) {
13977  unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
13978  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
13979  } else
13980 #endif
13981  unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
13982  if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
13983  }
13984  #endif
13985  if (PyFloat_CheckExact(op1)) {
13986  const long b = intval;
13987  double a = PyFloat_AS_DOUBLE(op1);
13988  if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
13989  }
13990  return (
13991  PyObject_RichCompare(op1, op2, Py_EQ));
13992 }
13993 
13994 /* GetTopmostException */
13995 #if CYTHON_USE_EXC_INFO_STACK
13996 static _PyErr_StackItem *
13997 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
13998 {
13999  _PyErr_StackItem *exc_info = tstate->exc_info;
14000  while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
14001  exc_info->previous_item != NULL)
14002  {
14003  exc_info = exc_info->previous_item;
14004  }
14005  return exc_info;
14006 }
14007 #endif
14008 
14009 /* SaveResetException */
14010 #if CYTHON_FAST_THREAD_STATE
14011 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
14012  #if CYTHON_USE_EXC_INFO_STACK
14013  _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
14014  *type = exc_info->exc_type;
14015  *value = exc_info->exc_value;
14016  *tb = exc_info->exc_traceback;
14017  #else
14018  *type = tstate->exc_type;
14019  *value = tstate->exc_value;
14020  *tb = tstate->exc_traceback;
14021  #endif
14022  Py_XINCREF(*type);
14023  Py_XINCREF(*value);
14024  Py_XINCREF(*tb);
14025 }
14026 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
14027  PyObject *tmp_type, *tmp_value, *tmp_tb;
14028  #if CYTHON_USE_EXC_INFO_STACK
14029  _PyErr_StackItem *exc_info = tstate->exc_info;
14030  tmp_type = exc_info->exc_type;
14031  tmp_value = exc_info->exc_value;
14032  tmp_tb = exc_info->exc_traceback;
14033  exc_info->exc_type = type;
14034  exc_info->exc_value = value;
14035  exc_info->exc_traceback = tb;
14036  #else
14037  tmp_type = tstate->exc_type;
14038  tmp_value = tstate->exc_value;
14039  tmp_tb = tstate->exc_traceback;
14040  tstate->exc_type = type;
14041  tstate->exc_value = value;
14042  tstate->exc_traceback = tb;
14043  #endif
14044  Py_XDECREF(tmp_type);
14045  Py_XDECREF(tmp_value);
14046  Py_XDECREF(tmp_tb);
14047 }
14048 #endif
14049 
14050 /* PyErrExceptionMatches */
14051 #if CYTHON_FAST_THREAD_STATE
14052 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
14053  Py_ssize_t i, n;
14054  n = PyTuple_GET_SIZE(tuple);
14055 #if PY_MAJOR_VERSION >= 3
14056  for (i=0; i<n; i++) {
14057  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
14058  }
14059 #endif
14060  for (i=0; i<n; i++) {
14061  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
14062  }
14063  return 0;
14064 }
14065 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
14066  PyObject *exc_type = tstate->curexc_type;
14067  if (exc_type == err) return 1;
14068  if (unlikely(!exc_type)) return 0;
14069  if (unlikely(PyTuple_Check(err)))
14070  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
14071  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
14072 }
14073 #endif
14074 
14075 /* GetException */
14076 #if CYTHON_FAST_THREAD_STATE
14077 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
14078 #else
14079 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
14080 #endif
14081 {
14082  PyObject *local_type, *local_value, *local_tb;
14083 #if CYTHON_FAST_THREAD_STATE
14084  PyObject *tmp_type, *tmp_value, *tmp_tb;
14085  local_type = tstate->curexc_type;
14086  local_value = tstate->curexc_value;
14087  local_tb = tstate->curexc_traceback;
14088  tstate->curexc_type = 0;
14089  tstate->curexc_value = 0;
14090  tstate->curexc_traceback = 0;
14091 #else
14092  PyErr_Fetch(&local_type, &local_value, &local_tb);
14093 #endif
14094  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
14095 #if CYTHON_FAST_THREAD_STATE
14096  if (unlikely(tstate->curexc_type))
14097 #else
14098  if (unlikely(PyErr_Occurred()))
14099 #endif
14100  goto bad;
14101  #if PY_MAJOR_VERSION >= 3
14102  if (local_tb) {
14103  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
14104  goto bad;
14105  }
14106  #endif
14107  Py_XINCREF(local_tb);
14108  Py_XINCREF(local_type);
14109  Py_XINCREF(local_value);
14110  *type = local_type;
14111  *value = local_value;
14112  *tb = local_tb;
14113 #if CYTHON_FAST_THREAD_STATE
14114  #if CYTHON_USE_EXC_INFO_STACK
14115  {
14116  _PyErr_StackItem *exc_info = tstate->exc_info;
14117  tmp_type = exc_info->exc_type;
14118  tmp_value = exc_info->exc_value;
14119  tmp_tb = exc_info->exc_traceback;
14120  exc_info->exc_type = local_type;
14121  exc_info->exc_value = local_value;
14122  exc_info->exc_traceback = local_tb;
14123  }
14124  #else
14125  tmp_type = tstate->exc_type;
14126  tmp_value = tstate->exc_value;
14127  tmp_tb = tstate->exc_traceback;
14128  tstate->exc_type = local_type;
14129  tstate->exc_value = local_value;
14130  tstate->exc_traceback = local_tb;
14131  #endif
14132  Py_XDECREF(tmp_type);
14133  Py_XDECREF(tmp_value);
14134  Py_XDECREF(tmp_tb);
14135 #else
14136  PyErr_SetExcInfo(local_type, local_value, local_tb);
14137 #endif
14138  return 0;
14139 bad:
14140  *type = 0;
14141  *value = 0;
14142  *tb = 0;
14143  Py_XDECREF(local_type);
14144  Py_XDECREF(local_value);
14145  Py_XDECREF(local_tb);
14146  return -1;
14147 }
14148 
14149 /* PyErrFetchRestore */
14150 #if CYTHON_FAST_THREAD_STATE
14151 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
14152  PyObject *tmp_type, *tmp_value, *tmp_tb;
14153  tmp_type = tstate->curexc_type;
14154  tmp_value = tstate->curexc_value;
14155  tmp_tb = tstate->curexc_traceback;
14156  tstate->curexc_type = type;
14157  tstate->curexc_value = value;
14158  tstate->curexc_traceback = tb;
14159  Py_XDECREF(tmp_type);
14160  Py_XDECREF(tmp_value);
14161  Py_XDECREF(tmp_tb);
14162 }
14163 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
14164  *type = tstate->curexc_type;
14165  *value = tstate->curexc_value;
14166  *tb = tstate->curexc_traceback;
14167  tstate->curexc_type = 0;
14168  tstate->curexc_value = 0;
14169  tstate->curexc_traceback = 0;
14170 }
14171 #endif
14172 
14173 /* SwapException */
14174 #if CYTHON_FAST_THREAD_STATE
14175 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
14176  PyObject *tmp_type, *tmp_value, *tmp_tb;
14177  #if CYTHON_USE_EXC_INFO_STACK
14178  _PyErr_StackItem *exc_info = tstate->exc_info;
14179  tmp_type = exc_info->exc_type;
14180  tmp_value = exc_info->exc_value;
14181  tmp_tb = exc_info->exc_traceback;
14182  exc_info->exc_type = *type;
14183  exc_info->exc_value = *value;
14184  exc_info->exc_traceback = *tb;
14185  #else
14186  tmp_type = tstate->exc_type;
14187  tmp_value = tstate->exc_value;
14188  tmp_tb = tstate->exc_traceback;
14189  tstate->exc_type = *type;
14190  tstate->exc_value = *value;
14191  tstate->exc_traceback = *tb;
14192  #endif
14193  *type = tmp_type;
14194  *value = tmp_value;
14195  *tb = tmp_tb;
14196 }
14197 #else
14198 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
14199  PyObject *tmp_type, *tmp_value, *tmp_tb;
14200  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
14201  PyErr_SetExcInfo(*type, *value, *tb);
14202  *type = tmp_type;
14203  *value = tmp_value;
14204  *tb = tmp_tb;
14205 }
14206 #endif
14207 
14208 /* None */
14209 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
14210  PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
14211 }
14212 
14213 /* PyFloatBinop */
14214 #if !CYTHON_COMPILING_IN_PYPY
14215 #define __Pyx_PyFloat_TrueDivideCObj_ZeroDivisionError(operand) if (unlikely(zerodivision_check && ((operand) == 0))) {\
14216  PyErr_SetString(PyExc_ZeroDivisionError, "float division by zero");\
14217  return NULL;\
14218 }
14219 static PyObject* __Pyx_PyFloat_TrueDivideCObj(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
14220  const double a = floatval;
14221  double b, result;
14222  (void)inplace;
14223  (void)zerodivision_check;
14224  if (likely(PyFloat_CheckExact(op2))) {
14225  b = PyFloat_AS_DOUBLE(op2);
14226  __Pyx_PyFloat_TrueDivideCObj_ZeroDivisionError(b)
14227  } else
14228  #if PY_MAJOR_VERSION < 3
14229  if (likely(PyInt_CheckExact(op2))) {
14230  b = (double) PyInt_AS_LONG(op2);
14231  __Pyx_PyFloat_TrueDivideCObj_ZeroDivisionError(b)
14232  } else
14233  #endif
14234  if (likely(PyLong_CheckExact(op2))) {
14235  #if CYTHON_USE_PYLONG_INTERNALS
14236  const digit* digits = ((PyLongObject*)op2)->ob_digit;
14237  const Py_ssize_t size = Py_SIZE(op2);
14238  switch (size) {
14239  case 0: __Pyx_PyFloat_TrueDivideCObj_ZeroDivisionError(0) break;
14240  case -1: b = -(double) digits[0]; break;
14241  case 1: b = (double) digits[0]; break;
14242  case -2:
14243  case 2:
14244  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
14245  b = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
14246  if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) {
14247  if (size == -2)
14248  b = -b;
14249  break;
14250  }
14251  }
14252  CYTHON_FALLTHROUGH;
14253  case -3:
14254  case 3:
14255  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
14256  b = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
14257  if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) {
14258  if (size == -3)
14259  b = -b;
14260  break;
14261  }
14262  }
14263  CYTHON_FALLTHROUGH;
14264  case -4:
14265  case 4:
14266  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
14267  b = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
14268  if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) {
14269  if (size == -4)
14270  b = -b;
14271  break;
14272  }
14273  }
14274  CYTHON_FALLTHROUGH;
14275  default:
14276  #else
14277  {
14278  #endif
14279  b = PyLong_AsDouble(op2);
14280  if (unlikely(b == -1.0 && PyErr_Occurred())) return NULL;
14281  __Pyx_PyFloat_TrueDivideCObj_ZeroDivisionError(b)
14282  }
14283  } else {
14284  return (inplace ? PyNumber_InPlaceTrueDivide : PyNumber_TrueDivide)(op1, op2);
14285  }
14286  __Pyx_PyFloat_TrueDivideCObj_ZeroDivisionError(b)
14287  PyFPE_START_PROTECT("divide", return NULL)
14288  result = a / b;
14289  PyFPE_END_PROTECT(result)
14290  return PyFloat_FromDouble(result);
14291 }
14292 #endif
14293 
14294 /* PyFloatBinop */
14295  #if !CYTHON_COMPILING_IN_PYPY
14296 static PyObject* __Pyx_PyFloat_AddObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
14297  const double b = floatval;
14298  double a, result;
14299  (void)inplace;
14300  (void)zerodivision_check;
14301  if (likely(PyFloat_CheckExact(op1))) {
14302  a = PyFloat_AS_DOUBLE(op1);
14303 
14304  } else
14305  #if PY_MAJOR_VERSION < 3
14306  if (likely(PyInt_CheckExact(op1))) {
14307  a = (double) PyInt_AS_LONG(op1);
14308 
14309  } else
14310  #endif
14311  if (likely(PyLong_CheckExact(op1))) {
14312  #if CYTHON_USE_PYLONG_INTERNALS
14313  const digit* digits = ((PyLongObject*)op1)->ob_digit;
14314  const Py_ssize_t size = Py_SIZE(op1);
14315  switch (size) {
14316  case 0: a = 0.0; break;
14317  case -1: a = -(double) digits[0]; break;
14318  case 1: a = (double) digits[0]; break;
14319  case -2:
14320  case 2:
14321  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
14322  a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
14323  if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
14324  if (size == -2)
14325  a = -a;
14326  break;
14327  }
14328  }
14329  CYTHON_FALLTHROUGH;
14330  case -3:
14331  case 3:
14332  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
14333  a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
14334  if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
14335  if (size == -3)
14336  a = -a;
14337  break;
14338  }
14339  }
14340  CYTHON_FALLTHROUGH;
14341  case -4:
14342  case 4:
14343  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
14344  a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
14345  if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
14346  if (size == -4)
14347  a = -a;
14348  break;
14349  }
14350  }
14351  CYTHON_FALLTHROUGH;
14352  default:
14353  #else
14354  {
14355  #endif
14356  a = PyLong_AsDouble(op1);
14357  if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
14358 
14359  }
14360  } else {
14361  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
14362  }
14363 
14364  PyFPE_START_PROTECT("add", return NULL)
14365  result = a + b;
14366  PyFPE_END_PROTECT(result)
14367  return PyFloat_FromDouble(result);
14368 }
14369 #endif
14370 
14371 /* ObjectGetItem */
14372  #if CYTHON_USE_TYPE_SLOTS
14373 static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
14374  PyObject *runerr;
14375  Py_ssize_t key_value;
14376  PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
14377  if (unlikely(!(m && m->sq_item))) {
14378  PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
14379  return NULL;
14380  }
14381  key_value = __Pyx_PyIndex_AsSsize_t(index);
14382  if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
14383  return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
14384  }
14385  if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
14386  PyErr_Clear();
14387  PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
14388  }
14389  return NULL;
14390 }
14391 static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
14392  PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
14393  if (likely(m && m->mp_subscript)) {
14394  return m->mp_subscript(obj, key);
14395  }
14396  return __Pyx_PyObject_GetIndex(obj, key);
14397 }
14398 #endif
14399 
14400 /* RaiseTooManyValuesToUnpack */
14401  static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
14402  PyErr_Format(PyExc_ValueError,
14403  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
14404 }
14405 
14406 /* RaiseNeedMoreValuesToUnpack */
14407  static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
14408  PyErr_Format(PyExc_ValueError,
14409  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
14410  index, (index == 1) ? "" : "s");
14411 }
14412 
14413 /* IterFinish */
14414  static CYTHON_INLINE int __Pyx_IterFinish(void) {
14415 #if CYTHON_FAST_THREAD_STATE
14416  PyThreadState *tstate = __Pyx_PyThreadState_Current;
14417  PyObject* exc_type = tstate->curexc_type;
14418  if (unlikely(exc_type)) {
14419  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
14420  PyObject *exc_value, *exc_tb;
14421  exc_value = tstate->curexc_value;
14422  exc_tb = tstate->curexc_traceback;
14423  tstate->curexc_type = 0;
14424  tstate->curexc_value = 0;
14425  tstate->curexc_traceback = 0;
14426  Py_DECREF(exc_type);
14427  Py_XDECREF(exc_value);
14428  Py_XDECREF(exc_tb);
14429  return 0;
14430  } else {
14431  return -1;
14432  }
14433  }
14434  return 0;
14435 #else
14436  if (unlikely(PyErr_Occurred())) {
14437  if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
14438  PyErr_Clear();
14439  return 0;
14440  } else {
14441  return -1;
14442  }
14443  }
14444  return 0;
14445 #endif
14446 }
14447 
14448 /* UnpackItemEndCheck */
14449  static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
14450  if (unlikely(retval)) {
14451  Py_DECREF(retval);
14452  __Pyx_RaiseTooManyValuesError(expected);
14453  return -1;
14454  } else {
14455  return __Pyx_IterFinish();
14456  }
14457  return 0;
14458 }
14459 
14460 /* Import */
14461  static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
14462  PyObject *empty_list = 0;
14463  PyObject *module = 0;
14464  PyObject *global_dict = 0;
14465  PyObject *empty_dict = 0;
14466  PyObject *list;
14467  #if PY_MAJOR_VERSION < 3
14468  PyObject *py_import;
14469  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
14470  if (!py_import)
14471  goto bad;
14472  #endif
14473  if (from_list)
14474  list = from_list;
14475  else {
14476  empty_list = PyList_New(0);
14477  if (!empty_list)
14478  goto bad;
14479  list = empty_list;
14480  }
14481  global_dict = PyModule_GetDict(__pyx_m);
14482  if (!global_dict)
14483  goto bad;
14484  empty_dict = PyDict_New();
14485  if (!empty_dict)
14486  goto bad;
14487  {
14488  #if PY_MAJOR_VERSION >= 3
14489  if (level == -1) {
14490  if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
14491  module = PyImport_ImportModuleLevelObject(
14492  name, global_dict, empty_dict, list, 1);
14493  if (!module) {
14494  if (!PyErr_ExceptionMatches(PyExc_ImportError))
14495  goto bad;
14496  PyErr_Clear();
14497  }
14498  }
14499  level = 0;
14500  }
14501  #endif
14502  if (!module) {
14503  #if PY_MAJOR_VERSION < 3
14504  PyObject *py_level = PyInt_FromLong(level);
14505  if (!py_level)
14506  goto bad;
14507  module = PyObject_CallFunctionObjArgs(py_import,
14508  name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
14509  Py_DECREF(py_level);
14510  #else
14511  module = PyImport_ImportModuleLevelObject(
14512  name, global_dict, empty_dict, list, level);
14513  #endif
14514  }
14515  }
14516 bad:
14517  #if PY_MAJOR_VERSION < 3
14518  Py_XDECREF(py_import);
14519  #endif
14520  Py_XDECREF(empty_list);
14521  Py_XDECREF(empty_dict);
14522  return module;
14523 }
14524 
14525 /* PyFloatBinop */
14526  #if !CYTHON_COMPILING_IN_PYPY
14527 static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
14528  const double b = floatval;
14529  double a, result;
14530  (void)inplace;
14531  (void)zerodivision_check;
14532  if (likely(PyFloat_CheckExact(op1))) {
14533  a = PyFloat_AS_DOUBLE(op1);
14534 
14535  } else
14536  #if PY_MAJOR_VERSION < 3
14537  if (likely(PyInt_CheckExact(op1))) {
14538  a = (double) PyInt_AS_LONG(op1);
14539 
14540  } else
14541  #endif
14542  if (likely(PyLong_CheckExact(op1))) {
14543  #if CYTHON_USE_PYLONG_INTERNALS
14544  const digit* digits = ((PyLongObject*)op1)->ob_digit;
14545  const Py_ssize_t size = Py_SIZE(op1);
14546  switch (size) {
14547  case 0: a = 0.0; break;
14548  case -1: a = -(double) digits[0]; break;
14549  case 1: a = (double) digits[0]; break;
14550  case -2:
14551  case 2:
14552  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
14553  a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
14554  if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
14555  if (size == -2)
14556  a = -a;
14557  break;
14558  }
14559  }
14560  CYTHON_FALLTHROUGH;
14561  case -3:
14562  case 3:
14563  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
14564  a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
14565  if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
14566  if (size == -3)
14567  a = -a;
14568  break;
14569  }
14570  }
14571  CYTHON_FALLTHROUGH;
14572  case -4:
14573  case 4:
14574  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
14575  a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
14576  if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
14577  if (size == -4)
14578  a = -a;
14579  break;
14580  }
14581  }
14582  CYTHON_FALLTHROUGH;
14583  default:
14584  #else
14585  {
14586  #endif
14587  a = PyLong_AsDouble(op1);
14588  if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
14589 
14590  }
14591  } else {
14592  return (inplace ? PyNumber_InPlaceTrueDivide : PyNumber_TrueDivide)(op1, op2);
14593  }
14594 
14595  PyFPE_START_PROTECT("divide", return NULL)
14596  result = a / b;
14597  PyFPE_END_PROTECT(result)
14598  return PyFloat_FromDouble(result);
14599 }
14600 #endif
14601 
14602 /* CalculateMetaclass */
14603  static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
14604  Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
14605  for (i=0; i < nbases; i++) {
14606  PyTypeObject *tmptype;
14607  PyObject *tmp = PyTuple_GET_ITEM(bases, i);
14608  tmptype = Py_TYPE(tmp);
14609 #if PY_MAJOR_VERSION < 3
14610  if (tmptype == &PyClass_Type)
14611  continue;
14612 #endif
14613  if (!metaclass) {
14614  metaclass = tmptype;
14615  continue;
14616  }
14617  if (PyType_IsSubtype(metaclass, tmptype))
14618  continue;
14619  if (PyType_IsSubtype(tmptype, metaclass)) {
14620  metaclass = tmptype;
14621  continue;
14622  }
14623  PyErr_SetString(PyExc_TypeError,
14624  "metaclass conflict: "
14625  "the metaclass of a derived class "
14626  "must be a (non-strict) subclass "
14627  "of the metaclasses of all its bases");
14628  return NULL;
14629  }
14630  if (!metaclass) {
14631 #if PY_MAJOR_VERSION < 3
14632  metaclass = &PyClass_Type;
14633 #else
14634  metaclass = &PyType_Type;
14635 #endif
14636  }
14637  Py_INCREF((PyObject*) metaclass);
14638  return (PyObject*) metaclass;
14639 }
14640 
14641 /* FetchCommonType */
14642  static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
14643  PyObject* fake_module;
14644  PyTypeObject* cached_type = NULL;
14645  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
14646  if (!fake_module) return NULL;
14647  Py_INCREF(fake_module);
14648  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
14649  if (cached_type) {
14650  if (!PyType_Check((PyObject*)cached_type)) {
14651  PyErr_Format(PyExc_TypeError,
14652  "Shared Cython type %.200s is not a type object",
14653  type->tp_name);
14654  goto bad;
14655  }
14656  if (cached_type->tp_basicsize != type->tp_basicsize) {
14657  PyErr_Format(PyExc_TypeError,
14658  "Shared Cython type %.200s has the wrong size, try recompiling",
14659  type->tp_name);
14660  goto bad;
14661  }
14662  } else {
14663  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
14664  PyErr_Clear();
14665  if (PyType_Ready(type) < 0) goto bad;
14666  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
14667  goto bad;
14668  Py_INCREF(type);
14669  cached_type = type;
14670  }
14671 done:
14672  Py_DECREF(fake_module);
14673  return cached_type;
14674 bad:
14675  Py_XDECREF(cached_type);
14676  cached_type = NULL;
14677  goto done;
14678 }
14679 
14680 /* CythonFunctionShared */
14681  #include <structmember.h>
14682 static PyObject *
14683 __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
14684 {
14685  if (unlikely(op->func_doc == NULL)) {
14686  if (op->func.m_ml->ml_doc) {
14687 #if PY_MAJOR_VERSION >= 3
14688  op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
14689 #else
14690  op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
14691 #endif
14692  if (unlikely(op->func_doc == NULL))
14693  return NULL;
14694  } else {
14695  Py_INCREF(Py_None);
14696  return Py_None;
14697  }
14698  }
14699  Py_INCREF(op->func_doc);
14700  return op->func_doc;
14701 }
14702 static int
14703 __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
14704 {
14705  PyObject *tmp = op->func_doc;
14706  if (value == NULL) {
14707  value = Py_None;
14708  }
14709  Py_INCREF(value);
14710  op->func_doc = value;
14711  Py_XDECREF(tmp);
14712  return 0;
14713 }
14714 static PyObject *
14715 __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
14716 {
14717  if (unlikely(op->func_name == NULL)) {
14718 #if PY_MAJOR_VERSION >= 3
14719  op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
14720 #else
14721  op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
14722 #endif
14723  if (unlikely(op->func_name == NULL))
14724  return NULL;
14725  }
14726  Py_INCREF(op->func_name);
14727  return op->func_name;
14728 }
14729 static int
14730 __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
14731 {
14732  PyObject *tmp;
14733 #if PY_MAJOR_VERSION >= 3
14734  if (unlikely(value == NULL || !PyUnicode_Check(value)))
14735 #else
14736  if (unlikely(value == NULL || !PyString_Check(value)))
14737 #endif
14738  {
14739  PyErr_SetString(PyExc_TypeError,
14740  "__name__ must be set to a string object");
14741  return -1;
14742  }
14743  tmp = op->func_name;
14744  Py_INCREF(value);
14745  op->func_name = value;
14746  Py_XDECREF(tmp);
14747  return 0;
14748 }
14749 static PyObject *
14750 __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
14751 {
14752  Py_INCREF(op->func_qualname);
14753  return op->func_qualname;
14754 }
14755 static int
14756 __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
14757 {
14758  PyObject *tmp;
14759 #if PY_MAJOR_VERSION >= 3
14760  if (unlikely(value == NULL || !PyUnicode_Check(value)))
14761 #else
14762  if (unlikely(value == NULL || !PyString_Check(value)))
14763 #endif
14764  {
14765  PyErr_SetString(PyExc_TypeError,
14766  "__qualname__ must be set to a string object");
14767  return -1;
14768  }
14769  tmp = op->func_qualname;
14770  Py_INCREF(value);
14771  op->func_qualname = value;
14772  Py_XDECREF(tmp);
14773  return 0;
14774 }
14775 static PyObject *
14776 __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
14777 {
14778  PyObject *self;
14779  self = m->func_closure;
14780  if (self == NULL)
14781  self = Py_None;
14782  Py_INCREF(self);
14783  return self;
14784 }
14785 static PyObject *
14786 __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
14787 {
14788  if (unlikely(op->func_dict == NULL)) {
14789  op->func_dict = PyDict_New();
14790  if (unlikely(op->func_dict == NULL))
14791  return NULL;
14792  }
14793  Py_INCREF(op->func_dict);
14794  return op->func_dict;
14795 }
14796 static int
14797 __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
14798 {
14799  PyObject *tmp;
14800  if (unlikely(value == NULL)) {
14801  PyErr_SetString(PyExc_TypeError,
14802  "function's dictionary may not be deleted");
14803  return -1;
14804  }
14805  if (unlikely(!PyDict_Check(value))) {
14806  PyErr_SetString(PyExc_TypeError,
14807  "setting function's dictionary to a non-dict");
14808  return -1;
14809  }
14810  tmp = op->func_dict;
14811  Py_INCREF(value);
14812  op->func_dict = value;
14813  Py_XDECREF(tmp);
14814  return 0;
14815 }
14816 static PyObject *
14817 __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
14818 {
14819  Py_INCREF(op->func_globals);
14820  return op->func_globals;
14821 }
14822 static PyObject *
14823 __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
14824 {
14825  Py_INCREF(Py_None);
14826  return Py_None;
14827 }
14828 static PyObject *
14829 __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
14830 {
14831  PyObject* result = (op->func_code) ? op->func_code : Py_None;
14832  Py_INCREF(result);
14833  return result;
14834 }
14835 static int
14836 __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
14837  int result = 0;
14838  PyObject *res = op->defaults_getter((PyObject *) op);
14839  if (unlikely(!res))
14840  return -1;
14841  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14842  op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
14843  Py_INCREF(op->defaults_tuple);
14844  op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
14845  Py_INCREF(op->defaults_kwdict);
14846  #else
14847  op->defaults_tuple = PySequence_ITEM(res, 0);
14848  if (unlikely(!op->defaults_tuple)) result = -1;
14849  else {
14850  op->defaults_kwdict = PySequence_ITEM(res, 1);
14851  if (unlikely(!op->defaults_kwdict)) result = -1;
14852  }
14853  #endif
14854  Py_DECREF(res);
14855  return result;
14856 }
14857 static int
14858 __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
14859  PyObject* tmp;
14860  if (!value) {
14861  value = Py_None;
14862  } else if (value != Py_None && !PyTuple_Check(value)) {
14863  PyErr_SetString(PyExc_TypeError,
14864  "__defaults__ must be set to a tuple object");
14865  return -1;
14866  }
14867  Py_INCREF(value);
14868  tmp = op->defaults_tuple;
14869  op->defaults_tuple = value;
14870  Py_XDECREF(tmp);
14871  return 0;
14872 }
14873 static PyObject *
14874 __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
14875  PyObject* result = op->defaults_tuple;
14876  if (unlikely(!result)) {
14877  if (op->defaults_getter) {
14878  if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
14879  result = op->defaults_tuple;
14880  } else {
14881  result = Py_None;
14882  }
14883  }
14884  Py_INCREF(result);
14885  return result;
14886 }
14887 static int
14888 __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
14889  PyObject* tmp;
14890  if (!value) {
14891  value = Py_None;
14892  } else if (value != Py_None && !PyDict_Check(value)) {
14893  PyErr_SetString(PyExc_TypeError,
14894  "__kwdefaults__ must be set to a dict object");
14895  return -1;
14896  }
14897  Py_INCREF(value);
14898  tmp = op->defaults_kwdict;
14899  op->defaults_kwdict = value;
14900  Py_XDECREF(tmp);
14901  return 0;
14902 }
14903 static PyObject *
14904 __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
14905  PyObject* result = op->defaults_kwdict;
14906  if (unlikely(!result)) {
14907  if (op->defaults_getter) {
14908  if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
14909  result = op->defaults_kwdict;
14910  } else {
14911  result = Py_None;
14912  }
14913  }
14914  Py_INCREF(result);
14915  return result;
14916 }
14917 static int
14918 __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
14919  PyObject* tmp;
14920  if (!value || value == Py_None) {
14921  value = NULL;
14922  } else if (!PyDict_Check(value)) {
14923  PyErr_SetString(PyExc_TypeError,
14924  "__annotations__ must be set to a dict object");
14925  return -1;
14926  }
14927  Py_XINCREF(value);
14928  tmp = op->func_annotations;
14929  op->func_annotations = value;
14930  Py_XDECREF(tmp);
14931  return 0;
14932 }
14933 static PyObject *
14934 __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
14935  PyObject* result = op->func_annotations;
14936  if (unlikely(!result)) {
14937  result = PyDict_New();
14938  if (unlikely(!result)) return NULL;
14939  op->func_annotations = result;
14940  }
14941  Py_INCREF(result);
14942  return result;
14943 }
14944 static PyGetSetDef __pyx_CyFunction_getsets[] = {
14945  {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
14946  {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
14947  {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
14948  {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
14949  {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
14950  {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
14951  {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
14952  {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
14953  {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
14954  {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
14955  {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
14956  {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
14957  {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
14958  {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
14959  {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
14960  {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
14961  {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
14962  {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
14963  {0, 0, 0, 0, 0}
14964 };
14965 static PyMemberDef __pyx_CyFunction_members[] = {
14966  {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
14967  {0, 0, 0, 0, 0}
14968 };
14969 static PyObject *
14970 __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
14971 {
14972 #if PY_MAJOR_VERSION >= 3
14973  return PyUnicode_FromString(m->func.m_ml->ml_name);
14974 #else
14975  return PyString_FromString(m->func.m_ml->ml_name);
14976 #endif
14977 }
14978 static PyMethodDef __pyx_CyFunction_methods[] = {
14979  {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
14980  {0, 0, 0, 0}
14981 };
14982 #if PY_VERSION_HEX < 0x030500A0
14983 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
14984 #else
14985 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
14986 #endif
14987 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
14988  PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
14989  if (unlikely(op == NULL))
14990  return NULL;
14991  op->flags = flags;
14992  __Pyx_CyFunction_weakreflist(op) = NULL;
14993  op->func.m_ml = ml;
14994  op->func.m_self = (PyObject *) op;
14995  Py_XINCREF(closure);
14996  op->func_closure = closure;
14997  Py_XINCREF(module);
14998  op->func.m_module = module;
14999  op->func_dict = NULL;
15000  op->func_name = NULL;
15001  Py_INCREF(qualname);
15002  op->func_qualname = qualname;
15003  op->func_doc = NULL;
15004  op->func_classobj = NULL;
15005  op->func_globals = globals;
15006  Py_INCREF(op->func_globals);
15007  Py_XINCREF(code);
15008  op->func_code = code;
15009  op->defaults_pyobjects = 0;
15010  op->defaults_size = 0;
15011  op->defaults = NULL;
15012  op->defaults_tuple = NULL;
15013  op->defaults_kwdict = NULL;
15014  op->defaults_getter = NULL;
15015  op->func_annotations = NULL;
15016  return (PyObject *) op;
15017 }
15018 static int
15019 __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
15020 {
15021  Py_CLEAR(m->func_closure);
15022  Py_CLEAR(m->func.m_module);
15023  Py_CLEAR(m->func_dict);
15024  Py_CLEAR(m->func_name);
15025  Py_CLEAR(m->func_qualname);
15026  Py_CLEAR(m->func_doc);
15027  Py_CLEAR(m->func_globals);
15028  Py_CLEAR(m->func_code);
15029  Py_CLEAR(m->func_classobj);
15030  Py_CLEAR(m->defaults_tuple);
15031  Py_CLEAR(m->defaults_kwdict);
15032  Py_CLEAR(m->func_annotations);
15033  if (m->defaults) {
15034  PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
15035  int i;
15036  for (i = 0; i < m->defaults_pyobjects; i++)
15037  Py_XDECREF(pydefaults[i]);
15038  PyObject_Free(m->defaults);
15039  m->defaults = NULL;
15040  }
15041  return 0;
15042 }
15043 static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
15044 {
15045  if (__Pyx_CyFunction_weakreflist(m) != NULL)
15046  PyObject_ClearWeakRefs((PyObject *) m);
15047  __Pyx_CyFunction_clear(m);
15048  PyObject_GC_Del(m);
15049 }
15050 static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
15051 {
15052  PyObject_GC_UnTrack(m);
15053  __Pyx__CyFunction_dealloc(m);
15054 }
15055 static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
15056 {
15057  Py_VISIT(m->func_closure);
15058  Py_VISIT(m->func.m_module);
15059  Py_VISIT(m->func_dict);
15060  Py_VISIT(m->func_name);
15061  Py_VISIT(m->func_qualname);
15062  Py_VISIT(m->func_doc);
15063  Py_VISIT(m->func_globals);
15064  Py_VISIT(m->func_code);
15065  Py_VISIT(m->func_classobj);
15066  Py_VISIT(m->defaults_tuple);
15067  Py_VISIT(m->defaults_kwdict);
15068  if (m->defaults) {
15069  PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
15070  int i;
15071  for (i = 0; i < m->defaults_pyobjects; i++)
15072  Py_VISIT(pydefaults[i]);
15073  }
15074  return 0;
15075 }
15076 static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
15077 {
15078 #if PY_MAJOR_VERSION < 3
15079  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
15080  if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
15081  Py_INCREF(func);
15082  return func;
15083  }
15084  if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
15085  if (type == NULL)
15086  type = (PyObject *)(Py_TYPE(obj));
15087  return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
15088  }
15089  if (obj == Py_None)
15090  obj = NULL;
15091 #endif
15092  return __Pyx_PyMethod_New(func, obj, type);
15093 }
15094 static PyObject*
15095 __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
15096 {
15097 #if PY_MAJOR_VERSION >= 3
15098  return PyUnicode_FromFormat("<cyfunction %U at %p>",
15099  op->func_qualname, (void *)op);
15100 #else
15101  return PyString_FromFormat("<cyfunction %s at %p>",
15102  PyString_AsString(op->func_qualname), (void *)op);
15103 #endif
15104 }
15105 static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
15106  PyCFunctionObject* f = (PyCFunctionObject*)func;
15107  PyCFunction meth = f->m_ml->ml_meth;
15108  Py_ssize_t size;
15109  switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
15110  case METH_VARARGS:
15111  if (likely(kw == NULL || PyDict_Size(kw) == 0))
15112  return (*meth)(self, arg);
15113  break;
15114  case METH_VARARGS | METH_KEYWORDS:
15115  return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
15116  case METH_NOARGS:
15117  if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
15118  size = PyTuple_GET_SIZE(arg);
15119  if (likely(size == 0))
15120  return (*meth)(self, NULL);
15121  PyErr_Format(PyExc_TypeError,
15122  "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
15123  f->m_ml->ml_name, size);
15124  return NULL;
15125  }
15126  break;
15127  case METH_O:
15128  if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
15129  size = PyTuple_GET_SIZE(arg);
15130  if (likely(size == 1)) {
15131  PyObject *result, *arg0;
15132  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
15133  arg0 = PyTuple_GET_ITEM(arg, 0);
15134  #else
15135  arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
15136  #endif
15137  result = (*meth)(self, arg0);
15138  #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
15139  Py_DECREF(arg0);
15140  #endif
15141  return result;
15142  }
15143  PyErr_Format(PyExc_TypeError,
15144  "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
15145  f->m_ml->ml_name, size);
15146  return NULL;
15147  }
15148  break;
15149  default:
15150  PyErr_SetString(PyExc_SystemError, "Bad call flags in "
15151  "__Pyx_CyFunction_Call. METH_OLDARGS is no "
15152  "longer supported!");
15153  return NULL;
15154  }
15155  PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
15156  f->m_ml->ml_name);
15157  return NULL;
15158 }
15159 static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
15160  return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
15161 }
15162 static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
15163  PyObject *result;
15164  __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
15165  if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
15166  Py_ssize_t argc;
15167  PyObject *new_args;
15168  PyObject *self;
15169  argc = PyTuple_GET_SIZE(args);
15170  new_args = PyTuple_GetSlice(args, 1, argc);
15171  if (unlikely(!new_args))
15172  return NULL;
15173  self = PyTuple_GetItem(args, 0);
15174  if (unlikely(!self)) {
15175  Py_DECREF(new_args);
15176  return NULL;
15177  }
15178  result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
15179  Py_DECREF(new_args);
15180  } else {
15181  result = __Pyx_CyFunction_Call(func, args, kw);
15182  }
15183  return result;
15184 }
15185 static PyTypeObject __pyx_CyFunctionType_type = {
15186  PyVarObject_HEAD_INIT(0, 0)
15187  "cython_function_or_method",
15188  sizeof(__pyx_CyFunctionObject),
15189  0,
15190  (destructor) __Pyx_CyFunction_dealloc,
15191  0,
15192  0,
15193  0,
15194 #if PY_MAJOR_VERSION < 3
15195  0,
15196 #else
15197  0,
15198 #endif
15199  (reprfunc) __Pyx_CyFunction_repr,
15200  0,
15201  0,
15202  0,
15203  0,
15204  __Pyx_CyFunction_CallAsMethod,
15205  0,
15206  0,
15207  0,
15208  0,
15209  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
15210  0,
15211  (traverseproc) __Pyx_CyFunction_traverse,
15212  (inquiry) __Pyx_CyFunction_clear,
15213  0,
15214 #if PY_VERSION_HEX < 0x030500A0
15215  offsetof(__pyx_CyFunctionObject, func_weakreflist),
15216 #else
15217  offsetof(PyCFunctionObject, m_weakreflist),
15218 #endif
15219  0,
15220  0,
15221  __pyx_CyFunction_methods,
15222  __pyx_CyFunction_members,
15223  __pyx_CyFunction_getsets,
15224  0,
15225  0,
15226  __Pyx_CyFunction_descr_get,
15227  0,
15228  offsetof(__pyx_CyFunctionObject, func_dict),
15229  0,
15230  0,
15231  0,
15232  0,
15233  0,
15234  0,
15235  0,
15236  0,
15237  0,
15238  0,
15239  0,
15240  0,
15241 #if PY_VERSION_HEX >= 0x030400a1
15242  0,
15243 #endif
15244 #if PY_VERSION_HEX >= 0x030800b1
15245  0,
15246 #endif
15247 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
15248  0,
15249 #endif
15250 };
15251 static int __pyx_CyFunction_init(void) {
15252  __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
15253  if (unlikely(__pyx_CyFunctionType == NULL)) {
15254  return -1;
15255  }
15256  return 0;
15257 }
15258 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
15259  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
15260  m->defaults = PyObject_Malloc(size);
15261  if (unlikely(!m->defaults))
15262  return PyErr_NoMemory();
15263  memset(m->defaults, 0, size);
15264  m->defaults_pyobjects = pyobjects;
15265  m->defaults_size = size;
15266  return m->defaults;
15267 }
15268 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
15269  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
15270  m->defaults_tuple = tuple;
15271  Py_INCREF(tuple);
15272 }
15273 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
15274  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
15275  m->defaults_kwdict = dict;
15276  Py_INCREF(dict);
15277 }
15278 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
15279  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
15280  m->func_annotations = dict;
15281  Py_INCREF(dict);
15282 }
15283 
15284 /* CythonFunction */
15285  static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
15286  PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
15287  PyObject *op = __Pyx_CyFunction_Init(
15288  PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
15289  ml, flags, qualname, closure, module, globals, code
15290  );
15291  if (likely(op)) {
15292  PyObject_GC_Track(op);
15293  }
15294  return op;
15295 }
15296 
15297 /* Py3ClassCreate */
15298  static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
15299  PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
15300  PyObject *ns;
15301  if (metaclass) {
15302  PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
15303  if (prep) {
15304  PyObject *pargs = PyTuple_Pack(2, name, bases);
15305  if (unlikely(!pargs)) {
15306  Py_DECREF(prep);
15307  return NULL;
15308  }
15309  ns = PyObject_Call(prep, pargs, mkw);
15310  Py_DECREF(prep);
15311  Py_DECREF(pargs);
15312  } else {
15313  if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
15314  return NULL;
15315  PyErr_Clear();
15316  ns = PyDict_New();
15317  }
15318  } else {
15319  ns = PyDict_New();
15320  }
15321  if (unlikely(!ns))
15322  return NULL;
15323  if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
15324  if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
15325  if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
15326  return ns;
15327 bad:
15328  Py_DECREF(ns);
15329  return NULL;
15330 }
15331 static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
15332  PyObject *dict, PyObject *mkw,
15333  int calculate_metaclass, int allow_py2_metaclass) {
15334  PyObject *result, *margs;
15335  PyObject *owned_metaclass = NULL;
15336  if (allow_py2_metaclass) {
15337  owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
15338  if (owned_metaclass) {
15339  metaclass = owned_metaclass;
15340  } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
15341  PyErr_Clear();
15342  } else {
15343  return NULL;
15344  }
15345  }
15346  if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
15347  metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
15348  Py_XDECREF(owned_metaclass);
15349  if (unlikely(!metaclass))
15350  return NULL;
15351  owned_metaclass = metaclass;
15352  }
15353  margs = PyTuple_Pack(3, name, bases, dict);
15354  if (unlikely(!margs)) {
15355  result = NULL;
15356  } else {
15357  result = PyObject_Call(metaclass, margs, mkw);
15358  Py_DECREF(margs);
15359  }
15360  Py_XDECREF(owned_metaclass);
15361  return result;
15362 }
15363 
15364 /* BytesEquals */
15365  static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
15366 #if CYTHON_COMPILING_IN_PYPY
15367  return PyObject_RichCompareBool(s1, s2, equals);
15368 #else
15369  if (s1 == s2) {
15370  return (equals == Py_EQ);
15371  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
15372  const char *ps1, *ps2;
15373  Py_ssize_t length = PyBytes_GET_SIZE(s1);
15374  if (length != PyBytes_GET_SIZE(s2))
15375  return (equals == Py_NE);
15376  ps1 = PyBytes_AS_STRING(s1);
15377  ps2 = PyBytes_AS_STRING(s2);
15378  if (ps1[0] != ps2[0]) {
15379  return (equals == Py_NE);
15380  } else if (length == 1) {
15381  return (equals == Py_EQ);
15382  } else {
15383  int result;
15384 #if CYTHON_USE_UNICODE_INTERNALS
15385  Py_hash_t hash1, hash2;
15386  hash1 = ((PyBytesObject*)s1)->ob_shash;
15387  hash2 = ((PyBytesObject*)s2)->ob_shash;
15388  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
15389  return (equals == Py_NE);
15390  }
15391 #endif
15392  result = memcmp(ps1, ps2, (size_t)length);
15393  return (equals == Py_EQ) ? (result == 0) : (result != 0);
15394  }
15395  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
15396  return (equals == Py_NE);
15397  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
15398  return (equals == Py_NE);
15399  } else {
15400  int result;
15401  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
15402  if (!py_result)
15403  return -1;
15404  result = __Pyx_PyObject_IsTrue(py_result);
15405  Py_DECREF(py_result);
15406  return result;
15407  }
15408 #endif
15409 }
15410 
15411 /* UnicodeEquals */
15412  static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
15413 #if CYTHON_COMPILING_IN_PYPY
15414  return PyObject_RichCompareBool(s1, s2, equals);
15415 #else
15416 #if PY_MAJOR_VERSION < 3
15417  PyObject* owned_ref = NULL;
15418 #endif
15419  int s1_is_unicode, s2_is_unicode;
15420  if (s1 == s2) {
15421  goto return_eq;
15422  }
15423  s1_is_unicode = PyUnicode_CheckExact(s1);
15424  s2_is_unicode = PyUnicode_CheckExact(s2);
15425 #if PY_MAJOR_VERSION < 3
15426  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
15427  owned_ref = PyUnicode_FromObject(s2);
15428  if (unlikely(!owned_ref))
15429  return -1;
15430  s2 = owned_ref;
15431  s2_is_unicode = 1;
15432  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
15433  owned_ref = PyUnicode_FromObject(s1);
15434  if (unlikely(!owned_ref))
15435  return -1;
15436  s1 = owned_ref;
15437  s1_is_unicode = 1;
15438  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
15439  return __Pyx_PyBytes_Equals(s1, s2, equals);
15440  }
15441 #endif
15442  if (s1_is_unicode & s2_is_unicode) {
15443  Py_ssize_t length;
15444  int kind;
15445  void *data1, *data2;
15446  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
15447  return -1;
15448  length = __Pyx_PyUnicode_GET_LENGTH(s1);
15449  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
15450  goto return_ne;
15451  }
15452 #if CYTHON_USE_UNICODE_INTERNALS
15453  {
15454  Py_hash_t hash1, hash2;
15455  #if CYTHON_PEP393_ENABLED
15456  hash1 = ((PyASCIIObject*)s1)->hash;
15457  hash2 = ((PyASCIIObject*)s2)->hash;
15458  #else
15459  hash1 = ((PyUnicodeObject*)s1)->hash;
15460  hash2 = ((PyUnicodeObject*)s2)->hash;
15461  #endif
15462  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
15463  goto return_ne;
15464  }
15465  }
15466 #endif
15467  kind = __Pyx_PyUnicode_KIND(s1);
15468  if (kind != __Pyx_PyUnicode_KIND(s2)) {
15469  goto return_ne;
15470  }
15471  data1 = __Pyx_PyUnicode_DATA(s1);
15472  data2 = __Pyx_PyUnicode_DATA(s2);
15473  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
15474  goto return_ne;
15475  } else if (length == 1) {
15476  goto return_eq;
15477  } else {
15478  int result = memcmp(data1, data2, (size_t)(length * kind));
15479  #if PY_MAJOR_VERSION < 3
15480  Py_XDECREF(owned_ref);
15481  #endif
15482  return (equals == Py_EQ) ? (result == 0) : (result != 0);
15483  }
15484  } else if ((s1 == Py_None) & s2_is_unicode) {
15485  goto return_ne;
15486  } else if ((s2 == Py_None) & s1_is_unicode) {
15487  goto return_ne;
15488  } else {
15489  int result;
15490  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
15491  #if PY_MAJOR_VERSION < 3
15492  Py_XDECREF(owned_ref);
15493  #endif
15494  if (!py_result)
15495  return -1;
15496  result = __Pyx_PyObject_IsTrue(py_result);
15497  Py_DECREF(py_result);
15498  return result;
15499  }
15500 return_eq:
15501  #if PY_MAJOR_VERSION < 3
15502  Py_XDECREF(owned_ref);
15503  #endif
15504  return (equals == Py_EQ);
15505 return_ne:
15506  #if PY_MAJOR_VERSION < 3
15507  Py_XDECREF(owned_ref);
15508  #endif
15509  return (equals == Py_NE);
15510 #endif
15511 }
15512 
15513 /* CLineInTraceback */
15514  #ifndef CYTHON_CLINE_IN_TRACEBACK
15515 static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
15516  PyObject *use_cline;
15517  PyObject *ptype, *pvalue, *ptraceback;
15518 #if CYTHON_COMPILING_IN_CPYTHON
15519  PyObject **cython_runtime_dict;
15520 #endif
15521  if (unlikely(!__pyx_cython_runtime)) {
15522  return c_line;
15523  }
15524  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
15525 #if CYTHON_COMPILING_IN_CPYTHON
15526  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
15527  if (likely(cython_runtime_dict)) {
15528  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
15529  use_cline, *cython_runtime_dict,
15530  __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
15531  } else
15532 #endif
15533  {
15534  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
15535  if (use_cline_obj) {
15536  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
15537  Py_DECREF(use_cline_obj);
15538  } else {
15539  PyErr_Clear();
15540  use_cline = NULL;
15541  }
15542  }
15543  if (!use_cline) {
15544  c_line = 0;
15545  PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
15546  }
15547  else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
15548  c_line = 0;
15549  }
15550  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
15551  return c_line;
15552 }
15553 #endif
15554 
15555 /* CodeObjectCache */
15556  static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
15557  int start = 0, mid = 0, end = count - 1;
15558  if (end >= 0 && code_line > entries[end].code_line) {
15559  return count;
15560  }
15561  while (start < end) {
15562  mid = start + (end - start) / 2;
15563  if (code_line < entries[mid].code_line) {
15564  end = mid;
15565  } else if (code_line > entries[mid].code_line) {
15566  start = mid + 1;
15567  } else {
15568  return mid;
15569  }
15570  }
15571  if (code_line <= entries[mid].code_line) {
15572  return mid;
15573  } else {
15574  return mid + 1;
15575  }
15576 }
15577 static PyCodeObject *__pyx_find_code_object(int code_line) {
15578  PyCodeObject* code_object;
15579  int pos;
15580  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
15581  return NULL;
15582  }
15583  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
15584  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
15585  return NULL;
15586  }
15587  code_object = __pyx_code_cache.entries[pos].code_object;
15588  Py_INCREF(code_object);
15589  return code_object;
15590 }
15591 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
15592  int pos, i;
15593  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
15594  if (unlikely(!code_line)) {
15595  return;
15596  }
15597  if (unlikely(!entries)) {
15598  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
15599  if (likely(entries)) {
15600  __pyx_code_cache.entries = entries;
15601  __pyx_code_cache.max_count = 64;
15602  __pyx_code_cache.count = 1;
15603  entries[0].code_line = code_line;
15604  entries[0].code_object = code_object;
15605  Py_INCREF(code_object);
15606  }
15607  return;
15608  }
15609  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
15610  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
15611  PyCodeObject* tmp = entries[pos].code_object;
15612  entries[pos].code_object = code_object;
15613  Py_DECREF(tmp);
15614  return;
15615  }
15616  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
15617  int new_max = __pyx_code_cache.max_count + 64;
15618  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
15619  __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
15620  if (unlikely(!entries)) {
15621  return;
15622  }
15623  __pyx_code_cache.entries = entries;
15624  __pyx_code_cache.max_count = new_max;
15625  }
15626  for (i=__pyx_code_cache.count; i>pos; i--) {
15627  entries[i] = entries[i-1];
15628  }
15629  entries[pos].code_line = code_line;
15630  entries[pos].code_object = code_object;
15631  __pyx_code_cache.count++;
15632  Py_INCREF(code_object);
15633 }
15634 
15635 /* AddTraceback */
15636  #include "compile.h"
15637 #include "frameobject.h"
15638 #include "traceback.h"
15639 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
15640  const char *funcname, int c_line,
15641  int py_line, const char *filename) {
15642  PyCodeObject *py_code = 0;
15643  PyObject *py_srcfile = 0;
15644  PyObject *py_funcname = 0;
15645  #if PY_MAJOR_VERSION < 3
15646  py_srcfile = PyString_FromString(filename);
15647  #else
15648  py_srcfile = PyUnicode_FromString(filename);
15649  #endif
15650  if (!py_srcfile) goto bad;
15651  if (c_line) {
15652  #if PY_MAJOR_VERSION < 3
15653  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
15654  #else
15655  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
15656  #endif
15657  }
15658  else {
15659  #if PY_MAJOR_VERSION < 3
15660  py_funcname = PyString_FromString(funcname);
15661  #else
15662  py_funcname = PyUnicode_FromString(funcname);
15663  #endif
15664  }
15665  if (!py_funcname) goto bad;
15666  py_code = __Pyx_PyCode_New(
15667  0,
15668  0,
15669  0,
15670  0,
15671  0,
15672  __pyx_empty_bytes, /*PyObject *code,*/
15673  __pyx_empty_tuple, /*PyObject *consts,*/
15674  __pyx_empty_tuple, /*PyObject *names,*/
15675  __pyx_empty_tuple, /*PyObject *varnames,*/
15676  __pyx_empty_tuple, /*PyObject *freevars,*/
15677  __pyx_empty_tuple, /*PyObject *cellvars,*/
15678  py_srcfile, /*PyObject *filename,*/
15679  py_funcname, /*PyObject *name,*/
15680  py_line,
15681  __pyx_empty_bytes /*PyObject *lnotab*/
15682  );
15683  Py_DECREF(py_srcfile);
15684  Py_DECREF(py_funcname);
15685  return py_code;
15686 bad:
15687  Py_XDECREF(py_srcfile);
15688  Py_XDECREF(py_funcname);
15689  return NULL;
15690 }
15691 static void __Pyx_AddTraceback(const char *funcname, int c_line,
15692  int py_line, const char *filename) {
15693  PyCodeObject *py_code = 0;
15694  PyFrameObject *py_frame = 0;
15695  PyThreadState *tstate = __Pyx_PyThreadState_Current;
15696  if (c_line) {
15697  c_line = __Pyx_CLineForTraceback(tstate, c_line);
15698  }
15699  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
15700  if (!py_code) {
15701  py_code = __Pyx_CreateCodeObjectForTraceback(
15702  funcname, c_line, py_line, filename);
15703  if (!py_code) goto bad;
15704  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
15705  }
15706  py_frame = PyFrame_New(
15707  tstate, /*PyThreadState *tstate,*/
15708  py_code, /*PyCodeObject *code,*/
15709  __pyx_d, /*PyObject *globals,*/
15710  0 /*PyObject *locals*/
15711  );
15712  if (!py_frame) goto bad;
15713  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
15714  PyTraceBack_Here(py_frame);
15715 bad:
15716  Py_XDECREF(py_code);
15717  Py_XDECREF(py_frame);
15718 }
15719 
15720 /* CIntFromPyVerify */
15721  #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
15722  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
15723 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
15724  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
15725 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
15726  {\
15727  func_type value = func_value;\
15728  if (sizeof(target_type) < sizeof(func_type)) {\
15729  if (unlikely(value != (func_type) (target_type) value)) {\
15730  func_type zero = 0;\
15731  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
15732  return (target_type) -1;\
15733  if (is_unsigned && unlikely(value < zero))\
15734  goto raise_neg_overflow;\
15735  else\
15736  goto raise_overflow;\
15737  }\
15738  }\
15739  return (target_type) value;\
15740  }
15741 
15742 /* CIntToPy */
15743  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
15744  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
15745  const int is_unsigned = neg_one > const_zero;
15746  if (is_unsigned) {
15747  if (sizeof(int) < sizeof(long)) {
15748  return PyInt_FromLong((long) value);
15749  } else if (sizeof(int) <= sizeof(unsigned long)) {
15750  return PyLong_FromUnsignedLong((unsigned long) value);
15751 #ifdef HAVE_LONG_LONG
15752  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
15753  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
15754 #endif
15755  }
15756  } else {
15757  if (sizeof(int) <= sizeof(long)) {
15758  return PyInt_FromLong((long) value);
15759 #ifdef HAVE_LONG_LONG
15760  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
15761  return PyLong_FromLongLong((PY_LONG_LONG) value);
15762 #endif
15763  }
15764  }
15765  {
15766  int one = 1; int little = (int)*(unsigned char *)&one;
15767  unsigned char *bytes = (unsigned char *)&value;
15768  return _PyLong_FromByteArray(bytes, sizeof(int),
15769  little, !is_unsigned);
15770  }
15771 }
15772 
15773 /* CIntToPy */
15774  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
15775  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
15776  const int is_unsigned = neg_one > const_zero;
15777  if (is_unsigned) {
15778  if (sizeof(long) < sizeof(long)) {
15779  return PyInt_FromLong((long) value);
15780  } else if (sizeof(long) <= sizeof(unsigned long)) {
15781  return PyLong_FromUnsignedLong((unsigned long) value);
15782 #ifdef HAVE_LONG_LONG
15783  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
15784  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
15785 #endif
15786  }
15787  } else {
15788  if (sizeof(long) <= sizeof(long)) {
15789  return PyInt_FromLong((long) value);
15790 #ifdef HAVE_LONG_LONG
15791  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
15792  return PyLong_FromLongLong((PY_LONG_LONG) value);
15793 #endif
15794  }
15795  }
15796  {
15797  int one = 1; int little = (int)*(unsigned char *)&one;
15798  unsigned char *bytes = (unsigned char *)&value;
15799  return _PyLong_FromByteArray(bytes, sizeof(long),
15800  little, !is_unsigned);
15801  }
15802 }
15803 
15804 /* CIntFromPy */
15805  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
15806  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
15807  const int is_unsigned = neg_one > const_zero;
15808 #if PY_MAJOR_VERSION < 3
15809  if (likely(PyInt_Check(x))) {
15810  if (sizeof(int) < sizeof(long)) {
15811  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
15812  } else {
15813  long val = PyInt_AS_LONG(x);
15814  if (is_unsigned && unlikely(val < 0)) {
15815  goto raise_neg_overflow;
15816  }
15817  return (int) val;
15818  }
15819  } else
15820 #endif
15821  if (likely(PyLong_Check(x))) {
15822  if (is_unsigned) {
15823 #if CYTHON_USE_PYLONG_INTERNALS
15824  const digit* digits = ((PyLongObject*)x)->ob_digit;
15825  switch (Py_SIZE(x)) {
15826  case 0: return (int) 0;
15827  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
15828  case 2:
15829  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
15830  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
15831  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15832  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
15833  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
15834  }
15835  }
15836  break;
15837  case 3:
15838  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
15839  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
15840  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15841  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
15842  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
15843  }
15844  }
15845  break;
15846  case 4:
15847  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
15848  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
15849  __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])))
15850  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
15851  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
15852  }
15853  }
15854  break;
15855  }
15856 #endif
15857 #if CYTHON_COMPILING_IN_CPYTHON
15858  if (unlikely(Py_SIZE(x) < 0)) {
15859  goto raise_neg_overflow;
15860  }
15861 #else
15862  {
15863  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
15864  if (unlikely(result < 0))
15865  return (int) -1;
15866  if (unlikely(result == 1))
15867  goto raise_neg_overflow;
15868  }
15869 #endif
15870  if (sizeof(int) <= sizeof(unsigned long)) {
15871  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
15872 #ifdef HAVE_LONG_LONG
15873  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
15874  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
15875 #endif
15876  }
15877  } else {
15878 #if CYTHON_USE_PYLONG_INTERNALS
15879  const digit* digits = ((PyLongObject*)x)->ob_digit;
15880  switch (Py_SIZE(x)) {
15881  case 0: return (int) 0;
15882  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
15883  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
15884  case -2:
15885  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
15886  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
15887  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15888  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
15889  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
15890  }
15891  }
15892  break;
15893  case 2:
15894  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
15895  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
15896  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15897  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
15898  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
15899  }
15900  }
15901  break;
15902  case -3:
15903  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
15904  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
15905  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15906  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
15907  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
15908  }
15909  }
15910  break;
15911  case 3:
15912  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
15913  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
15914  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15915  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
15916  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
15917  }
15918  }
15919  break;
15920  case -4:
15921  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
15922  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
15923  __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])))
15924  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
15925  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
15926  }
15927  }
15928  break;
15929  case 4:
15930  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
15931  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
15932  __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])))
15933  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
15934  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
15935  }
15936  }
15937  break;
15938  }
15939 #endif
15940  if (sizeof(int) <= sizeof(long)) {
15941  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
15942 #ifdef HAVE_LONG_LONG
15943  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
15944  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
15945 #endif
15946  }
15947  }
15948  {
15949 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
15950  PyErr_SetString(PyExc_RuntimeError,
15951  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
15952 #else
15953  int val;
15954  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
15955  #if PY_MAJOR_VERSION < 3
15956  if (likely(v) && !PyLong_Check(v)) {
15957  PyObject *tmp = v;
15958  v = PyNumber_Long(tmp);
15959  Py_DECREF(tmp);
15960  }
15961  #endif
15962  if (likely(v)) {
15963  int one = 1; int is_little = (int)*(unsigned char *)&one;
15964  unsigned char *bytes = (unsigned char *)&val;
15965  int ret = _PyLong_AsByteArray((PyLongObject *)v,
15966  bytes, sizeof(val),
15967  is_little, !is_unsigned);
15968  Py_DECREF(v);
15969  if (likely(!ret))
15970  return val;
15971  }
15972 #endif
15973  return (int) -1;
15974  }
15975  } else {
15976  int val;
15977  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
15978  if (!tmp) return (int) -1;
15979  val = __Pyx_PyInt_As_int(tmp);
15980  Py_DECREF(tmp);
15981  return val;
15982  }
15983 raise_overflow:
15984  PyErr_SetString(PyExc_OverflowError,
15985  "value too large to convert to int");
15986  return (int) -1;
15987 raise_neg_overflow:
15988  PyErr_SetString(PyExc_OverflowError,
15989  "can't convert negative value to int");
15990  return (int) -1;
15991 }
15992 
15993 /* CIntFromPy */
15994  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
15995  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
15996  const int is_unsigned = neg_one > const_zero;
15997 #if PY_MAJOR_VERSION < 3
15998  if (likely(PyInt_Check(x))) {
15999  if (sizeof(long) < sizeof(long)) {
16000  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
16001  } else {
16002  long val = PyInt_AS_LONG(x);
16003  if (is_unsigned && unlikely(val < 0)) {
16004  goto raise_neg_overflow;
16005  }
16006  return (long) val;
16007  }
16008  } else
16009 #endif
16010  if (likely(PyLong_Check(x))) {
16011  if (is_unsigned) {
16012 #if CYTHON_USE_PYLONG_INTERNALS
16013  const digit* digits = ((PyLongObject*)x)->ob_digit;
16014  switch (Py_SIZE(x)) {
16015  case 0: return (long) 0;
16016  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
16017  case 2:
16018  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
16019  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
16020  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
16021  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
16022  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
16023  }
16024  }
16025  break;
16026  case 3:
16027  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
16028  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
16029  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
16030  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
16031  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
16032  }
16033  }
16034  break;
16035  case 4:
16036  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
16037  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
16038  __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])))
16039  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
16040  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
16041  }
16042  }
16043  break;
16044  }
16045 #endif
16046 #if CYTHON_COMPILING_IN_CPYTHON
16047  if (unlikely(Py_SIZE(x) < 0)) {
16048  goto raise_neg_overflow;
16049  }
16050 #else
16051  {
16052  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
16053  if (unlikely(result < 0))
16054  return (long) -1;
16055  if (unlikely(result == 1))
16056  goto raise_neg_overflow;
16057  }
16058 #endif
16059  if (sizeof(long) <= sizeof(unsigned long)) {
16060  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
16061 #ifdef HAVE_LONG_LONG
16062  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
16063  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
16064 #endif
16065  }
16066  } else {
16067 #if CYTHON_USE_PYLONG_INTERNALS
16068  const digit* digits = ((PyLongObject*)x)->ob_digit;
16069  switch (Py_SIZE(x)) {
16070  case 0: return (long) 0;
16071  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
16072  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
16073  case -2:
16074  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
16075  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
16076  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
16077  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
16078  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
16079  }
16080  }
16081  break;
16082  case 2:
16083  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
16084  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
16085  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
16086  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
16087  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
16088  }
16089  }
16090  break;
16091  case -3:
16092  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
16093  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
16094  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
16095  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
16096  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
16097  }
16098  }
16099  break;
16100  case 3:
16101  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
16102  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
16103  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
16104  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
16105  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
16106  }
16107  }
16108  break;
16109  case -4:
16110  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
16111  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
16112  __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])))
16113  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
16114  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
16115  }
16116  }
16117  break;
16118  case 4:
16119  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
16120  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
16121  __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])))
16122  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
16123  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
16124  }
16125  }
16126  break;
16127  }
16128 #endif
16129  if (sizeof(long) <= sizeof(long)) {
16130  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
16131 #ifdef HAVE_LONG_LONG
16132  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
16133  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
16134 #endif
16135  }
16136  }
16137  {
16138 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
16139  PyErr_SetString(PyExc_RuntimeError,
16140  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
16141 #else
16142  long val;
16143  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
16144  #if PY_MAJOR_VERSION < 3
16145  if (likely(v) && !PyLong_Check(v)) {
16146  PyObject *tmp = v;
16147  v = PyNumber_Long(tmp);
16148  Py_DECREF(tmp);
16149  }
16150  #endif
16151  if (likely(v)) {
16152  int one = 1; int is_little = (int)*(unsigned char *)&one;
16153  unsigned char *bytes = (unsigned char *)&val;
16154  int ret = _PyLong_AsByteArray((PyLongObject *)v,
16155  bytes, sizeof(val),
16156  is_little, !is_unsigned);
16157  Py_DECREF(v);
16158  if (likely(!ret))
16159  return val;
16160  }
16161 #endif
16162  return (long) -1;
16163  }
16164  } else {
16165  long val;
16166  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
16167  if (!tmp) return (long) -1;
16168  val = __Pyx_PyInt_As_long(tmp);
16169  Py_DECREF(tmp);
16170  return val;
16171  }
16172 raise_overflow:
16173  PyErr_SetString(PyExc_OverflowError,
16174  "value too large to convert to long");
16175  return (long) -1;
16176 raise_neg_overflow:
16177  PyErr_SetString(PyExc_OverflowError,
16178  "can't convert negative value to long");
16179  return (long) -1;
16180 }
16181 
16182 /* FastTypeChecks */
16183  #if CYTHON_COMPILING_IN_CPYTHON
16184 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
16185  while (a) {
16186  a = a->tp_base;
16187  if (a == b)
16188  return 1;
16189  }
16190  return b == &PyBaseObject_Type;
16191 }
16192 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
16193  PyObject *mro;
16194  if (a == b) return 1;
16195  mro = a->tp_mro;
16196  if (likely(mro)) {
16197  Py_ssize_t i, n;
16198  n = PyTuple_GET_SIZE(mro);
16199  for (i = 0; i < n; i++) {
16200  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
16201  return 1;
16202  }
16203  return 0;
16204  }
16205  return __Pyx_InBases(a, b);
16206 }
16207 #if PY_MAJOR_VERSION == 2
16208 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
16209  PyObject *exception, *value, *tb;
16210  int res;
16211  __Pyx_PyThreadState_declare
16212  __Pyx_PyThreadState_assign
16213  __Pyx_ErrFetch(&exception, &value, &tb);
16214  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
16215  if (unlikely(res == -1)) {
16216  PyErr_WriteUnraisable(err);
16217  res = 0;
16218  }
16219  if (!res) {
16220  res = PyObject_IsSubclass(err, exc_type2);
16221  if (unlikely(res == -1)) {
16222  PyErr_WriteUnraisable(err);
16223  res = 0;
16224  }
16225  }
16226  __Pyx_ErrRestore(exception, value, tb);
16227  return res;
16228 }
16229 #else
16230 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
16231  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
16232  if (!res) {
16233  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
16234  }
16235  return res;
16236 }
16237 #endif
16238 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
16239  Py_ssize_t i, n;
16240  assert(PyExceptionClass_Check(exc_type));
16241  n = PyTuple_GET_SIZE(tuple);
16242 #if PY_MAJOR_VERSION >= 3
16243  for (i=0; i<n; i++) {
16244  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
16245  }
16246 #endif
16247  for (i=0; i<n; i++) {
16248  PyObject *t = PyTuple_GET_ITEM(tuple, i);
16249  #if PY_MAJOR_VERSION < 3
16250  if (likely(exc_type == t)) return 1;
16251  #endif
16252  if (likely(PyExceptionClass_Check(t))) {
16253  if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
16254  } else {
16255  }
16256  }
16257  return 0;
16258 }
16259 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
16260  if (likely(err == exc_type)) return 1;
16261  if (likely(PyExceptionClass_Check(err))) {
16262  if (likely(PyExceptionClass_Check(exc_type))) {
16263  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
16264  } else if (likely(PyTuple_Check(exc_type))) {
16265  return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
16266  } else {
16267  }
16268  }
16269  return PyErr_GivenExceptionMatches(err, exc_type);
16270 }
16271 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
16272  assert(PyExceptionClass_Check(exc_type1));
16273  assert(PyExceptionClass_Check(exc_type2));
16274  if (likely(err == exc_type1 || err == exc_type2)) return 1;
16275  if (likely(PyExceptionClass_Check(err))) {
16276  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
16277  }
16278  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
16279 }
16280 #endif
16281 
16282 /* CheckBinaryVersion */
16283  static int __Pyx_check_binary_version(void) {
16284  char ctversion[4], rtversion[4];
16285  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
16286  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
16287  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
16288  char message[200];
16289  PyOS_snprintf(message, sizeof(message),
16290  "compiletime version %s of module '%.100s' "
16291  "does not match runtime version %s",
16292  ctversion, __Pyx_MODULE_NAME, rtversion);
16293  return PyErr_WarnEx(NULL, message, 1);
16294  }
16295  return 0;
16296 }
16297 
16298 /* InitStrings */
16299  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
16300  while (t->p) {
16301  #if PY_MAJOR_VERSION < 3
16302  if (t->is_unicode) {
16303  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
16304  } else if (t->intern) {
16305  *t->p = PyString_InternFromString(t->s);
16306  } else {
16307  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
16308  }
16309  #else
16310  if (t->is_unicode | t->is_str) {
16311  if (t->intern) {
16312  *t->p = PyUnicode_InternFromString(t->s);
16313  } else if (t->encoding) {
16314  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
16315  } else {
16316  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
16317  }
16318  } else {
16319  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
16320  }
16321  #endif
16322  if (!*t->p)
16323  return -1;
16324  if (PyObject_Hash(*t->p) == -1)
16325  return -1;
16326  ++t;
16327  }
16328  return 0;
16329 }
16330 
16331 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
16332  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
16333 }
16334 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
16335  Py_ssize_t ignore;
16336  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
16337 }
16338 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
16339 #if !CYTHON_PEP393_ENABLED
16340 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
16341  char* defenc_c;
16342  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
16343  if (!defenc) return NULL;
16344  defenc_c = PyBytes_AS_STRING(defenc);
16345 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
16346  {
16347  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
16348  char* c;
16349  for (c = defenc_c; c < end; c++) {
16350  if ((unsigned char) (*c) >= 128) {
16351  PyUnicode_AsASCIIString(o);
16352  return NULL;
16353  }
16354  }
16355  }
16356 #endif
16357  *length = PyBytes_GET_SIZE(defenc);
16358  return defenc_c;
16359 }
16360 #else
16361 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
16362  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
16363 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
16364  if (likely(PyUnicode_IS_ASCII(o))) {
16365  *length = PyUnicode_GET_LENGTH(o);
16366  return PyUnicode_AsUTF8(o);
16367  } else {
16368  PyUnicode_AsASCIIString(o);
16369  return NULL;
16370  }
16371 #else
16372  return PyUnicode_AsUTF8AndSize(o, length);
16373 #endif
16374 }
16375 #endif
16376 #endif
16377 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
16378 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
16379  if (
16380 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
16381  __Pyx_sys_getdefaultencoding_not_ascii &&
16382 #endif
16383  PyUnicode_Check(o)) {
16384  return __Pyx_PyUnicode_AsStringAndSize(o, length);
16385  } else
16386 #endif
16387 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
16388  if (PyByteArray_Check(o)) {
16389  *length = PyByteArray_GET_SIZE(o);
16390  return PyByteArray_AS_STRING(o);
16391  } else
16392 #endif
16393  {
16394  char* result;
16395  int r = PyBytes_AsStringAndSize(o, &result, length);
16396  if (unlikely(r < 0)) {
16397  return NULL;
16398  } else {
16399  return result;
16400  }
16401  }
16402 }
16403 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
16404  int is_true = x == Py_True;
16405  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
16406  else return PyObject_IsTrue(x);
16407 }
16408 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
16409  int retval;
16410  if (unlikely(!x)) return -1;
16411  retval = __Pyx_PyObject_IsTrue(x);
16412  Py_DECREF(x);
16413  return retval;
16414 }
16415 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
16416 #if PY_MAJOR_VERSION >= 3
16417  if (PyLong_Check(result)) {
16418  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
16419  "__int__ returned non-int (type %.200s). "
16420  "The ability to return an instance of a strict subclass of int "
16421  "is deprecated, and may be removed in a future version of Python.",
16422  Py_TYPE(result)->tp_name)) {
16423  Py_DECREF(result);
16424  return NULL;
16425  }
16426  return result;
16427  }
16428 #endif
16429  PyErr_Format(PyExc_TypeError,
16430  "__%.4s__ returned non-%.4s (type %.200s)",
16431  type_name, type_name, Py_TYPE(result)->tp_name);
16432  Py_DECREF(result);
16433  return NULL;
16434 }
16435 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
16436 #if CYTHON_USE_TYPE_SLOTS
16437  PyNumberMethods *m;
16438 #endif
16439  const char *name = NULL;
16440  PyObject *res = NULL;
16441 #if PY_MAJOR_VERSION < 3
16442  if (likely(PyInt_Check(x) || PyLong_Check(x)))
16443 #else
16444  if (likely(PyLong_Check(x)))
16445 #endif
16446  return __Pyx_NewRef(x);
16447 #if CYTHON_USE_TYPE_SLOTS
16448  m = Py_TYPE(x)->tp_as_number;
16449  #if PY_MAJOR_VERSION < 3
16450  if (m && m->nb_int) {
16451  name = "int";
16452  res = m->nb_int(x);
16453  }
16454  else if (m && m->nb_long) {
16455  name = "long";
16456  res = m->nb_long(x);
16457  }
16458  #else
16459  if (likely(m && m->nb_int)) {
16460  name = "int";
16461  res = m->nb_int(x);
16462  }
16463  #endif
16464 #else
16465  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
16466  res = PyNumber_Int(x);
16467  }
16468 #endif
16469  if (likely(res)) {
16470 #if PY_MAJOR_VERSION < 3
16471  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
16472 #else
16473  if (unlikely(!PyLong_CheckExact(res))) {
16474 #endif
16475  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
16476  }
16477  }
16478  else if (!PyErr_Occurred()) {
16479  PyErr_SetString(PyExc_TypeError,
16480  "an integer is required");
16481  }
16482  return res;
16483 }
16484 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
16485  Py_ssize_t ival;
16486  PyObject *x;
16487 #if PY_MAJOR_VERSION < 3
16488  if (likely(PyInt_CheckExact(b))) {
16489  if (sizeof(Py_ssize_t) >= sizeof(long))
16490  return PyInt_AS_LONG(b);
16491  else
16492  return PyInt_AsSsize_t(b);
16493  }
16494 #endif
16495  if (likely(PyLong_CheckExact(b))) {
16496  #if CYTHON_USE_PYLONG_INTERNALS
16497  const digit* digits = ((PyLongObject*)b)->ob_digit;
16498  const Py_ssize_t size = Py_SIZE(b);
16499  if (likely(__Pyx_sst_abs(size) <= 1)) {
16500  ival = likely(size) ? digits[0] : 0;
16501  if (size == -1) ival = -ival;
16502  return ival;
16503  } else {
16504  switch (size) {
16505  case 2:
16506  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
16507  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
16508  }
16509  break;
16510  case -2:
16511  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
16512  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
16513  }
16514  break;
16515  case 3:
16516  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
16517  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
16518  }
16519  break;
16520  case -3:
16521  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
16522  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
16523  }
16524  break;
16525  case 4:
16526  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
16527  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]));
16528  }
16529  break;
16530  case -4:
16531  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
16532  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]));
16533  }
16534  break;
16535  }
16536  }
16537  #endif
16538  return PyLong_AsSsize_t(b);
16539  }
16540  x = PyNumber_Index(b);
16541  if (!x) return -1;
16542  ival = PyInt_AsSsize_t(x);
16543  Py_DECREF(x);
16544  return ival;
16545 }
16546 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
16547  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
16548 }
16549 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
16550  return PyInt_FromSize_t(ival);
16551 }
16552 
16553 
16554 #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
u5 which has been done in the LOCALGRANULEID metadata should have an extension NRT It is requested to identify the NRT production Changes from v6 which may affect scientific the sector rotation may actually occur during one of the scans earlier than the one where it is first reported As a the b1 values are about the LOCALGRANULEID metadata should have an extension NRT It is requested to identify the NRT to fill pixels affected by dead subframes with a special value Output the metadata of noisy and dead subframe Dead Subframe EV and Detector Quality Flag2 Removed the function call of Fill_Dead_Detector_SI to stop interpolating SI values for dead but also for all downstream products for science test only Changes from v5 which will affect scientific to conform to MODIS requirements Removed the Mixed option from the ScanType in the code because the L1A Scan Type is never Mixed Changed for ANSI C compliance and comments to better document the fact that when the HDF_EOS metadata is stricly the and products are off by and in the track respectively Corrected some misspelling of RCS swir_oob_sending_detector to the Reflective LUTs to enable the SWIR OOB correction detector so that if any of the sending detectors becomes noisy or non near by good detectors from the same sending band can be specified as the substitute in the new look up table Code change for adding an additional dimension of mirror side to the Band_21_b1 LUT to separate the coefficient of the two mirror sides for just like other thermal emissive so that the L1B code can calibrate Band scan to scan with mirror side dependency which leads better calibration result Changes which do not affect scientific when the EV data are not provided in this Crosstalk Correction will not be performed to the Band calibration data Changes which do not affect scientific and BB_500m in L1A Logic was added to turn off the or to spatial aggregation processes and the EV_250m_Aggr1km_RefSB and EV_500m_Aggr1km_RefSB fields were set to fill values when SDSs EV_250m and EV_500m are absent in L1A file Logic was added to skip the processing and turn off the output of the L1B QKM and HKM EV data when EV_250m and EV_500m are absent from L1A In this case
Definition: HISTORY.txt:343
float tp[MODELMAX]
Definition: atrem_corl1.h:173
character(len=1000) if
Definition: names.f90:13
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