Facilitate creation of ESMValCore Dataset objects from datastores
- Dominant language
- Python
- Stars
- 164
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
See https://github.com/ESMValGroup/ESMValCore/pull/2690.
We're working on adding intake-esm support to ESMValCore/ESMValTool. I think one thing that would make this a lot more straightforward would be to add the ability to output an ESMValCore `Dataset` object from an `esm_datastore`. I'm envisaging something like
```python
esm_ds = intake.open_esm_datastore(...)
esm_ds = esm_ds.search(...)
dataset = esm_ds.to_dataset(...)
```
**Describe the solution you'd like**
I think it would be wise to go one of two ways here:
1. Make ESMValCore an optional dependency, in order to avoid making the dependencies of intake-esm too numerous.
2. Double down on the intake plugin architecture and add an entrypoint that allows users to easily add extra methods to esm datastores - similar to the xarrays `register_dataset_accessor` system. Then we can stick the intake-esm / ESMValCore bridging code in a separate repo.
**Additional context**
https://github.com/ESMValGroup/ESMValCore/pull/2690, https://github.com/ACCESS-NRI/ESMValTool-workflow/issues/201#issuecomment-2846520663, https://github.com/ACCESS-NRI/ESMValTool-workflow/issues/202#issuecomment-2846514853
This would also probably require some naming refinements, because `to_dataset` would get confusing with `to_dataset_dict` being completely unrelated. Maybe `to_iris` would be a better name.
Contributor guide
Assessment
This issue has not been assessed yet.