the Creative Commons Attribution 4.0 License.
the Creative Commons Attribution 4.0 License.
Exploring Cloud Microphysics Modeling Concepts the Pythonic Way
Abstract. We share with the community a concise Pythonic codebase for hands-on exploration of cloud microphysics modeling concepts. It includes an adiabatic air-parcel model simulating diffusional droplet growth – leading to condensation, activation, evaporation, and ripening; as well as a box model resolving collisional growth of particles using the Super-Droplet Method Monte-Carlo scheme. Leveraging Pythonic abstractions and programmatic unit handling, the code combines pseudo-code-level readability, auditability, and dimensional-correctness enforcement with high performance through just-in-time (JIT) compilation, which generates native machine code on the fly, avoiding bytecode interpretation overhead for compute-heavy routines. With the goal of illustrating how concise yet complete implementations support both teaching and research software engineering, the paper includes and narrates the entire code, plotting logic included. The code runs with a single click "in the cloud" – on Google Colab or other Jupyter hubs, and thus constitutes a suitable resource for self-study or for a short course in microphysics modeling. Presented technical solutions originate from the PySDM particle-based simulation package, but are applicable in a wider scope and independently of PySDM as exemplified here. The paper includes section-wise exploratory exercises designed to guide further application of the methods and concepts discussed.
Competing interests: At least one of the (co-)authors is a member of the editorial board of Geoscientific Model Development.
Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims made in the text, published maps, institutional affiliations, or any other geographical representation in this paper. While Copernicus Publications makes every effort to include appropriate place names, the final responsibility lies with the authors. Views expressed in the text are those of the authors and do not necessarily reflect the views of the publisher.- Preprint
(691 KB) - Metadata XML
-
Supplement
(103 KB) - BibTeX
- EndNote
Status: open (until 20 Nov 2026)
- RC1: 'Comment on egusphere-2026-3906', Anonymous Referee #1, 23 Oct 2026 reply
Viewed
| HTML | XML | Total | Supplement | BibTeX | EndNote | |
|---|---|---|---|---|---|---|
| 590 | 193 | 49 | 832 | 85 | 64 | 63 |
- HTML: 590
- PDF: 193
- XML: 49
- Total: 832
- Supplement: 85
- BibTeX: 64
- EndNote: 63
Viewed (geographical distribution)
| Country | # | Views | % |
|---|
| Total: | 0 |
| HTML: | 0 |
| PDF: | 0 |
| XML: | 0 |
- 1
General Comments
The authors present a well-written description of an application of Python to the field of cloud microphysics. The code examples are interesting and well-constructed. I learned a bunch! I concur with the authors that their work also has applicabilty beyond both the field of cloud microphysics and the Python language (line 435).
I had difficulty, however in parsing the arguments of the paper, as I wasn't exactly sure how to understand its focus. Is the paper focused on describing:
(1) how to structure a course on cloud microphysics (modeling) that utilizes Python and the PySDM package to create active learning modules (lines 10-11, 69)?
(2) certain workflow patterns that enable additional simulation functionality (lines 419-421)?
(3) how to use PySDM to create a cloud-parcel model (lines 330-333)?
(4) all of the above?
In these comments, I provide thoughts on additional text that would help the reader better connect with each of the above possible purposes of the paper.
Re (1): Some summary text that explicitly describes how each of the topics in the ten model-development sections connect to topics in a cloud microphysics (modeling) course would be helpful. The text could also discuss what kind of learning outcomes in such a course the model-development will facilitate. This could go in the Summary or in the Structure and format portions of the paper.
As an aside, if the authors haven't seen these, I think the DSECOP folks who have created Python machine learning modules that can be incorporated into existing physics classes have done a good job of this incorporation. Here's their Github page:
https://github.com/GDS-Education-Community-of-Practice/DSECOP
At least some of the modules describe where in the physics curriculum the modules best fit.
Re (2): Add a few sentences that describe an example from another field of how the workflow patterns described here could be applied. A sentence in the introduction after line 70 might be an appropriate preview and/or a fuller description after line 423.
Re (3): Add a paragraph in the introduction after line 88 describing what the steps are in creating a cloud-parcel model and where in each of the above sections those components are presented. Because a number of the section titles only discuss the coding aspect, it's not clear from the beginning of the paper how the paper will proceed to create the model.
Re (4): If the authors intend that the paper meet all of the above three purposes, a paragraph in the introduction and one in the conclusion would be helpful specifically stating that this is the intention and telling the reader how to best navigate the paper for each of these purposes.
Specific Comments
Are the solutions to the exercises in the paper also available in the electronic supplement (lines 439-440)? If so, please mention that. It'll make instructors happy :).
Technical Corrections
None.