-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Substepping outside dycore, refactor grid_wrapper, add mean_cell_area and vol_flx_ic #683
Conversation
model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/solve_nonhydro.py
Show resolved
Hide resolved
cscs-ci run default |
model/atmosphere/dycore/tests/dycore_tests/test_solve_nonhydro.py
Outdated
Show resolved
Hide resolved
vertical_end=gtx.int32(self._vertical_params.nflat_gradp + 1), | ||
offset_provider=self._grid.offset_providers, | ||
) | ||
if self._vertical_params.nflatlev < gtx.int32(self._vertical_params.nflat_gradp + 1): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can it happen that nflatlev>= nflat_gradp + 1
? Shouldn't the condition rather be checked when computing these values at initialization? The other questions is does gt4py crash for a "negative" or "empty" domain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it crashed for an empty domain. We should probably fix that on the GT4Py side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I would suggest so. Anyway, we can leave this as a workaround for now. Can you open an issue in GT4Py?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a second thought, I am not sure if it should be legal, because that could also hide user errors. At least GT4Py should warn that it doesn't execute a program. Here is the issue GridTools/gt4py#1891
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I agree it could hide errors, but there are valid cases for it: for example if you run something like APE every layer is flat, so if you try to compute something from some layer up to the first flat layer, that might collapse (what probably happens in the example here) or in the horizontal if you compute something only on the boundaries, but you have a global model, then there are no boundaries. The user would then have to always do an extra
if domain-is-not-empty
check what the if condition above essentially is.
@@ -256,6 +245,7 @@ def test_dycore_wrapper_granule_inputs( | |||
|
|||
# PrepAdvection | |||
vn_traj = sp.vn_traj() | |||
vol_flx_ic = data_alloc.zero_field(icon_grid, dims.CellDim, dims.KDim) # TODO sp.vol_flx_ic() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, you wanted the vol_flx_ic
in the init savepoint? I think I only added it to the exit... shame on me...
cscs-ci run default |
cscs-ci run default |
cscs-ci run default |
Mandatory Tests Please make sure you run these tests via comment before you merge!
Optional Tests To run benchmarks you can use:
To run tests and benchmarks with the DaCe backend you can use:
In case your change might affect downstream icon-exclaim, please consider running
For more detailed information please look at CI in the EXCLAIM universe. |
tests passed in #687 |
Model:
Fortran wrappers:
max_nudge_coeff
to indicate it's the ICON scaled one that is passed to the bindings