Supporting time-dependent geom (and related) in MAPL3 #3057
Replies: 4 comments 1 reply
-
And of course copying data from an info object is the lightweight use case. Suppose ExtData updates a field to be real4 rather than real8? Then intermediate fields must actually be destroyed and recreated. Side note: because MAPL3 shares fields between exports and imports (except when a coupler intervenes) we cannot actually create/destroy fields. Instead we "hollow-out" the field. The public interfaces for ESMF do not support this but essentially one can use private access to the Field components to leave the object in place, but with the data storage deallocated. and then (re) complete the field. And this in turn presupposes that we have the necessary information to do this correctly. E.g., consider ungridded dimensions. |
Beta Was this translation helpful? Give feedback.
-
Yet another issue arises when an import changes an aspect that had previously been the same as that of some other likewise connected import. Initially the two imports can share the same export extension, but if one changes that sharing is no longer tenable. Conclusion: If an import spec is time dependent all extensions in its connection chain must not be shared. Possibly this is a non-issue in practice as, e.g., when a sampler changes geometry we do not expect any other components to be on the same geometry. |
Beta Was this translation helpful? Give feedback.
-
I am trying to think of a clean mechanism to ensure that 2 imports do not share a time-dependent export extension. Basically we always want extensions to start from the actual source spec and work out. This means that the Currently |
Beta Was this translation helpful? Give feedback.
-
While prototyping the logic to handle time-dependence I ran into a new difficulty. A vertical regridder depends not only on its formal input field from the import state, but also on the two embedded pressure fields. Those may change the values of the vertical coordinates without changing the structure of the actual import/export fields. Some related complications:
If we set some flag (info) on the input field saying that the weights must be recalculated, when do we clear the flag? If we clear on the 1st then variant regrid weights are not computed. But if we don't the related weights are recalculated. |
Beta Was this translation helpful? Give feedback.
-
In MAPL3 we intend to allow the generic layer to introduce couplers to compensate for certain types of mismatches between source and destination fields. At a minimum we expect to support couplers to adapt:
In most cases the needed coupler will itself be time invariant. E.g., horizontal geometry is expected to usually be constant, but with important exceptions for instrument samplers and ExtData collections that have windows of time validity. More generally most of the above could change during the course of a run - almost exclusively due to the flexibility of the ExtData layer. Note: it probably does not make sense to allow the frequency of a component to change over time, so we may not address that.
For this to work, there are a few things that must happen:
Here is what I think can be done for each case:
A related challenge is that a change in the original export may need to propagate "downstream" through other state items. E.g., consider an ExtData item that needs a coupler both for geom and units and further that halfway through the run the units in the source file change. Because MAPL3 adapts units after (downstream) the geom, the intermediate field (the one between the regrid coupler and the unit converter) must update its units when the original export updates its units. This might get expensive to constantly copy info data just in case something has changed. Needs further thought.
Beta Was this translation helpful? Give feedback.
All reactions