---
# System prepended metadata

title: '[Greenline] GT4Py muphys microphysics scheme '
tags: [cycle 26 - 11/24]

---

# [Greenline] muphys microphysics scheme ported to GT4Py

<!-- Add the tag for the current cycle number in the top bar -->

- Shaped by: Will
- Appetite (FTEs, weeks): 1 FTE - over 2 cycles
- Developers: <!-- Filled in at the betting table unless someone is specifically required here -->

## Problem

Port the Stevens muphys scheme to GT4Py.  

## Appetite
Full cycle

## Solution

The Stevens muphys microphysics physical parameterization is a rewrite of the current NWP Graupel scheme which was ported by Chia Rui to GT4Py.

This physical parameterization has been chosen by MPI-M / DKRZ as a basis for multiple implementations, which help them decide which programming paradigms 
have the most potential for emerging architectures. The current implementations include:

- Fortran sequential
- C++ / OpenMP
- C++ / OpenACC
- C++ / SYCL
- C++ / Kokkos

We discussed many times in the past the usefulness of a GT4Py implementation for the sake of comparison. But the DKRZ developer, Georgiana Mania, never received the mandate to work on it.

Since the underlying muphys code is very similar to the current Graupel scheme, it should be relatively straightforward to use the latter GT4Py implementation as a basis for a fast implementation. 

## Rabbit holes
<!-- Details about the solution worth calling out to avoid problems -->

There are algorithmic differences with the current Graupel implementation. It is possible, though unlikely, that there are motifs which are not currently supported by GT4Py

## No-gos

The validation is based on the existing muphys standalone.  There is no discussion of actually incorporating the muphys granule into the Greenline.

## Progress
<!-- Don't fill during shaping. This area is for collecting TODOs during building. As first task during building add a preliminary list of coarse-grained tasks for the project and refine them with finer-grained items when it makes sense as you work on them. -->

- [x] Task 1 ([PR#xxxx](https://github.com/GridTools/gt4py/pulls))
    - [x] Subtask A
    - [x] Subtask X
- [ ] Task 2
    - [x] Subtask H
    - [ ] Subtask J
- [ ] Discovered Task 3
    - [ ] Subtask L
    - [ ] Subtask S
- [ ] Task 4
