Articles | Volume 18, issue 21
https://doi.org/10.5194/gmd-18-8175-2025
© Author(s) 2025. This work is distributed under the Creative Commons Attribution 4.0 License.
HOPE: an arbitrary-order non-oscillatory finite-volume shallow water dynamical core with automatic differentiation
Download
- Final revised paper (published on 05 Nov 2025)
- Preprint (discussion started on 27 May 2025)
Interactive discussion
Status: closed
Comment types: AC – author | RC – referee | CC – community | EC – editor | CEC – chief editor
| : Report abuse
-
RC1: 'Comment on egusphere-2025-1889', Anonymous Referee #1, 16 Jun 2025
- AC1: 'Reply on RC1', Lilong Zhou, 21 Jul 2025
- AC2: 'Reply on RC1', Lilong Zhou, 26 Jul 2025
- AC3: 'Reply on RC1 fix error', Lilong Zhou, 31 Jul 2025
-
RC2: 'Comment on egusphere-2025-1889', Anonymous Referee #2, 25 Jun 2025
- AC4: 'Reply on RC2', Lilong Zhou, 31 Jul 2025
- AC5: 'Reply on RC2', Lilong Zhou, 31 Jul 2025
- AC6: 'Reply on RC2', Lilong Zhou, 31 Jul 2025
- AC7: 'Reply on RC2', Lilong Zhou, 31 Jul 2025
Peer review completion
AR: Author's response | RR: Referee report | ED: Editor decision | EF: Editorial file upload
AR by Lilong Zhou on behalf of the Authors (17 Aug 2025)
Author's response
Author's tracked changes
Manuscript
ED: Referee Nomination & Report Request started (23 Aug 2025) by Yongze Song
RR by Anonymous Referee #1 (30 Aug 2025)
RR by Anonymous Referee #2 (01 Sep 2025)
ED: Publish subject to minor revisions (review by editor) (05 Sep 2025) by Yongze Song
AR by Lilong Zhou on behalf of the Authors (11 Sep 2025)
Author's response
Author's tracked changes
Manuscript
ED: Publish subject to minor revisions (review by editor) (15 Sep 2025) by Yongze Song
AR by Lilong Zhou on behalf of the Authors (17 Sep 2025)
Author's response
Author's tracked changes
Manuscript
ED: Publish as is (22 Sep 2025) by Yongze Song
AR by Lilong Zhou on behalf of the Authors (23 Sep 2025)
Summary
The manuscript presents a new framework known as HOPE (High Order Prediction Environment) for the numerical solution of the shallow water equations on a cubed sphere grid. HOPE has several novel or interesting features, including options for very high order numerics, options to use inherently 2D WENO schemes, and an implementation in PyTorch that facilitates running on GPUs and provides automatically differentiability. The PyTorch implementation is timely as it facilitates integration of the model within a machine learning system, a topic that is currently of great interest.
I believe these novel features should eventually be sufficient to justify publication after some revision to clarify the presentation and discussion in the manuscript.
Points related to interpretation and understanding
Line 74. It is important to make sure that you compare like with like. A k'th order 1D finite difference derivative requires (generally) a stencil of k+1 points or cells. In HOPE you mostly discuss reconstructions rather than derivatives; a k'th order reconstruction can be done with a stencil of k cells. But if you take a difference of two reconstructions to compute a derivative then you will have used two different stencils and at least k+1 data points.
High order
Line 224. It is not obvious that negative values of (an element of) \gamma could cause instability. Presumably the elements of R_H must be allowed to be negative, otherwise we would not be able to achieve more than second order? So why should there be such a restriction on \gamma? Please give some discussion or a reference.
At first glance (41) seems to be dimensionally inconsistent, since it mixes derivatives of different orders. It might be good to remind the reader that the computational coordinates x and y have effectively been non-dimensionalized by the grid spacing so that \Delta x = \Delta y = 1. (Thus, (41) is dimensionally correct, after all.) This non-dimensionalization is also appropriate to ensure that the smoothness indicators \beta_i scale with resolution in an appropriate way. What is \epsilon in (39)?
Section 5, general comment (to the whole community, really!): make sure you extract good, useful information from your test cases, not just attractive-looking plots! For example, see the next point, as well as the suggestion below to diagnose dissipation quantitatively.
Some of the test cases in section 5 are run with the high-order reconstruction and some are run with the WENO scheme, and the flow over the mountain case does not say which scheme is used. In an operational model one must make up one's mind which scheme to use, though, in research mode, having different options available allows one to explore sensitivities. It would be valuable for readers if you could share any knowledge and understanding you have gleaned by comparing WENO vs high order on the different test cases. Even if you don't show figures and tables for all combinations, it would be good to comment on any differences. For example, do WENO3 and WENO5 give 3rd order and 5th order convergence for the steady geostrophic flow case? Do high order schemes produce oscillations in the flow over a mountain case? Does WENO3 produce similar solutions to the third order scheme on the Rossby-Haurwitz test case?
Line 407. 'prone to collapse due to factors such as...'. To be clear, the R=4 Rossby-Haurwitz wave is unstable. Those factors, or even roundoff error, can provide a perturbation that initiates the instability, but they are not the fundamental cause of the collapse - that is the instability itself.
Line 491. That test case is actually dominated by Rossby waves, not gravity waves.
Points for discussion; the authors may or may not wish to address these in the manuscript.
Riemann solver
High order
Rossby-Haurwitz wave collapse
Points related to improving the clarity of the explanations
Line 18. '...reduces interpolation to matrix-vector multiplication'. When I first read this I thought it was stating the obvious: interpolation is a linear operation. The significance only became clear when I read section 3.3: even though the panel boundary treatment couples ghost points on the two sides of the boundary, it can be reduced to a straightforward matrix-vector multiplication. Perhaps you can briefly mention this two-way coupling in the abstract.
Abstract line 23. It is unclear why a separate fortran code version is needed for `convergence analysis'. The fortran version is not mentioned in the main text (though the source code is provided).
Line 44. Comment: whether a spectral method conserves mass depends on which variables are chosen to be represented by a spectral expansion. For example, predicting a spectral representation of surface pressure (rather than the more usual log of surface pressure) should conserve mass in a hydrostatic model.
Line 60. At this point it is unclear which Jacobian matrix you mean. Which derivatives are computed automatically? Some more explanation is needed. Similarly on line 320: which gradients can be computed efficiently?
Line 70, also 243. 'does not surpass 7th order'. Please clarify whether you were using the MCORE code or your own implementation of something similar. Also, is this a fundamental limitation of the mathematical formulation or an issue with a particular implementation? It would be good to clarify what is meant by one-sided interpolation. You could avoid ghost points altogether by doing one-sided reconstruction, but I don't think that is what you mean. Do you mean that with one-sided interpolation there is no coupling between ghost points on the two sides of a panel boundary?
Line 71. I can guess what you mean by ghost interpolation scheme, but many readers will need more explanation at this point, or at least a forward reference to where it is discussed in more detail.
Line 84+. The WENO scheme is (or can be) used whenever the model needs to compute a flux. Is that correct? It was not clear to me.
Line 125. It is not yet clear where 'reconstructing' is used in the algorithm, hence this discussion is hard to follow. It would be good to give a brief overview of the method before getting into details. Also, if the reader does not already know what the 'C-property' is then line 125 does not help them. Either explain or omit. It would be worth adding that, although you use \phi_t in the momentum equation, in (13) you still predict \sqrt{G} \phi for mass conservation.
Line 138. It could be worth mentioning that, although LMARS is an approximate Riemann solver, it combines two high-order estimates to obtain the flux, so the result is high order.
Equation (26). A few words of explanation would be helpful. Here we know the \bar{q}_i, since they are predicted by the time stepping, and we wish to determine the coefficients a.
To be clear, do we need a version of the matrix R (31) for every grid cell, or is a single matrix R applicable to all grid cells?
Can you clarify whether the 2D WENO scheme is arbitrary order too, or is the implementation currently limited to 3rd and 5th order?. (The namelist file suggests the latter.)
Lines 225 to 229. This section is confusing: You define \gamma^+ and \gamma^- then jump to expressing q(x,y) in terms of \omega^+ and \omega^-.
Line 238. '...eight panel boundaries...'. Please check!
The scheme for ghost cell interpolation neatly exploits the auto-differentiation capability of PyTorch! What do you do near panel corners? Section 3.3.1: could you please clarify, is the iterative scheme used once at setup to obtain the matrix G, and then matrix multiplication is used subsequently at run time? Presumably there can be lots of zeros in G, since cells near the centre of a panel do not affect any ghost cells; thus, could some compact representation of G be used?
Line 312. Comment: the Wicker-Skamarock RK scheme is 3rd order only for linear problems.
Which scheme was used to produce figure 8? Was it one of the WENO schemes or the arbitrary order (non-WENO) scheme? In either case, what was the order of accuracy? It is encouraging that there are no numerical oscillations in the vorticity or other fields. Is that true for all the schemes discussed, or only for the WENO schemes?
Points related to equations and mathematical notation
Equation (21). r is a dummy subscript in the middle expression; it should not appear in the final expression. Similarly for equation (22).
Line 162-163 does not make sense, since you have not specified any relation between k and n. There are many inconsistencies in notation in this section. n is the number of terms in a polynomial (line 162), then it is the stencil width in the x-direction (23). m is the stencil width in the y-direction (23), then it is equal to n^2 (line 169, 207, 213). k is the width of the stencil (line 163) then a dummy index for coefficients (23). Line 207: the stencil width is now h (but h is not mentioned again). In section 4 the stencil width is s_w.
Inconsistent fonts are used for the matrix \gamma (compare (32) and (35)).
Presumably (36) refers to individual elements of the matrix \gamma, not the entire matrix?
(37) and (38) don't seem to be correct. (38) implies that \sum_i \omega_i^+ = 1 and \sum_i \omega_i^- = 1. However, in order for (37) to be a proper weighted average of the p_i's we would need \sum_i (\omega_i^+ - \omega_i^-) = 1. \omega_i is mentioned in the text, but only \omega_i^+ and \omega_i^- are defined by equations. Should we assume \omega_i = \omega_i^+ - \omega_i^- ? Please check.
Equation (53) seems to be dimensionally inconsistent. Should sign(m) not be abs(m), which would pick out the upwind value of q? See also line 346. Actually, taking careful note of parentheses, the (fortran) source code seems to be correct, but is inconsistent with equation (53).
The notation G is used for the metric (section 2) and also for the matrix to compute ghost cell values (section 3.3.1). Line 262: g should be bold font.
Lines 324 and 327: can I just check that there should be no comma between n_v and n_p, i.e., the first dimension is of size n_v \times n_p? The code (if I understand it correctly) suggests that these arrays are 5-dimensional. Also, comparing lines 327 and 334, n_{poc} seems to be the size of the second (or perhaps third) dimension, not the first.
Points related to phrasing, typos, etc
Line 17, line 53. 'intensive' panel boundary treatment. What is meant by intensive? Perhaps a different word would be better?
Line 34. 'Unlike...' is not a complete sentence. Perhaps the preceding full stop should be a comma?
Line 78. Does 'its' refer to the new ghost interpolation scheme?
Line 92. If I understand correctly, GPU optimization and automatic differentiabilty are two different things; PyTorch happens to provide them both. The sentence as written implies that automatic differentiation is needed for GPU implementation, which I don't think is correct.
Line 133. Can you clarify: Gaussian quadrature along the interface (rather than, say, over some upwind region).
Line 162. The term 'order' is already overloaded. It is not necessary to talk about a k'th-order square stencil. It is enough to say k \times k stencil. See also line 206.
Line 163: n^2 is the number of cells in the stencil ('cell number in the stencil' is ambiguous). Similarly, it is the number of terms in the TPP.
Line 210. The phrase 'determine the unique weights' suggests that (32) can be solved and has a unique solution. As soon becomes clear, (32) is overdetermined and has no exact solution, and only a least squares approximate solution can be found.
Line 227. 'stencil i is smooth ... stencil i is discontinuous...'. Don't you mean the data sampled or reconstructed on stencil i is smooth or discontinuous?
Line 301. 'location, since'. Full stop and a new sentence would be better.
Equation (47). Since Einstein summation is mentioned in various places, perhaps note that there is no summation over i in (47).
Line 310. I cannot find any other mention of H.
Line 318-321. 'Both of these operations are highly optimized for execution on GPUs...' Do you mean highly optimized in the PyTorch implementation? The next sentence seems to be confusing two distinct ideas: (i) PyTorch has built-in commands for convolutions and matrix-vector multiplication, streamlining implementation (without explicit loop commands); (ii) PyTorch offers automatic differentiation, enabling efficient gradient computation.
Line 323. To be clear, n_v prognostic variables per cell.
Line 359: widely?
Line 363. You haven't said what \alpha is, other than a number that is set to zero.
Line 387. The phrase 'we set' makes it seem like you have made your own choice for \lambda_c and \theta_c. But aren't those values the standard ones for this test case?
Line 401. zonal advection -> zonal propagation. (The wave structure is not simply advected in the zonal direction; it propagates through the Rossby wave propagation mechanism.)
Line 404. Please check the units for c.
Line 481. 'handling of anomalous anisotropic characateristics'. I think the problem is that the 1D scheme lacks isotropy, rather than the data.
References: Kochkov et al.; the year should be 2024.