Closed benjaminleighton closed 2 months ago
@benjaminleighton this idea is definitely worth exploring
I would like to +1 this, the current main includes a dependency for
from oceanum.datamesh import Connector
We need to rationalise the type checking to the extent that the data/init.py doesnt import non-generic sources.
@rafa-guedes , @tomdurrant Could perhaps the SourceDatamesh be abstracted via intake so that this additional class is not necessary?
I think the general design principle should be that all of rompy's data interfaces expect an xr.Dataset or xr.DataArray object to which an Xarray accessor exposes the munging code to go from Xarray to model specific file formats.
@rafa-guedes , @tomdurrant Could perhaps the SourceDatamesh be abstracted via intake so that this additional class is not necessary?
@pbranson yes this is a good idea - will put it as a new issue
Implemented with https://github.com/rom-py/rompy/pull/109
I've been implementing a prospective new SourceBase called SourceFiles that wraps xarray open_mfdataset. To do this I need to modify the static list of allowed types in DATA_SOURCE_TYPES. Here are some ideas https://chat.openai.com/share/1f48f3ae-e2e9-41c7-b9ca-494a5d469f26 on a plugin based approach that sacrifices some of the Pydantic static type checking capabilities for plugin types and adds a little bit of complexity. What do you think?