You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a common case and there is no reason not to support it. It might be reused for analysis pipelines too and would therefore greatly enlarge the scope of xarray-simlab.
The proposition below is not as flexible as #52, but I don't know if #52 is a good idea.
In the xarray extension, providing clocks should be really optional (it is already optional in the API, but running a model without a clock coordinate raises an error).
We could add the .run() reserved method in process classes. For models with no explicit time loop, the following simulation stages would be available : initialize -> run -> finalize. Initialization and/or finalization might still be useful in that case too (e.g., allocate/clean resources), but it remains optional. However, run vs run_step / finalize_step should be mutually exclusive (we could raise if a process decorated class does implement both, and we could also check and raise if a model has processes that mix both).
In the xarray extension, output_vars may accept a list (in this case, it's nicer than a dictionary with all values set to None).
The text was updated successfully, but these errors were encountered:
benbovy
changed the title
Support models with no explicit time loop
Support models with no explicit steps or time loop
Jan 24, 2020
This is a common case and there is no reason not to support it. It might be reused for analysis pipelines too and would therefore greatly enlarge the scope of xarray-simlab.
The proposition below is not as flexible as #52, but I don't know if #52 is a good idea.
In the xarray extension, providing clocks should be really optional (it is already optional in the API, but running a model without a clock coordinate raises an error).
We could add the
.run()
reserved method in process classes. For models with no explicit time loop, the following simulation stages would be available :initialize -> run -> finalize
. Initialization and/or finalization might still be useful in that case too (e.g., allocate/clean resources), but it remains optional. However,run
vsrun_step / finalize_step
should be mutually exclusive (we could raise if a process decorated class does implement both, and we could also check and raise if a model has processes that mix both).In the xarray extension,
output_vars
may accept a list (in this case, it's nicer than a dictionary with all values set toNone
).The text was updated successfully, but these errors were encountered: