Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support models with no explicit steps or time loop #97

Open
benbovy opened this issue Jan 24, 2020 · 0 comments
Open

Support models with no explicit steps or time loop #97

benbovy opened this issue Jan 24, 2020 · 0 comments
Labels

Comments

@benbovy
Copy link
Member

benbovy commented 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 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).

@benbovy benbovy changed the title Support models with no explicit time loop Support models with no explicit steps or time loop Jan 24, 2020
@benbovy benbovy added the design label Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant