Skip to content
Snippets Groups Projects
Commit 65e84c7f authored by Maximilian Meindl's avatar Maximilian Meindl
Browse files

Upload New File

parent cc6882a8
No related branches found
No related tags found
No related merge requests found
%% Cell type:markdown id:15009998-b0c6-4e21-a007-197eca142975 tags:
### Getting started: nextGEMS online
%% Cell type:code id:75824e6b-52c4-4acf-9b0b-60603eee1a2f tags:
``` python
import intake
from easygems import healpix as egh
import matplotlib.pyplot as plt
```
%% Cell type:code id:8c96543f-ce37-4fab-8c67-78f117bdbcad tags:
``` python
cat = intake.open_catalog("https://data.nextgems-h2020.eu/online.yaml")
```
%% Cell type:code id:66ef92b1-4b8e-485f-b45d-1d899ef00de3 tags:
``` python
cat
```
%% Output
%% Cell type:code id:6a18cb64-3f0d-4551-a44a-05c4b3f9ab69 tags:
``` python
ds = cat.ICON.ngc4008(zoom=7, time='PT15M').to_dask()
```
%% Output
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[4], line 1
----> 1 ds = cat.ICON.ngc4008(zoom=7, time='PT15M').to_dask()
File /jetfs/jupyterhub/alpha/envs/modelling/lib/python3.10/site-packages/intake/catalog/base.py:391, in Catalog.__getattr__(self, item)
388 if not item.startswith('_'):
389 # Fall back to __getitem__.
390 try:
--> 391 return self[item] # triggers reload_on_change
392 except KeyError as e:
393 raise AttributeError(item) from e
File /jetfs/jupyterhub/alpha/envs/modelling/lib/python3.10/site-packages/intake/catalog/base.py:436, in Catalog.__getitem__(self, key)
427 """Return a catalog entry by name.
428
429 Can also use attribute syntax, like ``cat.entry_name``, or
(...)
432 cat['name1', 'name2']
433 """
434 if not isinstance(key, list) and key in self:
435 # triggers reload_on_change
--> 436 s = self._get_entry(key)
437 if s.container == 'catalog':
438 s.name = key
File /jetfs/jupyterhub/alpha/envs/modelling/lib/python3.10/site-packages/intake/catalog/utils.py:45, in reload_on_change.<locals>.wrapper(self, *args, **kwargs)
42 @functools.wraps(f)
43 def wrapper(self, *args, **kwargs):
44 self.reload()
---> 45 return f(self, *args, **kwargs)
File /jetfs/jupyterhub/alpha/envs/modelling/lib/python3.10/site-packages/intake/catalog/base.py:323, in Catalog._get_entry(self, name)
321 ups = [up for name, up in self.user_parameters.items() if name not in up_names]
322 entry._user_parameters = ups + (entry._user_parameters or [])
--> 323 return entry()
File /jetfs/jupyterhub/alpha/envs/modelling/lib/python3.10/site-packages/intake/catalog/entry.py:77, in CatalogEntry.__call__(self, persist, **kwargs)
75 raise ValueError('Persist value (%s) not understood' % persist)
76 persist = persist or self._pmode
---> 77 s = self.get(**kwargs)
78 if persist != 'never' and isinstance(s, PersistMixin) and s.has_been_persisted:
79 from ..container.persist import store
File /jetfs/jupyterhub/alpha/envs/modelling/lib/python3.10/site-packages/intake/catalog/local.py:289, in LocalCatalogEntry.get(self, **user_parameters)
286 if not user_parameters and self._default_source is not None:
287 return self._default_source
--> 289 plugin, open_args = self._create_open_args(user_parameters)
290 data_source = plugin(**open_args)
291 data_source.catalog_object = self._catalog
File /jetfs/jupyterhub/alpha/envs/modelling/lib/python3.10/site-packages/intake/catalog/local.py:263, in LocalCatalogEntry._create_open_args(self, user_parameters)
258 open_args = merge_pars(params, user_parameters, self._user_parameters,
259 getshell=self.getshell, getenv=self.getenv,
260 client=False)
262 if len(self._plugin) == 0:
--> 263 raise ValueError('No plugins loaded for this entry: %s\n'
264 'A listing of installable plugins can be found '
265 'at https://intake.readthedocs.io/en/latest/plugin'
266 '-directory.html .'
267 % self._driver)
268 elif isinstance(self._plugin, list):
269 plugin = self._plugin[0]
ValueError: No plugins loaded for this entry: zarr
A listing of installable plugins can be found at https://intake.readthedocs.io/en/latest/plugin-directory.html .
%% Cell type:code id:c5abc468-6a16-4917-a7d8-8ce8d43413d1 tags:
``` python
ds
```
%% Cell type:code id:ce4c9b8e-16b7-495c-8f94-5d02c331a330 tags:
``` python
timeslice = ds.tas.sel(time='2024-11-11T11:11:00', method='nearest')
egh.healpix_show(timeslice, cmap='inferno')
plt.title(f"tas at {str(timeslice.time.values)[:16]}")
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment