Ph.D. Thesis Proposal
Principled Composition in Coupled Earth System Models
Designing and implementing coupled Earth System Models (ESMs) is a challenge for climate scientists and software engineers alike. Coupled models incorporate two or more independent numerical models into a single application, allowing for the simulation of complex feedback effects. As ESMs increase in fidelity and sophistication, model developers are increasingly faced with the issue of software complexity. Furthermore, the desire to add more components to ESMs means that the complexity problem will likely become worse unless steps are taken now to improve how independent models are coupled.
Although coupling models is fundamentally a scientific endeavor, a substantial software engineering effort is required to compose the underlying software components into a single application that is at once efficient, numerically correct, and scientifically valid. Much of the difficulty comes from the fact that every coupling is unique—each coupling is intimately dependent on properties of the constituent models that are to be linked together. Therefore, when a model developer begins work on coupling models, there is a tendency to create a context-specific, ad-hoc solution. Unfortunately, the literature describing geophysical coupled models and their challenges says little about how one should go about designing and implementing couplers—the software components used to link together constituent models. The lack of coupler design principles reflects the relatively immature state of the ESM coupling domain and results in duplication of effort and continuous re-learning of the same design principles.
The large amount of legacy code, the wide range of coding conventions, and the breadth of architectural variability among numerical model software means that a completely automated solution to coupling is well beyond the state-of-the-art. However, in lieu of complete automation, a set of rigorous design heuristics can serve as a kind of handbook for building couplers that are likely to meet the desired set of functional and performance requirements. We propose to perform an architectural analysis of the state-of-the-art in ESM couplers and encode the expert knowledge found therein into a resource for coupled model developers.
To achieve this goal, we first identify a coupler design space, a multidimensional space of functional and structural design choices relevant for devising and constructing ESM couplers. Formulating the design space itself is a non-trivial task due to the range of different coupling philosophies and architectures currently employed in production quality ESMs. Furthermore, the design space dimensions reflect the design choices of primary importance when building couplers. Therefore, there is increased pressure to identify the “right” dimensions in order to provide the best possible guidance in coupler design. A point in the design space represents a particular instance of a coupler design.
Secondly, we perform an architectural tradeoff analysis of ESM couplers to assess software qualities of couplers within the design space. Although architectural analyses can be used to evaluate a wide range of software qualities, this work focuses on two fundamental qualities that are often antagonistic: performance and modularity. High performance translates to higher resolution simulations, increased capacity for multi-model ensemble runs, and decreased time to dataset analyses and publication of scientific results. Modularity is a proxy for other software qualities that are hard to measure directly, such as modifiability, flexibility, reusability, and intentionality. Although modularity in software systems is linked to a number of advantages, there are performance costs involved with modular designs due to potential efficiency loses at module interfaces. The antagonistic relationship between modularity and performance has been recognized as a general principle in many kinds of engineering systems and it is a fundamental tradeoff that must be considered when designing coupler architecture.
Thirdly, the results of the architectural analysis form the foundation of a set of coupler design guidelines. The design guidelines are an extrapolation from the architectural tradeoff analysis that can be used by model developers to predict the effects of making architectural choices when designing ESM couplers. They are presented in a practical and problem-oriented form that can be applied quickly by model developers who are faced with a particular coupling problem.
The design guidelines are evaluated by encoding them in a code generator capable of automatically generating ESM couplers with desired functional and non-functional properties. Generated couplers can be fed back into the architectural analysis allowing for iterative refinement of the design guidelines themselves. On a practical level, the automated coupler generator serves as a valuable tool for the geophysical modeling community by reducing development costs and time-to-solution for building couplers.