EGU General Assembly 2020
© Author(s) 2020. This work is distributed under
the Creative Commons Attribution 4.0 License.

Algorithmic Differentiation for Cloud Schemes

Manuel Baumgartner1, Max Sagebaum2, Nicolas R. Gauger2, Peter Spichtinger3, and André Brinkmann1
Manuel Baumgartner et al.
  • 1Zentrum für Datenverarbeitung, Johannes Gutenberg University Mainz, Mainz, Germany (
  • 2Chair for Scientific Computing, Technische Universität Kaiserslautern, Kaiserslautern, Germany
  • 3Institute for Atmospheric Physics, Johannes Gutenberg University Mainz, Mainz, Germany

Numerical models in atmospheric sciences do not only need to approximate the flow equations on a suitable computational grid, they also need to include subgrid effects of many non-resolved physical processes. Among others, the formation and evolution of cloud particles is an example of such subgrid processes. Moreover, to date there is no universal mathematical description of a cloud, hence many cloud schemes were proposed and these schemes typically contain several uncertain parameters. In this study, we propose the use of algorithmic differentiation (AD) as a method to identify parameters within the cloud scheme, to which the output of the cloud scheme is most sensitive. We illustrate the methodology by analyzing a scheme for liquid clouds, incorporated into a parcel model framework. Since the occurrence of uncertain parameters is not limited to cloud schemes, the AD methodology may help to identify the most sensitive uncertain parameters in any subgrid scheme and therefore help limiting the application of Uncertainty Quantification to the most crucial parameters.

How to cite: Baumgartner, M., Sagebaum, M., Gauger, N. R., Spichtinger, P., and Brinkmann, A.: Algorithmic Differentiation for Cloud Schemes, EGU General Assembly 2020, Online, 4–8 May 2020, EGU2020-1401,, 2019

Comments on the presentation

AC: Author Comment | CC: Community Comment | Report abuse

Presentation version 1 – uploaded on 17 Apr 2020
  • CC1: Comment on EGU2020-1401, Andrew Gettelman, 04 May 2020

    Very interesting. 

    Why is the Analytic Differentiation (AD) method harder in Fortran? Could you do it from every process rate? Or do you need every line of code?



    • AC1: Reply to CC1, Manuel Baumgartner, 04 May 2020

      Thank you for your interest!

      The algorithmic differentiation (AD) is indeed applied to each code line. This way, the derivative of a piece of code is built up after the execution of each line.

      Basically, this is the reason why it is harder with Fortran: in C++ you can define a new datastructure to combine a variable and the computed derivative (and this is the way taken with the CoDiPack software); but in Fortran there is not such a "class concept" as in C++. As a consequence, each code line needs to be extended by the respective derivative computation. However, there are tools to help with this source code transformation process, but it is more complex.

      In essence, yes, you can do the same for each process rate: bundle the computation of the process rate into a single function and compute the derivative of this new function with respect to its input parameters.