xarray-contrib / xarray-simlab

Xarray extension and framework for computer model simulations
http://xarray-simlab.readthedocs.io
BSD 3-Clause "New" or "Revised" License
73 stars 9 forks source link

Share any object between process classes #100

Closed benbovy closed 4 years ago

benbovy commented 4 years ago

There are cases where we need to share objects between processes that are not "variables" (e.g., callables, instances of custom classes such as particles or agents in Lagrangian or agent-based modelling). It is already possible to declare such objects using xs.variable, but that doesn't represent well what is shared in those cases, i.e., the dimensions may not be relevant.

It might be good to provide another attr.attrib wrapper for those objects, e.g., xsimlab.object. For the xarray extension, it would be also clear that those objects can't be directly used as inputs / outputs (they first need to be converted somehow from / into a variable).