-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Data access #264
Comments
@Fisico2k, It appears the proxy may not be working properly. when you get a chance, do you mind running this code snippet and reporting back whether bypassing intake/intake-esm works? import xarray as xr
ds = xr.open_zarr('https://cpdataeuwest.blob.core.windows.net/cp-cmip/version1/data/DeepSD/ScenarioMIP.CCCma.CanESM5.ssp245.r1i1p1f1.day.DeepSD.pr.zarr') |
Thank you for reply. :2: RuntimeWarning: Failed to open Zarr store with consolidated metadata, falling back to try reading non-consolidated metadata. This is typically much slower for opening a dataset. To silence this warning, consider:
ConnectionRefusedErrorTraceback (most recent call last) /opt/conda/lib/python3.8/asyncio/base_events.py in create_connection(self, protocol_factory, host, port, ssl, family, proto, flags, sock, local_addr, server_hostname, ssl_handshake_timeout, happy_eyeballs_delay, interleave) /opt/conda/lib/python3.8/asyncio/base_events.py in create_connection(self, protocol_factory, host, port, ssl, family, proto, flags, sock, local_addr, server_hostname, ssl_handshake_timeout, happy_eyeballs_delay, interleave) /opt/conda/lib/python3.8/asyncio/base_events.py in _connect_sock(self, exceptions, addr_info, local_addr_infos) /opt/conda/lib/python3.8/asyncio/selector_events.py in sock_connect(self, sock, address) /opt/conda/lib/python3.8/asyncio/selector_events.py in _sock_connect_cb(self, fut, sock, address) ConnectionRefusedError: [Errno 111] Connect call failed ('20.150.83.36', 443) The above exception was the direct cause of the following exception: ClientConnectorErrorTraceback (most recent call last) /opt/conda/lib/python3.8/site-packages/fsspec/mapping.py in getitem(self, key, default) /opt/conda/lib/python3.8/site-packages/fsspec/asyn.py in wrapper(*args, **kwargs) /opt/conda/lib/python3.8/site-packages/fsspec/asyn.py in sync(loop, func, timeout, *args, **kwargs) /opt/conda/lib/python3.8/site-packages/fsspec/asyn.py in _runner(event, coro, result, timeout) /opt/conda/lib/python3.8/site-packages/fsspec/asyn.py in _cat(self, path, recursive, on_error, batch_size, **kwargs) /opt/conda/lib/python3.8/asyncio/tasks.py in wait_for(fut, timeout, loop) /opt/conda/lib/python3.8/site-packages/fsspec/implementations/http.py in _cat_file(self, url, start, end, **kwargs) /opt/conda/lib/python3.8/site-packages/aiohttp/client.py in aenter(self) /opt/conda/lib/python3.8/site-packages/aiohttp/client.py in _request(self, method, str_or_url, params, data, json, cookies, headers, skip_auto_headers, auth, allow_redirects, max_redirects, compress, chunked, expect100, raise_for_status, read_until_eof, proxy, proxy_auth, timeout, verify_ssl, fingerprint, ssl_context, ssl, proxy_headers, trace_request_ctx, read_bufsize) /opt/conda/lib/python3.8/site-packages/aiohttp/connector.py in connect(self, req, traces, timeout) /opt/conda/lib/python3.8/site-packages/aiohttp/connector.py in _create_connection(self, req, traces, timeout) /opt/conda/lib/python3.8/site-packages/aiohttp/connector.py in _create_direct_connection(self, req, traces, timeout, client_error) /opt/conda/lib/python3.8/site-packages/aiohttp/connector.py in _create_direct_connection(self, req, traces, timeout, client_error) /opt/conda/lib/python3.8/site-packages/aiohttp/connector.py in _wrap_create_connection(self, req, timeout, client_error, *args, **kwargs) ClientConnectorError: Cannot connect to host cpdataeuwest.blob.core.windows.net:443 ssl:default [Connect call failed ('20.150.83.36', 443)] The above exception was the direct cause of the following exception: KeyErrorTraceback (most recent call last) /opt/conda/lib/python3.8/site-packages/zarr/convenience.py in open_consolidated(store, metadata_key, mode, **kwargs) /opt/conda/lib/python3.8/site-packages/zarr/storage.py in init(self, store, metadata_key) /opt/conda/lib/python3.8/site-packages/zarr/storage.py in getitem(self, key) KeyError: '.zmetadata' During handling of the above exception, another exception occurred: GroupNotFoundErrorTraceback (most recent call last) /opt/conda/lib/python3.8/site-packages/xarray/backends/zarr.py in open_zarr(store, group, synchronizer, chunks, decode_cf, mask_and_scale, decode_times, concat_characters, decode_coords, drop_variables, consolidated, overwrite_encoded_chunks, chunk_store, storage_options, decode_timedelta, use_cftime, **kwargs) /opt/conda/lib/python3.8/site-packages/xarray/backends/api.py in open_dataset(filename_or_obj, engine, chunks, cache, decode_cf, mask_and_scale, decode_times, decode_timedelta, use_cftime, concat_characters, decode_coords, drop_variables, backend_kwargs, *args, **kwargs) /opt/conda/lib/python3.8/site-packages/xarray/backends/zarr.py in open_dataset(self, filename_or_obj, mask_and_scale, decode_times, concat_characters, decode_coords, drop_variables, use_cftime, decode_timedelta, group, mode, synchronizer, consolidated, chunk_store, storage_options, stacklevel) /opt/conda/lib/python3.8/site-packages/xarray/backends/zarr.py in open_group(cls, store, mode, synchronizer, group, consolidated, consolidate_on_close, chunk_store, storage_options, append_dim, write_region, safe_chunks, stacklevel) /opt/conda/lib/python3.8/site-packages/zarr/hierarchy.py in open_group(store, mode, cache_attrs, synchronizer, path, chunk_store, storage_options, zarr_version) GroupNotFoundError: group not found at path '' |
What versions of xarray and zarr are you using? You can get this info by running xr.show_versions() |
@Fisico2k, sorry for not getting back you sooner. when you get a chance, could you upgrade your entire conda environment and try again, and let us know how it goes? i can confirm that everything still works without a proxy In [1]: import xarray as xr
In [2]: import xarray as xr
...: ds = xr.open_zarr('https://cpdataeuwest.blob.core.windows.net/cp-cmip/versi
...: on1/data/DeepSD/ScenarioMIP.CCCma.CanESM5.ssp245.r1i1p1f1.day.DeepSD.pr.zar
...: r')
In [3]:
In [3]: ds
Out[3]:
<xarray.Dataset>
Dimensions: (lat: 720, lon: 1440, time: 31046)
Coordinates:
* lat (lat) float64 -89.88 -89.62 -89.38 -89.12 ... 89.38 89.62 89.88
* lon (lon) float64 -179.9 -179.6 -179.4 -179.1 ... 179.4 179.6 179.9
* time (time) datetime64[ns] 2015-01-01 2015-01-02 ... 2099-12-31
Data variables:
pr (time, lat, lon) float32 dask.array<chunksize=(31046, 48, 48), meta=np.ndarray>
Attributes: (12/17)
Conventions: CF-1.8
activity_id: ScenarioMIP
cmip6_downscaling_contact: hello@carbonplan.org
cmip6_downscaling_explainer: https://carbonplan.org/research/cmip6-do...
cmip6_downscaling_institution: CarbonPlan
cmip6_downscaling_method: DeepSD
... ...
references: Eyring, V., Bony, S., Meehl, G. A., Seni...
source_id: CanESM5
timescale: day
variable_id: pr
cmip6_downscaling_license: CC-BY-4.0
cmip6_downscaling_license_url: https://creativecommons.org/licenses/by/...
In [4]: xr.show_versions()
/home/andersy005/mambaforge/envs/intake-esm-dev/lib/python3.10/site-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
INSTALLED VERSIONS
------------------
commit: None
python: 3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:35:26) [GCC 10.4.0]
python-bits: 64
OS: Linux
OS-release: 5.15.0-52-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: ('en_US', 'UTF-8')
libhdf5: 1.12.2
libnetcdf: 4.8.1
xarray: 2022.11.0
pandas: 1.4.4
numpy: 1.23.3
scipy: 1.9.3
netCDF4: 1.6.1
pydap: None
h5netcdf: 1.0.2
h5py: 3.7.0
Nio: None
zarr: 2.13.3
cftime: 1.6.2
nc_time_axis: None
PseudoNetCDF: None
rasterio: None
cfgrib: None
iris: None
bottleneck: None
dask: 2022.6.1
distributed: 2022.6.1
matplotlib: 3.6.2
cartopy: None
seaborn: None
numbagg: None
fsspec: 2022.11.0
cupy: None
pint: None
sparse: None
flox: None
numpy_groupies: None
setuptools: 65.3.0
pip: 22.3.1
conda: None
pytest: 7.2.0
IPython: 8.6.0
sphinx: 5.1.1 |
I'm trying to test accessing_data_example.ipynb.
Consider that in my environment every request needs to pass a proxy.
Now, the line dsets = cat_subset.to_dataset_dict() generates the following output.
Any help?
The text was updated successfully, but these errors were encountered: