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

Cache values of on_demand variables #132

Closed benbovy closed 4 years ago

benbovy commented 4 years ago

A cache would be useful when on_demand variables are re-used in several other processes in a model, or even within the same process to compute the value of another (generally on_demand) variable.

In those cases, triggering multiple times their compute method is wasteful.

The cache must be cleared each time before the execution of a simulation stage.