Store information about the halo-size in the allocated Quantity#265
Conversation
romanc
left a comment
There was a problem hiding this comment.
Looking good to me - just a question about naming things, which is - as always - the hardest part 😄 🙈
| computational domain. Defaults to None. | ||
| extent (Sequence[int] | None, optional): number of points along each axis | ||
| within the computational domain. Defaults to None. | ||
| gt4py_backend (str | None, optional): _description_. Defaults to None. |
There was a problem hiding this comment.
Is _description_ a magic docstring feature that I don't know about or did we loose the description of gt4py_backend here?
There was a problem hiding this comment.
bad cleanup, thanks
| gt4py_backend (str | None, optional): _description_. Defaults to None. | ||
| allow_mismatch_float_precision (bool, optional): allow for precision that is | ||
| not the simulation-wide default configuration. Defaults to False. | ||
| number_of_halo_points (int, optional): Number of halo points used. Defaults to 0. |
There was a problem hiding this comment.
I'm not so sure about the name here because it's not really the number of halo points, right? If I put 3, there will be more then 3 halo points. Though not optimal either, I'd stick with what we already have (n_halo) to avoid confusion. Maybe we could do "halo size" instead?
There was a problem hiding this comment.
well, n_halo is just number of halo points, as per
or
NDSL/ndsl/initialization/grid_sizer.py
Line 14 in c180927
or
Line 44 in c180927
There was a problem hiding this comment.
then let's change all of them because they are equally wrong in that sense?
There was a problem hiding this comment.
this is the lingo that is used to describe the halo size. This is not changeable
There was a problem hiding this comment.
Isn't our job here to dare new things and sometimes break with (old) conventions? Like, we tell atmospheric scientists that they can now write code in python(-ish) and that they can have variable names longer than 5 characters?
We even make use of the term "halo size" in our introduction examples when referring to the nhalo argument of the boilerplate functions.
NDSL/examples/NDSL/02_NDSL_basics.ipynb
Line 19 in c180927
| extent: Tuple[int, ...] | ||
| "the shape of the computational domain" | ||
| n_halo: int | ||
| "Number of halo-points used in the horizontal" |
There was a problem hiding this comment.
Maybe "halo size" rather than "halo points"?
Description
In order to have the option to check for correct sizes on data, the information of what halo-size was used to generate the Quantity should be stored with the Quantity.
This is (self-contained) preliminary work to handle #239 properly, as we've seen issues without this information.
How has this been tested?
Just CI-framework.
Checklist