# [Blueline] Dycore Wrapper: Dycore granule wrapper for Py2F <!-- Add the tag for the current cycle number in the top bar --> - Shaped by: Christoph, Sam - Appetite (FTEs, weeks): full cycle 1 person - Developers: <!-- Filled in at the betting table unless someone is specifically required here --> ## Problem Want to expose the icon4py ICON dycore to Fortran. ## Appetite Full cycle ## Solution <!-- The core elements we came up with, presented in a form that’s easy for people to immediately understand --> Integrate dycore granule: - Write a Python interface for a dycore granule and create an integration test to test it from Python. - Use Py2F to generate corresponding bindings for the dycore wrapper. - Integrate this into Fortran, writing a Fortran call to Py2F bindings, passing all the correct parameters and arrays. - Verify dycore results (for mch production experiments and aquaplanet experiments). ## Rabbit holes - Do not support all possible combinations of namelist switches. ## 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 --> - Do not prematurely optimise things, except if there is time left. However do write down any ideas/observations related to this for future reference. ## 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] Write wrapper for dycore granule - [x] Write python integration test executing wrapper(granule) with random data - [x] Write Fortran integration test executing wrapper through py2f with random data (CPU). - [x] Write Fortran integration test executing wrapper through py2f with random data (GPU). Adapt existing f90 driver with data create statements and add test_cli integration test on GPU (can only be run on CI). - [x] Write call to Fortran subroutine calling Python dycore granule. - [ ] Make dycore granule verify for mch_ch_r04b09 or other production experiment - [ ] Make dycore granule verify for aquaplanet - [ ] maybe need to create dummy metric fields - [ ] Switch to dace and test