Developers’ perspective
Inversion of Control as a solution to the patchwork of parameterization in atmospheric modeling 
It is not uncommon in atmospheric modeling for different studies to use different parameterization or simulation flow control. We present Inversion of Control (IoC) solutions from PySDM that allow users to select formulae and constants from the topmost level of the codebase, without trade-offs in:
performance,
compatibility with both CPU and GPU backends, and
ability to perform dimensional analysis of physics-relevant routines for testing unit correctness.
Inversion of Control
A prerequisite for code reusability and effective testing.
The simple notebook demonstrates this modularity by reproducing findings from Bolin [1958]. The author, Bert Bolin, was a Swedish meteorologist and the first chairman of the Intergovernmental Panel on Climate Change (IPCC), from 1988 to 1997 Wikipedia.
In the notebook, one can find Bolin’s table with the timescales of water isotopic exchange between a falling raindrop and the ambient air (Table 1.) reproduced with PySDM. The screenshot below shows a section of that notebook where physical system is defined: formulae are selected and constants are set.

Thanks to the modular structure of the physics
subpackage, users can easily customize parameterization and values of constants.
Such code design helps compartmentalize a new developer’s exposure, allowing them to focus on one component at a time.
Dimensional analysis
This IoC approach not only exposes all physical constants for user configuration, but also allows us to substitute them with unit-carrying objects making dimensional consistency checks across the entire codebase automatable. Returning to the Bolin’s work, we demonstrate an example test for units correctness of a specific equation.

Notebooks are a source of test (edge) cases!
Creating tests for edge cases can be challenging. Our notebooks - designed to reproduce results from scientific literature - naturally provide tests cases! This includes:
regression tests ensuring new components do not alter previous results;
evaluation of different parameterization or simulation settings against reference values from literature.
For these purposes, we present a function from open-atmos-jupyter-utils
used in Jupyter-notebooks testing.
notebook_vars()
Executes an unmodified notebook code for automated testing
Allows multiple assert statements o be evaluated via a single test run using pytest fixture.
Additionally, by using pytest fixture
and isolating a separate package for notebooks, i.e. PySDM-examples
we enable automated tests to be maintained outside the notebooks themselves.
This approach improve maintenance of both notebooks and tests.