the Creative Commons Attribution 4.0 License.
the Creative Commons Attribution 4.0 License.
SWEET – Shallow Water Equation Environment for Tests v1.0
Abstract. SWEET is an open-source software for numerical simulation of differential equations discretized with global spectral methods, both on the bi-periodic plane and the sphere. Although not directly restricted to it, its main focus is on numerical developments for the shallow water equations (SWE) since they play a crucial role in developing new numerical methods for climate and weather simulations.
SWEET's main purpose is to bridge the gap between the development of new time integration methods for atmospheric dynamical cores and high-performance computing. This is done by providing a fast and efficient environment for developing and analyzing time discretization methods for the SWE while reducing spatial errors to a minimum due to the utilization of global spectral methods. In addition, the performance of new time integration methods can be assessed on HPC systems. Regarding the numerics, this is achieved through a versatile implementation, allowing the user to quickly run and combine different time-stepping schemes, and flexibly choose the different terms of the governing equations (i.e., the different physical processes) to be considered in the time integration in a composable way through command line arguments, allowing a rapid exploration of time integration methods. Concerning HPC, SWEET supports various ways to explore parallel-in-time integration methods on large-scale HPC clusters. To analyze the results, SWEET also contains many benchmark tests, including standard test cases relevant to atmospheric modeling research. These features make SWEET a robust and powerful tool for researching temporal schemes for atmospheric circulation models.
This paper summarizes the main features of SWEET and provides some numerical examples illustrating its application.
- Preprint
(1664 KB) - Metadata XML
- BibTeX
- EndNote
Status: final response (author comments only)
-
RC1: 'Comment on egusphere-2025-5156', Keaton Burns, 14 Feb 2026
-
AC1: 'Reply on RC1', João Guilherme Caldas Steinstraesser, 22 Jun 2026
Below, non-bold text corresponds to the reviewer’s comments, and bold text corresponds to our responses.
This paper presents a new Python and C++ spectral solver for the shallow water equations, and closely related models, on the torus and 2D sphere. The main novelty is the interface for constructing and composing advanced temporal integrators for these equations, for the purpose of developing, debugging, testing, and comparing timestepping techniques. A broad range of integrators are implemented in the code, including Runge-Kutta methods, exponential integrators, semi-Lagrangian schemes, spectral deferred correction, and parallel-in-time methods. Overall, this seems like a nicely scoped project with a clear purpose and strong execution. The paper is also well written. It provides a good pedagogical overview for timestepping techniques in geophysical flow simulations, and will be a useful reference for new users of the model. I recommend the paper for publication after addressing a few suggestions and technical corrections.
Response: Thank you for your review! Below, we provide detailed responses to each of your comments. In the revised version of the paper, text in red indicates modifications corresponding to your review.
Specific comments:
- In section (3.2 Parallelization), maybe some comment should be made regarding MPI / distributed memory parallelism. This is later discussed in the context of the parallel-in-time methods, but a quick reference to that upcoming discussion would be helpful here for completeness.
Response: In Section 3.2, we stated that extending spatial parallelization to distributed-memory systems is a limitation of SWEET.
We have included a sentence in the revised version that references the discussion in the section on parallel-in-time methods (Lines 169-170). Please note that one of the main purposes of SWEET is the investigation of parallelization-in-time, where we support MPI through different parallel-in-time integrators (REXI, XBraid, LibPFASST).
SWEET's focus is not to investigate spatial scalability on extreme-scale systems.
- In section (4.5 Limitations), the lack of support for multi-step schemes is mentioned. It may be useful to add a bit more context here -- how prevalent are such schemes in other GFD codes? Do they have substantial advantages over the included schemes in any ways? Is adding then currently work-in-progress, or is it seen as out-of-scope for SWEET?
Response: Multi-stepping is not commonly used in GFD due to the storage requirements of earlier time steps; however, some models, such as Croco (which uses AB3AM4), do use it. In SWEET, the reason for a lack of general order multi-stepping methods is actually that this requires substantial redesign of the time stepping algorithms. Support for some specific multi-step methods already exists in SWEET, for instance, with the semi-Lagrangian schemes implemented in SWEET that use a kind of multi-step method storing the previous step. We added a short sentence in Section 4.5 (Lines 392-394).
- The code's efficiency is mentioned at several points, but not much concrete performance data is provided. This is perhaps not the main point of the model, but it would still be nice to provide some discussion and data about the code's performance for potential users. Figure 6b provides some wall clock data, but it would be helpful to reframe these measurements for at least one specific run in an interpretable metric (like DOF-iterations per cpu-second) in the discussion in the text.
Response: Thank you for the suggestion. In Figure 6c, we have included a graph showing the DOF-iterations per second vs the error, as well as a brief discussion at the end of Section 6.1 (Lines 622-629). We remark that SWEET does not target to be the highest performing code, but to find the right balance between 1. exploring time integration methods, 2. conducting studies with OpenMP in space and OpenMP/MPI parallelization in time and 3. providing a high performance of the spatial PDE solver parts.
- The other notable absence is any mention of GPU implementation. This seems like it may not be too difficult, given that GPU support is now available in SHTns. Of course, this isn't necessary for building new timestepping schemes and studying their accuracy, but it is relevant for comparing the performance of different routines, since memory-vs-compute tradeoffs differ on CPUs vs GPUs. Many geophysical models are now moving to GPU architectures, so even if GPU support is not planned for SWEET, some discussion about this should be added (perhaps to the parallelism section).
Response: ``GPU'' support could indeed be directly used with SHTns or probably also with some FFT CUDA library, but would not suffice in providing the required high performance due to ongoing host-device copies.
Support for that would need to be added (with CUDA / OpenACC directives), but even if it works, the spatial problem sizes relevant for prototyping and testing time integration methods are rather small and won't scale that well on high-end GPUs.
In addition, achieving close-to-peak performance on GPUs often requires hand-tuned code, which contradicts the purpose of SWEET. This discussion has been included in Section 3.2 (Lines 172-177).
Technical corrections:
- Equation (16) is missing a time differential in the integral.
Response: It has been corrected in equations (16) and (17) (Lines 325 and 327).
- Equation (17) seems like it have a quadrature sum over f(u\_m) in place of the integral.
Response: The problem with equation (17) is the upper limit of the integral. It has been fixed (Line 327).
- Line 423: "low-expensive" -> "low-expense"
Response: Fixed (Line 434).
Citation: https://doi.org/10.5194/egusphere-2025-5156-AC1
-
AC1: 'Reply on RC1', João Guilherme Caldas Steinstraesser, 22 Jun 2026
-
RC2: 'Comment on egusphere-2025-5156', Anonymous Referee #2, 25 May 2026
Review for SWEET — Shallow Water Equation Environment for Tests v1.0
This paper describes the software package SWEET: Shallow Water Equation Environment for Tests — a framework primarily designed to examine the impact of various time-integration choices on the simulation of idealised barotropic flows. The authors introduce a wide array of known time stepping schemes, explain SWEET’s spectral spatial discretisation and C++ / Python programming environment, and introduce a pair of numerical experiments.
Overall, I am quite undecided on this paper. To me it seems that it presents more of an introduction to a body of (already known) work and techniques, without necessarily extending into new numerical methodology, analysis, use-cases or HPC development. I understand it may be argued the purpose of this paper is not to do such things, it is simply to introduce SWEET as a modelling framework, but considering the simplified equations and physics implemented, it is not clear to me that SWEET is quite at the level of a realisable dycore to be picked up and used by the community broadly, and overall, I feel that a little more may be necessary for GMD. I suggest there should be at least one area where the work incorporates something new, novel and/or broadly applicable.
On the other hand, the paper is well-written and provides a comprehensive description of the SWEET package, which, as an open-source implementation of the classical barotropic equations and simple, idealised test cases, may be of interest for students and researchers.
Please find below additional specific comments:
- While the OpenMP-based parallelism described is clearly sufficient for the idealised barotropic simulations presented, I don’t feel it is enough to present SWEET as a “HPC” framework. Massive MPI implementation and GPU workflows are becoming more common, and would, I expect, be necessary for any realistic simulations and physical configurations.
- I don’t find the numerical experiments presented to be particularly impactful — I feel they serve more as demonstration that such experiments could be performed, rather than engaging in deeper analysis that highlights particular strengths in SWEET compared to existing dycores. For example:
- Analysing order-of-accuracy after a single day of simulation in the Galewesky case is troubling to me — at this early stage there has been no substantial development in the flow, with the vorticity filaments not beginning to roll up until around day 4. The flow remains deterministic (but nonlinear) until around day 7. If, as noted, some of the time stepping schemes appear not to achieve their expected order-of-accuracy later in the simulation, I suggest it could be worthwhile understanding whether these methods (some of which may incorporate quasi-linearisation of coefficients) suffer order-reduction in genuinely nonlinear cases. Even for short NWP runs, at least multi day simulations would be expected.
- I’m not sure how best to interpret the results shown for the parallel-in-time techniques — convergence plots are presented for a set of runs with differing viscosities using the Parareal method, where it appears that various levels of non-convergence is achieved. It is noted in the text that this behaviour highlights the difficulty of constructing parallel-in-time approaches for geophysical fluids problems. I’m not sure how to interpret this as a positive result for the use or extension of these methods?
- I’m not sure what to take away from the Polvani cases. It is noted that determining initial conditions for this case is challenging, but it does not appear that further details are given, or what capabilities are exploited in SWEET to resolve the issues. I can speculate that, for such flows, it is indeed necessary to perform an additional numerical step to build compatible, geostrophically-balanced initial conditions, with the solution of a boundary-value problem being one avenue commonly taken.
- In Figs 4,5 and 7 it appears that the vorticity distributions are presented upside down, i.e. the sign of vorticity filaments is inverted wrt. Fig 3, which shows the standard Galewesky output.
Citation: https://doi.org/10.5194/egusphere-2025-5156-RC2 -
AC2: 'Reply on RC2', João Guilherme Caldas Steinstraesser, 22 Jun 2026
Below, non-bold text corresponds to the reviewer’s comments, and bold text corresponds to our responses.
This paper describes the software package SWEET: Shallow Water Equation Environment for Tests — a framework primarily designed to examine the impact of various time-integration choices on the simulation of idealised barotropic flows. The authors introduce a wide array of known time stepping schemes, explain SWEET’s spectral spatial discretisation and C++ / Python programming environment, and introduce a pair of numerical experiments.
Overall, I am quite undecided on this paper. To me it seems that it presents more of an introduction to a body of (already known) work and techniques, without necessarily extending into new numerical methodology, analysis, use-cases or HPC development. I understand it may be argued the purpose of this paper is not to do such things, it is simply to introduce SWEET as a modelling framework, but considering the simplified equations and physics implemented, it is not clear to me that SWEET is quite at the level of a realisable dycore to be picked up and used by the community broadly, and overall, I feel that a little more may be necessary for GMD. I suggest there should be at least one area where the work incorporates something new, novel and/or broadly applicable.
On the other hand, the paper is well-written and provides a comprehensive description of the SWEET package, which, as an open-source implementation of the classical barotropic equations and simple, idealised test cases, may be of interest for students and researchers.
Response: We sincerely appreciate your comments and suggestions on our work. However, we believe that the article fits the scope of GMD as a Model description paper, which corresponds to one of the seven manuscript types accepted by the journal:
“Model description papers are comprehensive descriptions of numerical models which fall within the scope of GMD. The papers should be detailed, complete, rigorous, and accessible to a wide community of geoscientists. In addition to complete models, this type of paper may also describe model components and modules, as well as frameworks and utility tools used to build practical modelling systems, such as coupling frameworks or other software toolboxes with a geoscientific application. The GMD definition of a numerical model is generous, including statistical models, models derived from data (whether model output or observational data), spreadsheet-based models, box models, 1-dimensional models, through to multi-dimension mechanistic models.” (https://www.geoscientific-model-development.net/about/manuscript_types.html#item1)
We agree that the article does not introduce new numerical methods or analyses for global dynamical cores, nor does it aim to present “successful” or “positive” results related to these topics. Its objective is to provide an easily accessible and reliable tool for research on time integration schemes for the shallow water equations on the rotating sphere (and some other models). For this reason, we believe the article fits very well the scope of GMD.
Our model not only implements several time integration schemes commonly used in global dynamical cores, as well as some that have recently attracted interest in this area, but more importantly, it offers a straightforward toolbox to compose and test them using standard benchmarks in atmospheric modeling.
The composability approach allows combining time integration schemes (thus defining new time integration approaches), as well as setting up modified governing equations, without additional coding or compilation. This significantly reduces the coding and debugging effort that would otherwise be required. Moreover, SWEET also provides sets of initial conditions that are analytically difficult to set up, such as in the Polvani test cases which is the reason why we presented it here.
Below, we provide detailed responses to each of your comments. In the revised version of the paper, text in orange indicate modifications corresponding to your review.
Please find below additional specific comments:
- While the OpenMP-based parallelism described is clearly sufficient for the idealised barotropic simulations presented, I don’t feel it is enough to present SWEET as a “HPC” framework. Massive MPI implementation and GPU workflows are becoming more common, and would, I expect, be necessary for any realistic simulations and physical configurations.
Response: SWEET is not intended to be a highly performing solver, but to allow rapid prototyping and testing of new (parallel-in-)time integration methods, and we provide MPI and OpenMP for this. We clarified this in Section 3.2, as well as a discussion on the GPU implementation (Lines 170-177).
- I don’t find the numerical experiments presented to be particularly impactful — I feel they serve more as demonstration that such experiments could be performed, rather than engaging in deeper analysis that highlights particular strengths in SWEET compared to existing dycores. For example:
- Analysing order-of-accuracy after a single day of simulation in the Galewesky case is troubling to me — at this early stage there has been no substantial development in the flow, with the vorticity filaments not beginning to roll up until around day 4. The flow remains deterministic (but nonlinear) until around day 7. If, as noted, some of the time stepping schemes appear not to achieve their expected order-of-accuracy later in the simulation, I suggest it could be worthwhile understanding whether these methods (some of which may incorporate quasi-linearisation of coefficients) suffer order-reduction in genuinely nonlinear cases. Even for short NWP runs, at least multi day simulations would be expected.
Response: As discussed above, this paper does not have the purpose of presenting the development of new time integration schemes nor numerical studies aiming to study their various properties. The convergence plots in the numerical results section is presented to show that SWEET provides postprocessing tools that facilitate this type of study. We are using standard benchmarks from the literature to allow a wider comparison. The Galewsky test case is usually analyzed qualitatively, and even convergence is investigated qualitatively in the literature, see e.g. [Ullrich et al., 2010, Peixoto, 2016, Chen and Xiao, 2008, Gaudreault and Pudykiewicz, 2016]. Main reason is: at this regime, the PDEs are dynamically unstable (chaotic nonlinear process where a small variation in the initial solution induces a large variation in the final solution), so testing in advanced times confuses the numerical accuracy errors with the dynamical characteristics of the PDEs. See [Pudykiewicz, 2011], which calculates the Lyapunov exponent for the unstable jet test case.
- I’m not sure how best to interpret the results shown for the parallel-in-time techniques — convergence plots are presented for a set of runs with differing viscosities using the Parareal method, where it appears that various levels of non-convergence is achieved. It is noted in the text that this behaviour highlights the difficulty of constructing parallel-in-time approaches for geophysical fluids problems. I’m not sure how to interpret this as a positive result for the use or extension of these methods?
Response: As discussed above, the goal of the article, including the section on parallel-in-time methods, is not to present positive results. Predictor-corrector parallel-in-time methods are well known to struggle when applied to hyperbolic problems, and overcoming these challenges is an active area of research. One approach is to investigate parallel-in-time performance when combining different time-integration schemes, which tipically requires a considerable coding effort. SWEET provides a straightforward environment for conducting this type of research, enabling two- and multilevel parallel-in-time simulations that combine any of the time-integration schemes available in the software, including different parametric choices such as artificial hyperviscosity. The numerical simulations presented in the article aim to illustrate this versatility. This is discussed in Lines 692-698.
- I’m not sure what to take away from the Polvani cases. It is noted that determining initial conditions for this case is challenging, but it does not appear that further details are given, or what capabilities are exploited in SWEET to resolve the issues. I can speculate that, for such flows, it is indeed necessary to perform an additional numerical step to build compatible, geostrophically-balanced initial conditions, with the solution of a boundary-value problem being one avenue commonly taken.
Response: The Polvani test cases are particularly challenging to implement since their geostrophically-balanced initial conditions need to be determined through fixed-point iterations, with Poisson equations being solved within each iteration using a spectral method. SWEET implements these procedures. We recall that presenting new results is not the focus of this article. We have included this description in Section 6.4 (Lines 700-702).
- In Figs 4,5 and 7 it appears that the vorticity distributions are presented upside down, i.e. the sign of vorticity filaments is inverted wrt. Fig 3, which shows the standard Galewesky output.
Response: Thank you for pointing it out. The plots were indeed upside down, due to an issue in Python postprocessing script. The plots in Figures 5 and 7 are now correct.
References:
[Chen and Xiao, 2008] Chen, C. and Xiao, F. (2008). Shallow water model on cubed-sphere by multi- moment finite volume method. Journal of Computational Physics, 227(10):5019–5044.
[Gaudreault and Pudykiewicz, 2016] Gaudreault, S. and Pudykiewicz, J. A. (2016). An efficient exponential time integration method for the numerical solution of the shallow water equations on thesphere. Journal of Computational Physics, 322:827–848.
[Peixoto, 2016] Peixoto, P. S. (2016). Accuracy analysis of mimetic finite volume operators on geodesic grids and a consistent alternative. Journal of Computational Physics, 310:127–160.
[Pudykiewicz, 2011] Pudykiewicz, J. A. (2011). On numerical solution of the shallow water equations with chemical reactions on icosahedral geodesic grid. Journal of Computational Physics, 230(5):1956– 1991.
[Ullrich et al., 2010] Ullrich, P. A., Jablonowski, C., and Van Leer, B. (2010). High-order finite-volume methods for the shallow-water equations on the sphere. Journal of Computational Physics, 229(17):6104–6134
Citation: https://doi.org/10.5194/egusphere-2025-5156-AC2
Data sets
Data used to generate the plots Keerthi Gaddameedi et al. https://doi.org/10.5281/zenodo.17624458
Model code and software
SWEET source code Keerthi Gaddameedi et al. https://gitlab.inria.fr/sweet/sweet
Informative webpage Keerthi Gaddameedi et al. https://sweet.gitlabpages.inria.fr/sweet-www/
SWEET source code Keerthi Gaddameedi et al. https://doi.org/10.5281/zenodo.17424607
Viewed
| HTML | XML | Total | BibTeX | EndNote | |
|---|---|---|---|---|---|
| 1,358 | 973 | 163 | 2,494 | 108 | 96 |
- HTML: 1,358
- PDF: 973
- XML: 163
- Total: 2,494
- BibTeX: 108
- EndNote: 96
Viewed (geographical distribution)
| Country | # | Views | % |
|---|
| Total: | 0 |
| HTML: | 0 |
| PDF: | 0 |
| XML: | 0 |
- 1
General comments:
This paper presents a new Python and C++ spectral solver for the shallow water equations, and closely related models, on the torus and 2D sphere. The main novelty is the interface for constructing and composing advanced temporal integrators for these equations, for the purpose of developing, debugging, testing, and comparing timestepping techniques. A broad range of integrators are implemented in the code, including Runge-Kutta methods, exponential integrators, semi-Lagrangian schemes, spectral deferred correction, and parallel-in-time methods. Overall, this seems like a nicely scoped project with a clear purpose and strong execution. The paper is also well written. It provides a good pedagogical overview for timestepping techniques in geophysical flow simulations, and will be a useful reference for new users of the model. I recommend the paper for publication after addressing a few suggestions and technical corrections.
Specific comments:
1. In section (3.2 Parallelization), maybe some comment should be made regarding MPI / distributed memory parallelism. This is later discussed in the context of the parallel-in-time methods, but a quick reference to that upcoming discussion would be helpful here for completeness.
2. In section (4.5 Limitations), the lack of support for multi-step schemes is mentioned. It may be useful to add a bit more context here -- how prevalent are such schemes in other GFD codes? Do they have substantial advantages over the included schemes in any ways? Is adding then currently work-in-progress, or is it seen as out-of-scope for SWEET?
3. The code's efficiency is mentioned at several points, but not much concrete performance data is provided. This is perhaps not the main point of the model, but it would still be nice to provide some discussion and data about the code's performance for potential users. Figure 6b provides some wall clock data, but it would be helpful to reframe these measurements for at least one specific run in an interpretable metric (like DOF-iterations per cpu-second) in the discussion in the text.
4. The other notable absence is any mention of GPU implementation. This seems like it may not be too difficult, given that GPU support is now available in SHTns. Of course, this isn't necessary for building new timestepping schemes and studying their accuracy, but it is relevant for comparing the performance of different routines, since memory-vs-compute tradeoffs differ on CPUs vs GPUs. Many geophysical models are now moving to GPU architectures, so even if GPU support is not planned for SWEET, some discussion about this should be added (perhaps to the parallelism section).
Technical corrections:
5. Equation (16) is missing a time differential in the integral.
6. Equation (17) seems like it have a quadrature sum over f(u_m) in place of the integral.
7. Line 423: "low-expensive" -> "low-expense"