Modifying var specs (related to time-varying) #3376
tclune
started this conversation in
MAPL3 Design
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
(See also #3057)
As currently implemented in MAPL3, VarSpecs are created in SetServices and then used to create corresponding StateItemSpec's at the beginning of the first init phase (
initialize_advertise
). For time-varying specs (including delayed specs for ExtData), we must decide where the modification will go. E.g., if a user modifies a var spec after it has been converted to a StateItemSpec, it will have no affect. And if the StateItemSpec is modified after an ESMF FIeld has been allocated, it will also have no affect on(as things are currently implemented.)First we need a sensible convention, and then ideally a mechanism to enforce it.
The simplest approach to my understanding would be to have any modifications happen to the StateItemSpec. I.e.,
MAPL_GridcompSetItemAspect(<state>, short_name, aspect)
would only be permitted afterinitialize_advertise()
(or really after that variable has been "advertised".The behavior of this call will then depend on whether it is before or after the field has been allocated. (Note: allocation happens after connections have been processed.) Here is my proposal:
Introduce a
StateItemStatus_Flag
analogous toESMF_Field_StatusFlag
. The supported states:STATEITEMSTATUS_GEOMSET(possibly not needed)Behavior of SetAspect depends on the status as follows:
DNE - short name not found: error
INVALID - StateItemExists
CREATED
COMPLETE - depends on aspect
a. set aspect
b. reallocate
c. signal couplers (signal terminaton at couplers that addresses given aspect)
a. signal couplers
@atrayano @bena-nasa @pchakraborty @darianboggs
Beta Was this translation helpful? Give feedback.
All reactions