Preprints
https://doi.org/10.5194/gmd-2024-92
https://doi.org/10.5194/gmd-2024-92
Submitted as: development and technical paper
 | 
03 Jun 2024
Submitted as: development and technical paper |  | 03 Jun 2024
Status: a revised version of this preprint was accepted for the journal GMD and is expected to appear here in due course.

Exploring a high-level programming model for the NWP domain using ECMWF microphysics schemes

Stefano Ubbiali, Christian Kühnlein, Christoph Schär, Linda Schlemmer, Thomas C. Schulthess, Michael Staneker, and Heini Wernli

Abstract. We explore the domain-specific Python library GT4Py (GridTools for Python) for implementing a representative physical parametrization scheme and the related tangent-linear and adjoint algorithms from the Integrated Forecasting System (IFS) of ECMWF. GT4Py encodes stencil operators in an abstract and hardware-agnostic fashion, thus enabling more concise, readable and maintainable scientific applications. The library achieves high performance by translating the application into targeted low-level coding implementations. Here, the main goal is to study the correctness and performance-portability of the Python rewrites with GT4Py against the reference Fortran code and a number of automatically and manually ported variants created by ECMWF. The present work is part of a larger cross-institutional effort to port weather and climate models to Python with GT4Py. The focus of the current work is the IFS prognostic cloud microphysics scheme, a core physical parametrization represented by a comprehensive code that takes a significant share of the total forecast model execution time. In order to verify GT4Py for Numerical Weather Prediction (NWP) systems, we put additional emphasis on the implementation and validation of the tangent-linear and adjoint model versions which are employed in data assimilation. We benchmark all prototype codes on three European supercomputers characterized by diverse GPU and CPU hardware, node designs, software stacks and compiler suites. Once the application is ported to Python with GT4Py, we find excellent portability, competitive performance, and robust execution in all tested scenarios including with reduced precision.

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 preprint. The responsibility to include appropriate place names lies with the authors.
Stefano Ubbiali, Christian Kühnlein, Christoph Schär, Linda Schlemmer, Thomas C. Schulthess, Michael Staneker, and Heini Wernli

Status: closed

Comment types: AC – author | RC – referee | CC – community | EC – editor | CEC – chief editor | : Report abuse
  • RC1: 'Comment on gmd-2024-92', Anonymous Referee #1, 25 Jun 2024
    • AC1: 'Reply on Referee Comments', Stefano Ubbiali, 26 Aug 2024
  • RC2: 'Comment on gmd-2024-92', Anonymous Referee #2, 26 Jun 2024
    • AC1: 'Reply on Referee Comments', Stefano Ubbiali, 26 Aug 2024
  • RC3: 'Comment on gmd-2024-92', Anonymous Referee #3, 24 Jul 2024
    • AC1: 'Reply on Referee Comments', Stefano Ubbiali, 26 Aug 2024

Status: closed

Comment types: AC – author | RC – referee | CC – community | EC – editor | CEC – chief editor | : Report abuse
  • RC1: 'Comment on gmd-2024-92', Anonymous Referee #1, 25 Jun 2024
    • AC1: 'Reply on Referee Comments', Stefano Ubbiali, 26 Aug 2024
  • RC2: 'Comment on gmd-2024-92', Anonymous Referee #2, 26 Jun 2024
    • AC1: 'Reply on Referee Comments', Stefano Ubbiali, 26 Aug 2024
  • RC3: 'Comment on gmd-2024-92', Anonymous Referee #3, 24 Jul 2024
    • AC1: 'Reply on Referee Comments', Stefano Ubbiali, 26 Aug 2024
Stefano Ubbiali, Christian Kühnlein, Christoph Schär, Linda Schlemmer, Thomas C. Schulthess, Michael Staneker, and Heini Wernli
Stefano Ubbiali, Christian Kühnlein, Christoph Schär, Linda Schlemmer, Thomas C. Schulthess, Michael Staneker, and Heini Wernli

Viewed

Total article views: 656 (including HTML, PDF, and XML)
HTML PDF XML Total BibTeX EndNote
483 143 30 656 21 19
  • HTML: 483
  • PDF: 143
  • XML: 30
  • Total: 656
  • BibTeX: 21
  • EndNote: 19
Views and downloads (calculated since 03 Jun 2024)
Cumulative views and downloads (calculated since 03 Jun 2024)

Viewed (geographical distribution)

Total article views: 661 (including HTML, PDF, and XML) Thereof 661 with geography defined and 0 with unknown origin.
Country # Views %
  • 1
1
 
 
 
 
Latest update: 13 Dec 2024
Download
Short summary
We explore a high-level programming model for GPU porting of NWP model codes, based on the Python domain-specific library GT4Py. We present a Python rewrite with GT4Py of the ECMWF cloud microphysics scheme and the associated tangent-linear and adjoint algorithms. We find excellent portability, competitive performance and robust execution on diverse CPU and GPU architectures. The additional advantages in terms of maintainability, productivity and readability are also highlighted.