Couplers and callbacks #573
tclune
started this conversation in
Ideas / Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Consider a situation in which a component exports a state with an attached method. The component that then imports said state can use MethodExecute. Now consider what happens when the two components use different geoms. Ideally we would want to introduce a coupler between the two components that does the necessary regridding. Unfortunately, this is insufficient, as we will generally need to regrid the "output" items of the callback just after the MethodExecute command.
Unfortunately,
ESMF_Stateis not sufficiently flexible to allow support for this. One would ideally like to attach one or more "couplers" (intentionally vague definition here). One path would be to allow something like an internal state (ala GridCompSetInternalState(), which would then allow users to put their coupler machinery in there. More direct support could be in the form of attaching CplrGridComps to States along with methods to extract and run them.MAPL has a real need for this, but it is not clear how soon we will need it. Depends on whether we want to use callbacks for "service services" (ala advection) vs the current customization.
Our immediate thoughts on a workaround involve introducing a new derived type in MAPL that is attached to the importing gridcomp. That type will hold the couplers. We'll then wrap the esmf_MethodExecute with a mapl_MethodExecute. At first glance this will work for us, but I've not given it much thought just yet. Am hoping the ESMF team has other concrete ideas.
All reactions