Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xcube gen: indexes along dimension 'y' are not equal #86

Closed
forman opened this issue Jun 14, 2019 · 1 comment
Closed

xcube gen: indexes along dimension 'y' are not equal #86

forman opened this issue Jun 14, 2019 · 1 comment
Assignees
Labels
bug Something isn't working important This is very important for the project urgent High external pressure to address this ASAP

Comments

@forman
Copy link
Member

forman commented Jun 14, 2019

When using xcube gen with processed variables that use flag values, we now get errors such as

step 2 of 9: computing variables...
Internal error: failed computing valid mask for 'rrs_560' from expression  'np.logical_not(PIXEL_CLASSIFY_FLAGS.F_INVALID)': indexes along dimension 'y' are not equal

The error happens in code that used to run without problems. Must be due to a change in xarray or deeper.

Here is the full traceback:

step 1 of 9: pre-processing dataset...
  pre-processing dataset completed in 1.6446000000058802e-05 seconds
step 2 of 9: computing variables...
Internal error: failed computing valid mask for 'rrs_560' from expression 'np.logical_not(PIXEL_CLASSIFY_FLAGS.F_INVALID)': indexes along dimension 'y' are not equal
Traceback (most recent call last):
  File "d:\projects\xcube\xcube\util\expression.py", line 49, in compute_expr
    result = eval(expr, namespace, None)
  File "<string>", line 1, in <module>
  File "d:\projects\xcube\xcube\util\maskset.py", line 98, in __getattr__
    return self.get_mask(name)
  File "d:\projects\xcube\xcube\util\maskset.py", line 128, in get_mask
    mask_var = mask_var.where((flag_var & flag_mask) != 0, 0)
  File "D:\Miniconda3\envs\xcube\lib\site-packages\xarray\core\common.py", line 859, in where
    return ops.where_method(self, cond, other)
  File "D:\Miniconda3\envs\xcube\lib\site-packages\xarray\core\ops.py", line 191, in where_method
    keep_attrs=True)
  File "D:\Miniconda3\envs\xcube\lib\site-packages\xarray\core\computation.py", line 969, in apply_ufunc
    keep_attrs=keep_attrs)
  File "D:\Miniconda3\envs\xcube\lib\site-packages\xarray\core\computation.py", line 209, in apply_dataarray_vfunc
    raise_on_invalid=False)
  File "D:\Miniconda3\envs\xcube\lib\site-packages\xarray\core\alignment.py", line 217, in deep_align
    exclude=exclude)
  File "D:\Miniconda3\envs\xcube\lib\site-packages\xarray\core\alignment.py", line 132, in align
    .format(dim))
ValueError: indexes along dimension 'y' are not equal

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "D:/Projects/xcube/xcube/cli/cli.py", line 257, in main
    exit_code = cli.main(args=args, obj=ctx_obj, standalone_mode=False)
  File "D:\Miniconda3\envs\xcube\lib\site-packages\click\core.py", line 717, in main
    rv = self.invoke(ctx)
  File "D:\Miniconda3\envs\xcube\lib\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "D:\Miniconda3\envs\xcube\lib\site-packages\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "D:\Miniconda3\envs\xcube\lib\site-packages\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "d:\projects\xcube\xcube\cli\gen.py", line 126, in gen
    **config)
  File "d:\projects\xcube\xcube\api\gen\gen.py", line 142, in gen_cube
    monitor)
  File "d:\projects\xcube\xcube\api\gen\gen.py", line 284, in _process_l2_input
    dataset = transform(dataset)
  File "d:\projects\xcube\xcube\api\gen\gen.py", line 207, in step2
    return compute_dataset(dataset, processed_variables=processed_variables)
  File "d:\projects\xcube\xcube\api\compute.py", line 113, in compute_dataset
    errors=errors)
  File "d:\projects\xcube\xcube\util\expression.py", line 32, in compute_array_expr
    return compute_expr(expr, namespace=namespace, errors=errors, result_name=result_name)
  File "d:\projects\xcube\xcube\util\expression.py", line 57, in compute_expr
    raise ValueError(msg) from e
ValueError: failed computing valid mask for 'rrs_560' from expression 'np.logical_not(PIXEL_CLASSIFY_FLAGS.F_INVALID)': indexes along dimension 'y' are not equal
@forman forman added bug Something isn't working in progress The assignee is working on it urgent High external pressure to address this ASAP important This is very important for the project labels Jun 14, 2019
@forman forman self-assigned this Jun 14, 2019
@forman
Copy link
Member Author

forman commented Jun 14, 2019

Strange enough, this doesn't seem to covered by tests.

@forman forman closed this as completed in 0be1c41 Jun 14, 2019
@forman forman removed the in progress The assignee is working on it label Jun 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working important This is very important for the project urgent High external pressure to address this ASAP
Projects
None yet
Development

No branches or pull requests

1 participant