Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

renamed legacy ids prefix #923

Merged
merged 1 commit into from
Aug 19, 2020
Merged

renamed legacy ids prefix #923

merged 1 commit into from
Aug 19, 2020

Conversation

TonioF
Copy link
Contributor

@TonioF TonioF commented Aug 18, 2020

Solves CCI-Tools/cate-app#85 . Later, the Legacy store should be removed.

@codecov-commenter
Copy link

codecov-commenter commented Aug 18, 2020

Codecov Report

Merging #923 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #923   +/-   ##
=======================================
  Coverage   75.73%   75.73%           
=======================================
  Files          87       87           
  Lines       14105    14105           
=======================================
+ Hits        10682    10683    +1     
+ Misses       3423     3422    -1     
Impacted Files Coverage Δ
cate/ds/esa_cci_odp_legacy.py 52.59% <100.00%> (ø)
cate/core/ds.py 83.81% <0.00%> (+0.32%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1448d40...0583bc1. Read the comment docs.

@forman forman requested review from AliceBalfanz and dzelge August 18, 2020 13:19
Copy link
Contributor

@AliceBalfanz AliceBalfanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cciold shows up in the id's, however none of the requested cciold datasets I tried were successfully opened.

@TonioF
Copy link
Contributor Author

TonioF commented Aug 18, 2020

It worked for me. Can you try deleting your local legacy store? If you still get the error, what is it?

@AliceBalfanz
Copy link
Contributor

AliceBalfanz commented Aug 18, 2020

Ok, I deleted the cached store:
image

and
image
Job: Opening data source "cciold.SST.day.L4.SSTdepth.multi-sensor.multi-platform.OSTIA.1-1.r1"
Message: Failed to open data source "cciold.SST.day.L4.SSTdepth.multi-sensor.multi-platform.OSTIA.1-1.r1" for given time range: [Errno -45] NetCDF: Not a valid data type or _FillValue type mismatch: b'https://cci-odp-data.ceda.ac.uk/thredds/dodsC/esg_esacci/sst/data/lt/Analysis/L4/v01.1/2007/01/01/20070101120000-ESACCI-L4_GHRSST-SSTdepth-OSTIA-GLOB_LT-v02.0-fv01.1.nc'
Code: -32003
Method: set_workspace_resource
Exception: cate.core.ds.DataAccessError

Traceback (most recent call last):
File "/home/alicja/miniconda3/envs/cate-env/lib/python3.7/site-packages/xarray/backends/file_manager.py", line 198, in _acquire_with_cache_info
file = self._cache[self._key]
File "/home/alicja/miniconda3/envs/cate-env/lib/python3.7/site-packages/xarray/backends/lru_cache.py", line 53, in getitem
value = self._cache[key]
KeyError: [<class 'netCDF4._netCDF4.Dataset'>, ('https://cci-odp-data.ceda.ac.uk/thredds/dodsC/esg_esacci/sst/data/lt/Analysis/L4/v01.1/2007/01/01/20070101120000-ESACCI-L4_GHRSST-SSTdepth-OSTIA-GLOB_LT-v02.0-fv01.1.nc',), 'r', (('clobber', True), ('diskless', False), ('format', 'NETCDF4'), ('persist', False))]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/alicja/Desktop/projects/cate/cate/ds/esa_cci_odp_legacy.py", line 836, in open_dataset
return open_xarray_dataset(files, region=region, var_names=var_names, monitor=monitor)
File "/home/alicja/Desktop/projects/cate/cate/core/ds.py", line 735, in open_xarray_dataset
chunks = get_spatial_ext_chunk_sizes(files[0])
File "/home/alicja/Desktop/projects/cate/cate/core/ds.py", line 786, in get_spatial_ext_chunk_sizes
ds = xr.open_dataset(ds_or_path, decode_times=False)
File "/home/alicja/miniconda3/envs/cate-env/lib/python3.7/site-packages/xarray/backends/api.py", line 499, in open_dataset
filename_or_obj, group=group, lock=lock, **backend_kwargs
File "/home/alicja/miniconda3/envs/cate-env/lib/python3.7/site-packages/xarray/backends/netCDF4_.py", line 357, in open
return cls(manager, group=group, mode=mode, lock=lock, autoclose=autoclose)
File "/home/alicja/miniconda3/envs/cate-env/lib/python3.7/site-packages/xarray/backends/netCDF4_.py", line 313, in init
self.format = self.ds.data_model
File "/home/alicja/miniconda3/envs/cate-env/lib/python3.7/site-packages/xarray/backends/netCDF4_.py", line 366, in ds
return self.acquire()
File "/home/alicja/miniconda3/envs/cate-env/lib/python3.7/site-packages/xarray/backends/netCDF4
.py", line 360, in _acquire
with self._manager.acquire_context(needs_lock) as root:
File "/home/alicja/miniconda3/envs/cate-env/lib/python3.7/contextlib.py", line 112, in enter
return next(self.gen)
File "/home/alicja/miniconda3/envs/cate-env/lib/python3.7/site-packages/xarray/backends/file_manager.py", line 186, in acquire_context
file, cached = self._acquire_with_cache_info(needs_lock)
File "/home/alicja/miniconda3/envs/cate-env/lib/python3.7/site-packages/xarray/backends/file_manager.py", line 204, in _acquire_with_cache_info
file = self._opener(*self._args, **kwargs)
File "netCDF4/_netCDF4.pyx", line 2291, in netCDF4._netCDF4.Dataset.init
File "netCDF4/_netCDF4.pyx", line 1855, in netCDF4._netCDF4._ensure_nc_success
OSError: [Errno -45] NetCDF: Not a valid data type or _FillValue type mismatch: b'https://cci-odp-data.ceda.ac.uk/thredds/dodsC/esg_esacci/sst/data/lt/Analysis/L4/v01.1/2007/01/01/20070101120000-ESACCI-L4_GHRSST-SSTdepth-OSTIA-GLOB_LT-v02.0-fv01.1.nc'

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

Traceback (most recent call last):
File "/home/alicja/Desktop/projects/cate/cate/util/web/jsonrpchandler.py", line 209, in send_service_method_result
result = future.result()
File "/home/alicja/miniconda3/envs/cate-env/lib/python3.7/concurrent/futures/_base.py", line 428, in result
return self.__get_result()
File "/home/alicja/miniconda3/envs/cate-env/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
File "/home/alicja/miniconda3/envs/cate-env/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/alicja/Desktop/projects/cate/cate/util/web/jsonrpchandler.py", line 306, in call_service_method
result = method(*method_params, monitor=monitor)
File "/home/alicja/Desktop/projects/cate/cate/webapi/websocket.py", line 328, in set_workspace_resource
monitor=monitor)
File "/home/alicja/Desktop/projects/cate/cate/core/wsmanag.py", line 462, in set_workspace_resource
workspace.execute_workflow(res_name=res_name, monitor=monitor)
File "/home/alicja/Desktop/projects/cate/cate/core/workspace.py", line 667, in execute_workflow
self.workflow.invoke_steps(steps, context=self._new_context(), monitor=monitor)
File "/home/alicja/Desktop/projects/cate/cate/core/workflow.py", line 627, in invoke_steps
steps[0].invoke(context=context, monitor=monitor)
File "/home/alicja/Desktop/projects/cate/cate/core/workflow.py", line 318, in invoke
self._invoke_impl(_new_context(context, step=self), monitor=monitor)
File "/home/alicja/Desktop/projects/cate/cate/core/workflow.py", line 980, in _invoke_impl
return_value = self._op(monitor=monitor, **input_values)
File "/home/alicja/Desktop/projects/cate/cate/core/op.py", line 216, in call
return_value = self._wrapped_op(**input_values)
File "/home/alicja/Desktop/projects/cate/cate/ops/io.py", line 84, in open_dataset
monitor=monitor)
File "/home/alicja/Desktop/projects/cate/cate/core/ds.py", line 678, in open_dataset
return data_source.open_dataset(time_range, region, var_names, monitor=monitor)
File "/home/alicja/Desktop/projects/cate/cate/ds/esa_cci_odp_legacy.py", line 845, in open_dataset
cause=e) from e
cate.core.ds.DataAccessError: Failed to open data source "cciold.SST.day.L4.SSTdepth.multi-sensor.multi-platform.OSTIA.1-1.r1" for given time range: [Errno -45] NetCDF: Not a valid data type or _FillValue type mismatch: b'https://cci-odp-data.ceda.ac.uk/thredds/dodsC/esg_esacci/sst/data/lt/Analysis/L4/v01.1/2007/01/01/20070101120000-ESACCI-L4_GHRSST-SSTdepth-OSTIA-GLOB_LT-v02.0-fv01.1.nc'

@TonioF
Copy link
Contributor Author

TonioF commented Aug 19, 2020

I reproduced this. This error is not related to the issue. If I undo my changes and remove the opensearch store, I also get this error. As this has been fixed for the opensearch store, it should be easy to migrate the changes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants