# FVM advection solver prototype on the sphere ###### tags: `cycle 5`, `fvm` This project aims at implementing a simplified FVM advection solver on the sphere, i.e. horizontally unstructured, including a simple test case in *regular Python*. ## Description At the beginning of 2022, development of the global FVM dycore starts with the goal of a complete running version (unoptimized) not later than Q2 of 2022. As of now, required computational patterns were explored in both the context of the (Cartesian, 3D structured) LAM FVM model (e.g. MPDATA advection, elliptic Helmholtz solver, semi-implicit time integration) and first unstructured-grid prototypes at the stencil level (e.g. we implemented and validated the Nabla operator using the new execution model, as well as expressing it with the functional frontend proposals). The global advection solver is developed to address remaining issues in a simplified framework before advancing to the full global dycore development. The project will provide a minimal global solver expressed in a functional / descriptive way and will address the following specific questions, among others: - Are the requirements of the unstructured dycore captured? One particular example is how pole edges should be handled. - How should the 3D operators in the horizontally unstructured and vertically structured framework be implemented? - How can we develop the unstructured dycore in the same code base as the LAM model? Is this possible using the gtc toolchain for the existing structured-grid LAM and the functional toolchain for unstructured? - How can we integrate Atlas? In which state are the bindings and how much effort is it to update to a newer version, e.g. to support new grids. Note that the scope of this project is not to develop a solver using the functional model, but using regular python. Integration of the functional frontend is desired, but part of the frontend development effort. ## Milestones - Implementation of a simplified advection solver skeleton using the upwind scheme in the computational lat-lon coordinates (the basic building block for the MPDATA advection method of FVM) [Till] - Setup of initial data / storages in NumPy `ndarray`s - Time stepping loop (explicit) - Upwind and flux-divergence stencil written in regular Python - Basic validation - Utilities for loading of mesh information from Atlas, i.e. connectivities and geometrical properties [Till]. *Optional* but desired: Support for a recent version of Atlas. - Extension of the upwind scheme skeleton to advection on the sphere including over the poles [Christian] - Implementation of a simple test case [Christian] Sketch of the file structure of the resulting solver: - `src/advector.py`: Contains the upwind and flux-divergence stencil as well as the time-stepping loop. - `tests/advection.py`: Setup of the initial data, invocation of the advector and validation / output of the result. - `utils/atlas.py`: Utilities to load mesh information ## Appetite - Half cycle Till Ehrengruber - 1,5 weeks Christian Kühnlein