The WarmWorld Module Faster officially started on 01.09.2022 and is coordinated by DKRZ. Its main responsibility is to deliver a first release of ICON-consolidated: a free and open source software implementation of the fully (land, ocean, atmosphere) coupled ICON system refactored to enable its scalable development. Further, Faster will work together with Better to deliver the desired throughput for the model configuration defined in Better: An ICON based coupled model configuration capable of being run with an acceptable simulation quality on km scales (2.5 km global grids or finer) and with a throughput of >0.5 SYPD (simulated years per day) at the start of phase 2 (planned 2026).
The ambitious goals in Faster will be pursued in four activity groups, which are named for the different phases of a spaceship launch:
- AG 1: Mission Control
- AG 2: Ignition
- AG 3: Lift-off
- AG 4: Stage Separation
Mission Control will organize and monitor the overall ICON development for WarmWorld and connect to the other modules (and also external projects with similar focus on ICON). Ignition will prepare the short term necessary modifications for the ICON code such that: i) the simulations in Better are possible on current HPC systems; and ii) more generic refactoring of ICON will be enabled. Lift-Off will enlarge the capabilities for simulations in Better by opening ICON for next-generation HPC systems and scalable development. Stage Separation will eventually introduce an ICON version that is able to extend its development to other programming languages, event-driven programming and external model components by using the principle of a modular design.
- Alfred-Wegener-Institut Helmholtz Zentrum für Polar- und Meeresforschung
- Deutsches Klimarechenzentrum
- Deutscher Wetterdienst
- European Centre for Medium-Range Weather Forecasts
- Forschungszentrum Jülich
- Karlsruher Institut für Technologie
- Max-Planck-Institut für Meteorologie
How Librarization Can Make ICON More Modular
ICON is a very efficient model which can be run on supercomputers to produce forecasts for long periods of time, making it well-suited for climate research as well as for operational weather prediction. The ICON model is monolithic in nature. It is a single, large program with convoluted dependencies, which makes the code difficult to understand and maintain. One of the key objectives within the WarmWorld-Faster project is to address this issue by developing a more modular code base under the ongoing effort of ‘Modularization’. The key steps involve breaking the model code down into smaller, more manageable component modules that can be developed and tested independently. This will make improving the model and adding new features easier. Additionally, the modular structure of ICON will improve scalability and allow for the model’s implementation on larger computing facilities. This article does not delve deeper into the specifics of ‘Modularisation’; instead, the focus here is to discuss how the dependencies of the new ‘modules’ on the ICON model code are resolved through the ‘Librarization’ efforts.
Within the developmental framework of ICON, the term ‘Librarization’ was coined to describe efforts of creating external shared libraries made up of model components. These ’libraries’ are not directly related to the physics behind Numerical Weather Prediction (NWP) or climate modelling but are still essential to it.
The external shared libraries created through ‘Librarization’ are foundational to ICON, which are now extracted from the model code. The selection of library routines is based on the dependencies that the newly refactored ‘modules’ would have on the basic routines of ICON. These new shared libraries make the underlying routines available externally. Therefore, the ‘modules’ will not have any problem accessing them without having any explicit dependence on the model code of ICON. The dependency that the model code has on these library routines stays as it was before the extraction.
The shared libraries created within this ‘Librarization’ effort are currently divided into two groups.
- The first group, also known as the ‘Level One’ libraries, are the ones which are more or less ICON-agnostic. Utility functions to support Fortran implementation within ICON put together in a library are examples of these libraries. These are already made available under the name ‘fortran-support’. Other libraries of this category include utility functions to support mathematical operations and physics needed for ‘Modularization’. They are presently under development and will become available soon.
- The second group of ‘Level Two’ libraries are more specific to ICON as they use the same data structure as ICON. Interpolation, calculation of gradients and similar mathematical functionalities are put together to create math-libraries under this category. Contents of these math-libraries are essential for the development of independent component modules. Additionally, a new library interface is also built to facilitate access to highly structured variables within ICON without exposing the full data structure.
The old routines from ICON are refactored before they are extracted to external libraries so that they can work without any dependence on ICON. This important step also reduces the number of movable files in this process and keeps core ICON-specific files inside the model code. While creating these libraries, it is crucial to ensure that these developments do not adversely affect the performance of the software, and several steps have been taken to achieve that. These new shared libraries have also been proven to be a useful platform for successfully testing new CMake-based build-system and unit testing, two important technical features essential for any software development. This forms the first step toward incorporating new features into ICON. While the introduction of the CMake-base build-system will make the compilation of the code more efficient, unit tests can detect flaws in the code at an earlier stage of development.
To conclude, external shared libraries, developed under the ‘Librarization’ effort, have emerged as a key part of the WarmWorld-Faster project. These libraries will help build new component modules to improve ICON and make it more efficient for the user. Moreover, further algorithmic development within these libraries also has the potential to positively impact the model code.