# Declarative GT4Py - FVM advection on the sphere
###### tags: `functional cycle 8`, `fvm`
2022-03: was planned for cycle 7, now proposed for cycle 8
Appetite: second 1/2 cycle (Till)
This project aims at extending the python-only FVM advection solver on the sphere ([initial project description](https://hackmd.io/c0zJ_9XsTTiqYIV5nCcliA), [code](https://github.com/tehrengruber/fvm_advection_sphere)) to use the new declarative GT4Py and to give Christian Kühnlein an introduction into the new frontend.
## Description
In cycle 5 an advection solver on the sphere, i.e. horizontally unstructured, using regular Python has been developed. In addition to providing the basis for the development of the globally unstructured dycore the target of this effort was to provide a test case for the new declarative GT4Py that is representative of its additional requirements, e.g. uses Atlas and has special boundary conditions (pole edges). After the first half of the upcomming cycle the new declarative GT4Py is expected to be ready to be used for extending this solver to use the new declarative syntax (based on the concept of Field operators). In addition to this extension I (Till), will give an in-depth introduction into the new version of GT4Py to Christian Kühnlein to setup him up for the actual LAM dycore extension to globally unstructured.
## Steps
- Translate the 3 core stencils [`upstream_flux`, `fluxdiv`, `fvm_advect`](https://github.com/tehrengruber/fvm_advection_sphere/blob/master/src/fvm_advection_sphere/advection.py) to the new Field operator syntax.
- Translate the [`advector_in_edges`](https://github.com/tehrengruber/fvm_advection_sphere/blob/master/src/fvm_advection_sphere/advection.py) stencil, which contains boundary dependent code.
- Introduce Christian Kühnlein to the new frontend and setup him up for the development of the globally unstructured FVM dycore
- __Optional__ Directly use Atlas instead of recreating the mesh
## Schedule / Effort
The effort for this project should be well below half a cycle for me (Till) and will be carried out in its second half.