Earth-system models tend to be large, complex codes developed by large teams of scientists over periods of years. However, the scale of the problems to be simulated calls for the highest levels of computational performance. Achieving good performance when both computer architectures and the underlying code base are constantly evolving is a complex challenge. In recent years, the use of Domain-Specific Languages (DSLs) as a potential solution to this problem has begun to be investigated.
The UK Met Office's LFRic project is developing a new, Finite Element dynamical core and has adopted a DSL approach. In this talk we will describe this work and the functionality of the domain-specific compiler, PSyclone, which has been developed to process the (serial) code written by the natural scientists and generate the code required to run on massively parallel machines.