镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Support models with no explicit steps or time loop #97

Open

Description

@benbovy

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

Activity

  1. changed the title [-]Support models with no explicit time loop[/-] [+]Support models with no explicit steps or time loop[/+] on Jan 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions