# [ICON4Py] Standalone greenline
<!-- Add the tag for the current cycle number in the top bar -->
- Shaped by: Magdalena
- Appetite (FTEs, weeks):
- Developers: <!-- Filled in at the betting table unless someone is specifically required here -->
## Problem
<!-- The raw idea, a use case, or something we’ve seen that motivates us to work on this -->
A couple of things are still missing in order to run simple atmospheric testcase (Jablonowski-Williamson) icon4py as a standalone. With this project we want to tie these ends.
The first focus will be to enable us to run the icon4py dycore components (SolveNonHydro, Diffusion) in benchmark mode independent of serialized data.
## Appetite
<!-- Explain how much time we want to spend and how that constrains the solution -->
Full Cycle
## Solution
<!-- The core elements we came up with, presented in a form that’s easy for people to immediately understand -->
### Finish on-going work
1. port remaining static fields
Finish the [RBF validation](https://hackmd.io/kSqYN0iWTX6ivMTqeo1gNg) from last cycle
2. additional tasks for standalone benchmark tests ( test_diffusion.py, test_solve_nonhydro.py):
- integrate z_ifc into metrics_factory.py (update and merge this branch: https://github.com/C2SM/icon4py/pull/564)
- fix tests to run test either with serialized data or grid file + factories + initialization routines for prognostics (the ones used in JW from `driver`)
1. serilized data: as is now
2. standalone
- load a large enough grid (ICON-CH2 for LAM, R02B07 for global grid)
- compute geometry and initialize factories (possibly integrate fields into the factory that are not yet there, but all should be ported)
- initialize the dynamic data (random data or Jablonowski-Williamson idealized initial conditions)
### Add Green-line performance benchmark to CI
Python dycore standalone (Jablonowski Williamson setup)
- Add a performance benchmark for the JW (Using R02b07).
- As intermediate step, serialize data from a larger EXCLAIM APE experiment (Using R02b07). The serialized data for static fields can be replaced by the computed fields as they are ready (-> [standalone greenline](https://hackmd.io/78NO54hKRDu4uyXB61CGqw))
- Initialize prognostic fields with the initialization functions for JW.
## Rabbit holes
<!-- Details about the solution worth calling out to avoid problems -->
## No-gos
<!-- Anything specifically excluded from the concept: functionality or use cases we intentionally aren’t covering to fit the ## appetite or make the problem tractable -->
This project does not include re-architecting the current `icon4py_driver`, but rather focuses on putting the components needed to do in place.
## 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. -->
1. - [ ] Port RBF field interpolation (https://github.com/C2SM/icon4py/pull/709)
- [X] Rabbit hole of validation for vertex/cell fields
- RBF interpolation matrix ill-conditioned; small differences in inputs (caused by rounding modes, math libraries, `-K(no)ieee`, nvfortran vs gfortran) result in relatively large (~1e-2) differences in the final RBF coefficients on the R04B09 grid
- [x] finalized PR: add missing tests, set up field factories
- 2. [ ] (Intermediate step)Refactor the interpolation factory and metrics factory #PR757
- [X] Add a new field register ( nudgecoeffs_e) and also the test in interpolation field
- [ ] Add a new field register (vertical_coordinates_on_cell_khalf) and also to the metrics field
- [X] Add topography as the input arguments to construct metrics field
- [X] refactor the computation a bit to make it a completely Numpy function for the easier register
- [X] Clean up the interpolation factory and metrics factory, remove those varisble which are not used anymore
- 3. [ ] Standalone test and benchmark on diffusion #PR747
- [ ] setup a new test file for diffusion (test_benchmark_diffusion.py) in which we replace the serialize data with computed field from geometry, initialed factory or initialized fields
- [ ] this will proceed after we we merge #PR747 firstly