At the Bornö 2015 CFD workshop, the eScience group with Brian Vinter presented a concept for a ocean/climate modelling domain-specific language.
With an ocean model DSL, writing and developing an ocean model requires only these steps:
The system will then automatically
Example set of governing equations and boundary conditions for an ocean model (primitive equations)
\[u, v, w, \rho, T, S, p\]
\[\rho_0, \alpha, \beta, \kappa, f, g, H, \mathrm{precip}\]
\[u_t + u u_x - fv = \frac1\rho_0 p_x + \kappa u_{xx}\]
\[v_t + u v_x + fu = \frac1\rho_0 p_y + \kappa v_{yy}\]
\[T_t + \vec{u} \nabla \vec{T} = Q\]
\[S_t + \vec{u} \nabla \vec{S} = \mathrm{precip}\]
\[p = \int_z^\eta \, \rho \, g \, dz\]
\[\rho = \rho_0 (1 + \beta S - \alpha T)\]
\[K = f(\rho, h, \dots)\]
This could be formulated in various ways, e.g. computed from high-res non-hydrostatic slices (super-parameterization), a coarser run, or another model run
\[u_x + v_y + w_z = 0\]