rom-py / rompy

Relocatable Ocean Modelling in PYthon (rompy) combines templated cookie-cutter model configuration with various xarray extensions to assist in the setup and evaluation of coastal ocean model
https://rom-py.github.io/rompy/
BSD 3-Clause "New" or "Revised" License
3 stars 9 forks source link

nested intake catalogs #29

Closed tomdurrant closed 1 year ago

tomdurrant commented 1 year ago

Issue 4 from June workshop. Comment was

Nested intake catalogs not supported e.g ds_intake_wind = rompy.core.data.DatasetIntake(catalog_uri='../../nglp_catalog/main.yaml', dataset_id='atoms.access_bom', kwargs=intake_kwargs)

tomdurrant commented 1 year ago

Comment from RG:

Nested catalogs should be supported that way, I have just tested on nested catalogs from oceanum using the redesigned class (SourceIntake). Please provide some reproduceable example and I can have a closer look

@pbranson can you provide an example catalog please?

pbranson commented 1 year ago

Would this catalog be sufficient? https://github.com/rom-py/rompy/blob/main/rompy/catalogs/master.yaml

rafa-guedes commented 1 year ago

@pbranson I tried it with the two different datasources below from that nested catalog and it worked ok (actually the csiro example one didn't because pydap wasn't installed but once it was installed it worked ok). Do you have an specific example that isn't working?

from rompy.core.data import SourceIntake

source = SourceIntake(
    catalog_uri="/source/csiro/rompy/rompy/catalogs/master.yaml",
    dataset_id="oceanum.era5_wind10m"
)

source.open()
source = SourceIntake(
    catalog_uri="/source/csiro/rompy/rompy/catalogs/master.yaml",
    dataset_id="csiro.swan.swan_perth_fc.map"
)

source.open()
pbranson commented 1 year ago

No if those are working then I think this can be closed

rafa-guedes commented 1 year ago

Ok closing it then!