Skip to content
Snippets Groups Projects
ancillary.c 899 KiB
Newer Older
Paolo Veglio's avatar
Paolo Veglio committed
3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("py_get_NDVI_background (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lat,&__pyx_n_s_lon,&__pyx_n_s_anc_dir,&__pyx_n_s_ndvi_file,&__pyx_n_s_ndvi,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lat)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lon)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("py_get_NDVI_background", 1, 5, 5, 1); __PYX_ERR(0, 39, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_anc_dir)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("py_get_NDVI_background", 1, 5, 5, 2); __PYX_ERR(0, 39, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ndvi_file)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("py_get_NDVI_background", 1, 5, 5, 3); __PYX_ERR(0, 39, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ndvi)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("py_get_NDVI_background", 1, 5, 5, 4); __PYX_ERR(0, 39, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "py_get_NDVI_background") < 0)) __PYX_ERR(0, 39, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_lat = ((PyArrayObject *)values[0]);
    __pyx_v_lon = ((PyArrayObject *)values[1]);
    __pyx_v_anc_dir = __Pyx_PyObject_AsWritableString(values[2]); if (unlikely((!__pyx_v_anc_dir) && PyErr_Occurred())) __PYX_ERR(0, 41, __pyx_L3_error)
    __pyx_v_ndvi_file = __Pyx_PyObject_AsWritableString(values[3]); if (unlikely((!__pyx_v_ndvi_file) && PyErr_Occurred())) __PYX_ERR(0, 41, __pyx_L3_error)
    __pyx_v_ndvi = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("py_get_NDVI_background", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 39, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("ancillary_data.py_get_NDVI_background", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lat), __pyx_ptype_5numpy_ndarray, 1, "lat", 0))) __PYX_ERR(0, 39, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lon), __pyx_ptype_5numpy_ndarray, 1, "lon", 0))) __PYX_ERR(0, 40, __pyx_L1_error)
  __pyx_r = __pyx_pf_14ancillary_data_2py_get_NDVI_background(__pyx_self, __pyx_v_lat, __pyx_v_lon, __pyx_v_anc_dir, __pyx_v_ndvi_file, __pyx_v_ndvi);

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

static PyObject *__pyx_pf_14ancillary_data_2py_get_NDVI_background(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_lat, PyArrayObject *__pyx_v_lon, char *__pyx_v_anc_dir, char *__pyx_v_ndvi_file, PyObject *__pyx_v_ndvi) {
  __Pyx_memviewslice __pyx_v_ndvi_mv = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_LocalBuf_ND __pyx_pybuffernd_lat;
  __Pyx_Buffer __pyx_pybuffer_lat;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_lon;
  __Pyx_Buffer __pyx_pybuffer_lon;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("py_get_NDVI_background", 0);
  __Pyx_INCREF(__pyx_v_ndvi);
  __pyx_pybuffer_lat.pybuffer.buf = NULL;
  __pyx_pybuffer_lat.refcount = 0;
  __pyx_pybuffernd_lat.data = NULL;
  __pyx_pybuffernd_lat.rcbuffer = &__pyx_pybuffer_lat;
  __pyx_pybuffer_lon.pybuffer.buf = NULL;
  __pyx_pybuffer_lon.refcount = 0;
  __pyx_pybuffernd_lon.data = NULL;
  __pyx_pybuffernd_lon.rcbuffer = &__pyx_pybuffer_lon;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lat.rcbuffer->pybuffer, (PyObject*)__pyx_v_lat, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 39, __pyx_L1_error)
  }
  __pyx_pybuffernd_lat.diminfo[0].strides = __pyx_pybuffernd_lat.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lat.diminfo[0].shape = __pyx_pybuffernd_lat.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lon.rcbuffer->pybuffer, (PyObject*)__pyx_v_lon, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 39, __pyx_L1_error)
  }
  __pyx_pybuffernd_lon.diminfo[0].strides = __pyx_pybuffernd_lon.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lon.diminfo[0].shape = __pyx_pybuffernd_lon.rcbuffer->pybuffer.shape[0];

  /* "ancillary.pyx":43
 *                            char *anc_dir, char *ndvi_file, ndvi):
 * 
 *     if not ndvi.flags['C_CONTIGUOUS']:             # <<<<<<<<<<<<<<
 *         ndvi = np.ascontiguousarray(ndvi)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ndvi, __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_C_CONTIGUOUS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = ((!__pyx_t_3) != 0);
  if (__pyx_t_4) {

    /* "ancillary.pyx":44
 * 
 *     if not ndvi.flags['C_CONTIGUOUS']:
 *         ndvi = np.ascontiguousarray(ndvi)             # <<<<<<<<<<<<<<
 * 
 *     cdef float[::1] ndvi_mv = ndvi
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 44, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, __pyx_v_ndvi) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_ndvi);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_ndvi, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "ancillary.pyx":43
 *                            char *anc_dir, char *ndvi_file, ndvi):
 * 
 *     if not ndvi.flags['C_CONTIGUOUS']:             # <<<<<<<<<<<<<<
 *         ndvi = np.ascontiguousarray(ndvi)
 * 
 */
  }

  /* "ancillary.pyx":46
 *         ndvi = np.ascontiguousarray(ndvi)
 * 
 *     cdef float[::1] ndvi_mv = ndvi             # <<<<<<<<<<<<<<
 * 
 *     get_NDVI_background(&lat[0], &lon[0], anc_dir, ndvi_file, &ndvi_mv[0])
 */
  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_v_ndvi, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 46, __pyx_L1_error)
  __pyx_v_ndvi_mv = __pyx_t_6;
  __pyx_t_6.memview = NULL;
  __pyx_t_6.data = NULL;

  /* "ancillary.pyx":48
 *     cdef float[::1] ndvi_mv = ndvi
 * 
 *     get_NDVI_background(&lat[0], &lon[0], anc_dir, ndvi_file, &ndvi_mv[0])             # <<<<<<<<<<<<<<
 * 
 *     return ndvi
 */
  __pyx_t_7 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_7 < 0) {
    __pyx_t_7 += __pyx_pybuffernd_lat.diminfo[0].shape;
    if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_lat.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 48, __pyx_L1_error)
  }
  __pyx_t_9 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_9 < 0) {
    __pyx_t_9 += __pyx_pybuffernd_lon.diminfo[0].shape;
    if (unlikely(__pyx_t_9 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_lon.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 48, __pyx_L1_error)
  }
  __pyx_t_10 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_10 < 0) {
    __pyx_t_10 += __pyx_v_ndvi_mv.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_10 >= __pyx_v_ndvi_mv.shape[0])) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 48, __pyx_L1_error)
  }
  get_NDVI_background((&(*__Pyx_BufPtrStrided1d(float *, __pyx_pybuffernd_lat.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_lat.diminfo[0].strides))), (&(*__Pyx_BufPtrStrided1d(float *, __pyx_pybuffernd_lon.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_lon.diminfo[0].strides))), __pyx_v_anc_dir, __pyx_v_ndvi_file, (&(*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_ndvi_mv.data) + __pyx_t_10)) )))));

  /* "ancillary.pyx":50
 *     get_NDVI_background(&lat[0], &lon[0], anc_dir, ndvi_file, &ndvi_mv[0])
 * 
 *     return ndvi             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ndvi);
  __pyx_r = __pyx_v_ndvi;
  goto __pyx_L0;

  /* "ancillary.pyx":39
 * 
 * 
 * def py_get_NDVI_background(np.ndarray[float, ndim=1] lat,             # <<<<<<<<<<<<<<
 *                            np.ndarray[float, ndim=1] lon,
 *                            char *anc_dir, char *ndvi_file, ndvi):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lat.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lon.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("ancillary_data.py_get_NDVI_background", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lat.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lon.rcbuffer->pybuffer);
  __pyx_L2:;
  __PYX_XDEC_MEMVIEW(&__pyx_v_ndvi_mv, 1);
  __Pyx_XDECREF(__pyx_v_ndvi);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ancillary.pyx":53
 * 
 * 
 * def py_get_Olson_eco(np.ndarray[float, ndim=1] lat,             # <<<<<<<<<<<<<<
 *                      np.ndarray[float, ndim=1] lon,
 *                      char *anc_dir, eco):
 */

/* Python wrapper */
static PyObject *__pyx_pw_14ancillary_data_5py_get_Olson_eco(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_14ancillary_data_5py_get_Olson_eco = {"py_get_Olson_eco", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_14ancillary_data_5py_get_Olson_eco, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_14ancillary_data_5py_get_Olson_eco(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_lat = 0;
  PyArrayObject *__pyx_v_lon = 0;
  char *__pyx_v_anc_dir;
  PyObject *__pyx_v_eco = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("py_get_Olson_eco (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lat,&__pyx_n_s_lon,&__pyx_n_s_anc_dir,&__pyx_n_s_eco,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lat)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lon)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("py_get_Olson_eco", 1, 4, 4, 1); __PYX_ERR(0, 53, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_anc_dir)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("py_get_Olson_eco", 1, 4, 4, 2); __PYX_ERR(0, 53, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eco)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("py_get_Olson_eco", 1, 4, 4, 3); __PYX_ERR(0, 53, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "py_get_Olson_eco") < 0)) __PYX_ERR(0, 53, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_lat = ((PyArrayObject *)values[0]);
    __pyx_v_lon = ((PyArrayObject *)values[1]);
    __pyx_v_anc_dir = __Pyx_PyObject_AsWritableString(values[2]); if (unlikely((!__pyx_v_anc_dir) && PyErr_Occurred())) __PYX_ERR(0, 55, __pyx_L3_error)
    __pyx_v_eco = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("py_get_Olson_eco", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 53, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("ancillary_data.py_get_Olson_eco", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lat), __pyx_ptype_5numpy_ndarray, 1, "lat", 0))) __PYX_ERR(0, 53, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lon), __pyx_ptype_5numpy_ndarray, 1, "lon", 0))) __PYX_ERR(0, 54, __pyx_L1_error)
  __pyx_r = __pyx_pf_14ancillary_data_4py_get_Olson_eco(__pyx_self, __pyx_v_lat, __pyx_v_lon, __pyx_v_anc_dir, __pyx_v_eco);

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

static PyObject *__pyx_pf_14ancillary_data_4py_get_Olson_eco(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_lat, PyArrayObject *__pyx_v_lon, char *__pyx_v_anc_dir, PyObject *__pyx_v_eco) {
  __Pyx_memviewslice __pyx_v_eco_mv = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_LocalBuf_ND __pyx_pybuffernd_lat;
  __Pyx_Buffer __pyx_pybuffer_lat;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_lon;
  __Pyx_Buffer __pyx_pybuffer_lon;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("py_get_Olson_eco", 0);
  __Pyx_INCREF(__pyx_v_eco);
  __pyx_pybuffer_lat.pybuffer.buf = NULL;
  __pyx_pybuffer_lat.refcount = 0;
  __pyx_pybuffernd_lat.data = NULL;
  __pyx_pybuffernd_lat.rcbuffer = &__pyx_pybuffer_lat;
  __pyx_pybuffer_lon.pybuffer.buf = NULL;
  __pyx_pybuffer_lon.refcount = 0;
  __pyx_pybuffernd_lon.data = NULL;
  __pyx_pybuffernd_lon.rcbuffer = &__pyx_pybuffer_lon;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lat.rcbuffer->pybuffer, (PyObject*)__pyx_v_lat, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 53, __pyx_L1_error)
  }
  __pyx_pybuffernd_lat.diminfo[0].strides = __pyx_pybuffernd_lat.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lat.diminfo[0].shape = __pyx_pybuffernd_lat.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lon.rcbuffer->pybuffer, (PyObject*)__pyx_v_lon, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 53, __pyx_L1_error)
  }
  __pyx_pybuffernd_lon.diminfo[0].strides = __pyx_pybuffernd_lon.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lon.diminfo[0].shape = __pyx_pybuffernd_lon.rcbuffer->pybuffer.shape[0];

  /* "ancillary.pyx":57
 *                      char *anc_dir, eco):
 * 
 *     if not eco.flags['C_CONTIGUOUS']:             # <<<<<<<<<<<<<<
 *         eco = np.ascontiguousarray(eco)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_eco, __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_C_CONTIGUOUS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = ((!__pyx_t_3) != 0);
  if (__pyx_t_4) {

    /* "ancillary.pyx":58
 * 
 *     if not eco.flags['C_CONTIGUOUS']:
 *         eco = np.ascontiguousarray(eco)             # <<<<<<<<<<<<<<
 * 
 *     cdef unsigned char[::1] eco_mv = eco
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 58, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, __pyx_v_eco) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_eco);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_eco, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "ancillary.pyx":57
 *                      char *anc_dir, eco):
 * 
 *     if not eco.flags['C_CONTIGUOUS']:             # <<<<<<<<<<<<<<
 *         eco = np.ascontiguousarray(eco)
 * 
 */
  }

  /* "ancillary.pyx":60
 *         eco = np.ascontiguousarray(eco)
 * 
 *     cdef unsigned char[::1] eco_mv = eco             # <<<<<<<<<<<<<<
 * 
 *     get_Olson_eco(&lat[0], &lon[0], anc_dir, &eco_mv[0])
 */
  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_char(__pyx_v_eco, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 60, __pyx_L1_error)
  __pyx_v_eco_mv = __pyx_t_6;
  __pyx_t_6.memview = NULL;
  __pyx_t_6.data = NULL;

  /* "ancillary.pyx":62
 *     cdef unsigned char[::1] eco_mv = eco
 * 
 *     get_Olson_eco(&lat[0], &lon[0], anc_dir, &eco_mv[0])             # <<<<<<<<<<<<<<
 * 
 *     return eco
 */
  __pyx_t_7 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_7 < 0) {
    __pyx_t_7 += __pyx_pybuffernd_lat.diminfo[0].shape;
    if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_lat.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 62, __pyx_L1_error)
  }
  __pyx_t_9 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_9 < 0) {
    __pyx_t_9 += __pyx_pybuffernd_lon.diminfo[0].shape;
    if (unlikely(__pyx_t_9 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_lon.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 62, __pyx_L1_error)
  }
  __pyx_t_10 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_10 < 0) {
    __pyx_t_10 += __pyx_v_eco_mv.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_10 >= __pyx_v_eco_mv.shape[0])) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 62, __pyx_L1_error)
  }
  get_Olson_eco((&(*__Pyx_BufPtrStrided1d(float *, __pyx_pybuffernd_lat.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_lat.diminfo[0].strides))), (&(*__Pyx_BufPtrStrided1d(float *, __pyx_pybuffernd_lon.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_lon.diminfo[0].strides))), __pyx_v_anc_dir, (&(*((unsigned char *) ( /* dim=0 */ ((char *) (((unsigned char *) __pyx_v_eco_mv.data) + __pyx_t_10)) )))));

  /* "ancillary.pyx":64
 *     get_Olson_eco(&lat[0], &lon[0], anc_dir, &eco_mv[0])
 * 
 *     return eco             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_eco);
  __pyx_r = __pyx_v_eco;
  goto __pyx_L0;

  /* "ancillary.pyx":53
 * 
 * 
 * def py_get_Olson_eco(np.ndarray[float, ndim=1] lat,             # <<<<<<<<<<<<<<
 *                      np.ndarray[float, ndim=1] lon,
 *                      char *anc_dir, eco):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lat.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lon.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("ancillary_data.py_get_Olson_eco", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lat.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lon.rcbuffer->pybuffer);
  __pyx_L2:;
  __PYX_XDEC_MEMVIEW(&__pyx_v_eco_mv, 1);
  __Pyx_XDECREF(__pyx_v_eco);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ancillary.pyx":67
 * 
 * 
 * def py_get_GEOS(np.ndarray[float, ndim=1] lat, np.ndarray[float, ndim=1] lon, char *startTime,             # <<<<<<<<<<<<<<
 *                 char *anc_dir, char *geos1, char *geos2, char *geos_lnd, char *geos_ocn, char *geos_cnst,
 *                 geos_data): #  tpw, snowfr, icefr, ocnfr, landicefr, sfct):
Paolo Veglio's avatar
Paolo Veglio committed
 */

/* Python wrapper */
static PyObject *__pyx_pw_14ancillary_data_7py_get_GEOS(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_14ancillary_data_7py_get_GEOS = {"py_get_GEOS", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_14ancillary_data_7py_get_GEOS, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_14ancillary_data_7py_get_GEOS(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_lat = 0;
  PyArrayObject *__pyx_v_lon = 0;
  char *__pyx_v_startTime;
  char *__pyx_v_anc_dir;
  char *__pyx_v_geos1;
  char *__pyx_v_geos2;
  char *__pyx_v_geos_lnd;
  char *__pyx_v_geos_ocn;
  char *__pyx_v_geos_cnst;
  PyObject *__pyx_v_geos_data = 0;
Paolo Veglio's avatar
Paolo Veglio committed
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("py_get_GEOS (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lat,&__pyx_n_s_lon,&__pyx_n_s_startTime,&__pyx_n_s_anc_dir,&__pyx_n_s_geos1,&__pyx_n_s_geos2,&__pyx_n_s_geos_lnd,&__pyx_n_s_geos_ocn,&__pyx_n_s_geos_cnst,&__pyx_n_s_geos_data,0};
    PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
Paolo Veglio's avatar
Paolo Veglio committed
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lat)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lon)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("py_get_GEOS", 1, 10, 10, 1); __PYX_ERR(0, 67, __pyx_L3_error)
Paolo Veglio's avatar
Paolo Veglio committed
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_startTime)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("py_get_GEOS", 1, 10, 10, 2); __PYX_ERR(0, 67, __pyx_L3_error)
Paolo Veglio's avatar
Paolo Veglio committed
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_anc_dir)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("py_get_GEOS", 1, 10, 10, 3); __PYX_ERR(0, 67, __pyx_L3_error)
Paolo Veglio's avatar
Paolo Veglio committed
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_geos1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("py_get_GEOS", 1, 10, 10, 4); __PYX_ERR(0, 67, __pyx_L3_error)
Paolo Veglio's avatar
Paolo Veglio committed
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_geos2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("py_get_GEOS", 1, 10, 10, 5); __PYX_ERR(0, 67, __pyx_L3_error)
Paolo Veglio's avatar
Paolo Veglio committed
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_geos_lnd)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("py_get_GEOS", 1, 10, 10, 6); __PYX_ERR(0, 67, __pyx_L3_error)
Paolo Veglio's avatar
Paolo Veglio committed
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_geos_ocn)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("py_get_GEOS", 1, 10, 10, 7); __PYX_ERR(0, 67, __pyx_L3_error)
Paolo Veglio's avatar
Paolo Veglio committed
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_geos_cnst)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("py_get_GEOS", 1, 10, 10, 8); __PYX_ERR(0, 67, __pyx_L3_error)
Paolo Veglio's avatar
Paolo Veglio committed
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_geos_data)) != 0)) kw_args--;
Paolo Veglio's avatar
Paolo Veglio committed
        else {
          __Pyx_RaiseArgtupleInvalid("py_get_GEOS", 1, 10, 10, 9); __PYX_ERR(0, 67, __pyx_L3_error)
Paolo Veglio's avatar
Paolo Veglio committed
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "py_get_GEOS") < 0)) __PYX_ERR(0, 67, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 10) {
Paolo Veglio's avatar
Paolo Veglio committed
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
      values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
      values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
    }
    __pyx_v_lat = ((PyArrayObject *)values[0]);
    __pyx_v_lon = ((PyArrayObject *)values[1]);
    __pyx_v_startTime = __Pyx_PyObject_AsWritableString(values[2]); if (unlikely((!__pyx_v_startTime) && PyErr_Occurred())) __PYX_ERR(0, 67, __pyx_L3_error)
    __pyx_v_anc_dir = __Pyx_PyObject_AsWritableString(values[3]); if (unlikely((!__pyx_v_anc_dir) && PyErr_Occurred())) __PYX_ERR(0, 68, __pyx_L3_error)
    __pyx_v_geos1 = __Pyx_PyObject_AsWritableString(values[4]); if (unlikely((!__pyx_v_geos1) && PyErr_Occurred())) __PYX_ERR(0, 68, __pyx_L3_error)
    __pyx_v_geos2 = __Pyx_PyObject_AsWritableString(values[5]); if (unlikely((!__pyx_v_geos2) && PyErr_Occurred())) __PYX_ERR(0, 68, __pyx_L3_error)
    __pyx_v_geos_lnd = __Pyx_PyObject_AsWritableString(values[6]); if (unlikely((!__pyx_v_geos_lnd) && PyErr_Occurred())) __PYX_ERR(0, 68, __pyx_L3_error)
    __pyx_v_geos_ocn = __Pyx_PyObject_AsWritableString(values[7]); if (unlikely((!__pyx_v_geos_ocn) && PyErr_Occurred())) __PYX_ERR(0, 68, __pyx_L3_error)
    __pyx_v_geos_cnst = __Pyx_PyObject_AsWritableString(values[8]); if (unlikely((!__pyx_v_geos_cnst) && PyErr_Occurred())) __PYX_ERR(0, 68, __pyx_L3_error)
    __pyx_v_geos_data = values[9];
Paolo Veglio's avatar
Paolo Veglio committed
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("py_get_GEOS", 1, 10, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 67, __pyx_L3_error)
Paolo Veglio's avatar
Paolo Veglio committed
  __pyx_L3_error:;
  __Pyx_AddTraceback("ancillary_data.py_get_GEOS", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lat), __pyx_ptype_5numpy_ndarray, 1, "lat", 0))) __PYX_ERR(0, 67, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lon), __pyx_ptype_5numpy_ndarray, 1, "lon", 0))) __PYX_ERR(0, 67, __pyx_L1_error)
  __pyx_r = __pyx_pf_14ancillary_data_6py_get_GEOS(__pyx_self, __pyx_v_lat, __pyx_v_lon, __pyx_v_startTime, __pyx_v_anc_dir, __pyx_v_geos1, __pyx_v_geos2, __pyx_v_geos_lnd, __pyx_v_geos_ocn, __pyx_v_geos_cnst, __pyx_v_geos_data);
Paolo Veglio's avatar
Paolo Veglio committed

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

static PyObject *__pyx_pf_14ancillary_data_6py_get_GEOS(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_lat, PyArrayObject *__pyx_v_lon, char *__pyx_v_startTime, char *__pyx_v_anc_dir, char *__pyx_v_geos1, char *__pyx_v_geos2, char *__pyx_v_geos_lnd, char *__pyx_v_geos_ocn, char *__pyx_v_geos_cnst, PyObject *__pyx_v_geos_data) {
  PyObject *__pyx_v_v = NULL;
Paolo Veglio's avatar
Paolo Veglio committed
  __Pyx_memviewslice __pyx_v_tpw_mv = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_snowfr_mv = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_icefr_mv = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_ocnfr_mv = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_landicefr_mv = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_sfct_mv = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyObject *__pyx_v_geos_dict = NULL;
Paolo Veglio's avatar
Paolo Veglio committed
  __Pyx_LocalBuf_ND __pyx_pybuffernd_lat;
  __Pyx_Buffer __pyx_pybuffer_lat;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_lon;
  __Pyx_Buffer __pyx_pybuffer_lon;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
Paolo Veglio's avatar
Paolo Veglio committed
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_memviewslice __pyx_t_10 = { 0, 0, { 0 }, { 0 }, { 0 } };
Paolo Veglio's avatar
Paolo Veglio committed
  Py_ssize_t __pyx_t_11;
  int __pyx_t_12;
Paolo Veglio's avatar
Paolo Veglio committed
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
Paolo Veglio's avatar
Paolo Veglio committed
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("py_get_GEOS", 0);
  __pyx_pybuffer_lat.pybuffer.buf = NULL;
  __pyx_pybuffer_lat.refcount = 0;
  __pyx_pybuffernd_lat.data = NULL;
  __pyx_pybuffernd_lat.rcbuffer = &__pyx_pybuffer_lat;
  __pyx_pybuffer_lon.pybuffer.buf = NULL;
  __pyx_pybuffer_lon.refcount = 0;
  __pyx_pybuffernd_lon.data = NULL;
  __pyx_pybuffernd_lon.rcbuffer = &__pyx_pybuffer_lon;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lat.rcbuffer->pybuffer, (PyObject*)__pyx_v_lat, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 67, __pyx_L1_error)
  }
  __pyx_pybuffernd_lat.diminfo[0].strides = __pyx_pybuffernd_lat.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lat.diminfo[0].shape = __pyx_pybuffernd_lat.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lon.rcbuffer->pybuffer, (PyObject*)__pyx_v_lon, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 67, __pyx_L1_error)
  }
  __pyx_pybuffernd_lon.diminfo[0].strides = __pyx_pybuffernd_lon.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lon.diminfo[0].shape = __pyx_pybuffernd_lon.rcbuffer->pybuffer.shape[0];

  /* "ancillary.pyx":71
 *                 geos_data): #  tpw, snowfr, icefr, ocnfr, landicefr, sfct):
 * 
 *     for v in geos_data:             # <<<<<<<<<<<<<<
 *         if not geos_data[v].flags['C_CONTIGUOUS']:
 *             geos_data[v] = np.ascontiguousarray(geos_data[v])
Paolo Veglio's avatar
Paolo Veglio committed
 */
  if (likely(PyList_CheckExact(__pyx_v_geos_data)) || PyTuple_CheckExact(__pyx_v_geos_data)) {
    __pyx_t_1 = __pyx_v_geos_data; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_geos_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
Paolo Veglio's avatar
Paolo Veglio committed
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 71, __pyx_L1_error)
Paolo Veglio's avatar
Paolo Veglio committed
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 71, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 71, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 71, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 71, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
Paolo Veglio's avatar
Paolo Veglio committed
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 71, __pyx_L1_error)
        }
        break;
Paolo Veglio's avatar
Paolo Veglio committed
      }
      __Pyx_GOTREF(__pyx_t_4);
Paolo Veglio's avatar
Paolo Veglio committed
    }
    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_4);
    __pyx_t_4 = 0;
Paolo Veglio's avatar
Paolo Veglio committed

    /* "ancillary.pyx":72
 * 
 *     for v in geos_data:
 *         if not geos_data[v].flags['C_CONTIGUOUS']:             # <<<<<<<<<<<<<<
 *             geos_data[v] = np.ascontiguousarray(geos_data[v])
 * #    if not tpw.flags['C_CONTIGUOUS']:
Paolo Veglio's avatar
Paolo Veglio committed
 */
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_geos_data, __pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 72, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_flags); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 72, __pyx_L1_error)
Paolo Veglio's avatar
Paolo Veglio committed
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_n_u_C_CONTIGUOUS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 72, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
Paolo Veglio's avatar
Paolo Veglio committed
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 72, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = ((!__pyx_t_6) != 0);
    if (__pyx_t_7) {
Paolo Veglio's avatar
Paolo Veglio committed

      /* "ancillary.pyx":73
 *     for v in geos_data:
 *         if not geos_data[v].flags['C_CONTIGUOUS']:
 *             geos_data[v] = np.ascontiguousarray(geos_data[v])             # <<<<<<<<<<<<<<
 * #    if not tpw.flags['C_CONTIGUOUS']:
 * #        tpw = np.ascontiguousarray(tpw)
Paolo Veglio's avatar
Paolo Veglio committed
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 73, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 73, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_geos_data, __pyx_v_v); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 73, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 73, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(PyObject_SetItem(__pyx_v_geos_data, __pyx_v_v, __pyx_t_4) < 0)) __PYX_ERR(0, 73, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
Paolo Veglio's avatar
Paolo Veglio committed

      /* "ancillary.pyx":72
 * 
 *     for v in geos_data:
 *         if not geos_data[v].flags['C_CONTIGUOUS']:             # <<<<<<<<<<<<<<
 *             geos_data[v] = np.ascontiguousarray(geos_data[v])
 * #    if not tpw.flags['C_CONTIGUOUS']:
    /* "ancillary.pyx":71
 *                 geos_data): #  tpw, snowfr, icefr, ocnfr, landicefr, sfct):
 * 
 *     for v in geos_data:             # <<<<<<<<<<<<<<
 *         if not geos_data[v].flags['C_CONTIGUOUS']:
 *             geos_data[v] = np.ascontiguousarray(geos_data[v])
Paolo Veglio's avatar
Paolo Veglio committed
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
Paolo Veglio's avatar
Paolo Veglio committed

  /* "ancillary.pyx":87
 * #        sfct = np.ascontiguousarray(sfct)
Paolo Veglio's avatar
Paolo Veglio committed
 * 
 *     cdef float[::1] tpw_mv = geos_data['tpw']             # <<<<<<<<<<<<<<
 *     cdef float[::1] snowfr_mv = geos_data['snowfr']
 *     cdef float[::1] icefr_mv = geos_data['icefr']
Paolo Veglio's avatar
Paolo Veglio committed
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_geos_data, __pyx_n_u_tpw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error)
Paolo Veglio's avatar
Paolo Veglio committed
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 87, __pyx_L1_error)
Paolo Veglio's avatar
Paolo Veglio committed
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_tpw_mv = __pyx_t_10;
  __pyx_t_10.memview = NULL;
  __pyx_t_10.data = NULL;
Paolo Veglio's avatar
Paolo Veglio committed

  /* "ancillary.pyx":88
 * 
 *     cdef float[::1] tpw_mv = geos_data['tpw']
 *     cdef float[::1] snowfr_mv = geos_data['snowfr']             # <<<<<<<<<<<<<<
 *     cdef float[::1] icefr_mv = geos_data['icefr']
 *     cdef float[::1] ocnfr_mv = geos_data['ocnfr']
Paolo Veglio's avatar
Paolo Veglio committed
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_geos_data, __pyx_n_u_snowfr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_snowfr_mv = __pyx_t_10;
  __pyx_t_10.memview = NULL;
  __pyx_t_10.data = NULL;
Paolo Veglio's avatar
Paolo Veglio committed

  /* "ancillary.pyx":89
 *     cdef float[::1] tpw_mv = geos_data['tpw']
 *     cdef float[::1] snowfr_mv = geos_data['snowfr']
 *     cdef float[::1] icefr_mv = geos_data['icefr']             # <<<<<<<<<<<<<<
 *     cdef float[::1] ocnfr_mv = geos_data['ocnfr']
 *     cdef float[::1] landicefr_mv = geos_data['landicefr']
Paolo Veglio's avatar
Paolo Veglio committed
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_geos_data, __pyx_n_u_icefr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_icefr_mv = __pyx_t_10;
  __pyx_t_10.memview = NULL;
  __pyx_t_10.data = NULL;
Paolo Veglio's avatar
Paolo Veglio committed

  /* "ancillary.pyx":90
 *     cdef float[::1] snowfr_mv = geos_data['snowfr']
 *     cdef float[::1] icefr_mv = geos_data['icefr']
 *     cdef float[::1] ocnfr_mv = geos_data['ocnfr']             # <<<<<<<<<<<<<<
 *     cdef float[::1] landicefr_mv = geos_data['landicefr']
 *     cdef float[::1] sfct_mv = geos_data['sfct']
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_geos_data, __pyx_n_u_ocnfr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ocnfr_mv = __pyx_t_10;
  __pyx_t_10.memview = NULL;
  __pyx_t_10.data = NULL;
Paolo Veglio's avatar
Paolo Veglio committed

  /* "ancillary.pyx":91
 *     cdef float[::1] icefr_mv = geos_data['icefr']
 *     cdef float[::1] ocnfr_mv = geos_data['ocnfr']
 *     cdef float[::1] landicefr_mv = geos_data['landicefr']             # <<<<<<<<<<<<<<
 *     cdef float[::1] sfct_mv = geos_data['sfct']
Paolo Veglio's avatar
Paolo Veglio committed
 * 
 */