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

global-ref and foreign only support intent in or out #3

Open

Description

@ptomasula

Description

global-ref and foreign variables only allow for intent in or out, but do not permit a mechanism to pass data between processes in a circular manner.

In theory you could set up a foreign variables in Riverine that references TSM's temperature and vice-versa, but doing so in practice results in a circular reference due to the other_process_cls argument needing to be the class definition of the process that defines the variable.

Impact

I'm not certain there is a way to provide updated water temperature data back to Riverine process. This is sort of a hard requirement for any sort of coupling of the Riverine (transport) and TSM processes.

Activity

  1. aufdenkampe commented on Jul 16, 2025

    @aufdenkampe
    Member

    @ptomasula, here's a summary of our discussion from his afternoon.

    Indeed, getting this issue resolved is a requirement for our continued work with xarray-simlab given that every reactive transport modeling effort that we have in front of us requires at least two processes to modify the same variable in turn (i.e. the transport process performs advection, diffusion, and mixing on an aqueous species then the reaction process performs the reaction on the same aqueous species).

    This issue was identified and discussed in detail in xarray-contrib#164. It's a long discussion thread, and @benbovy does an excellent job summarizing the problem and solution in:

    @feefladder got interested in the problem and began developing a solution in his fork's cyclic branch, leading to this PR:

    @benbovy suggested breaking down the complex PR into a series of smaller, more digestible PRs, which @feefladder did over the following days:

    Perhaps we should pull each of the branches from these open PRs into our fork?

  2. feefladder commented on Jul 29, 2025

    @feefladder

    So those PR's all build on top of each other (if I'm correct, it's been some time) so it should be possible to only pull in the xarray-contrib#182 and work from there.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions