-
Notifications
You must be signed in to change notification settings - Fork 0
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
Hybrid indexing (absolute index in K) #64
Comments
Solution proposal:
|
Using explicit function. def stencil(KLCL: IntField):
with computation(PARALLEL), interval(...):
from __externals__ import KM
#v = field[0, 0, K_at(KLCL)] # INVALID
v = field[K_at(KLCL)] # Axis subscript
v = field[K_at(KM)] # Top layer, with KM an external given by NDSL |
Dropping support for |
I was thinking a bit about how this should look like and came up with one other option: def stencil(KLCL: IntField):
with computation(PARALLEL), interval(...):
from __externals__ import KM
v = field.at(K=KLCL) # where KLCL is an integer field
v = field.at(K=0) # Bottom layer
v = field.at(K=KM) # Top layer, with KM an external given by NDSL This is inspired by other languages'
|
I like it. Enrique from CSCS also proposed something like |
Working branch with the |
Part 1 PR: FlorianDeconinck/gt4py#3, PR'ed into |
Logged the mitigation task: #65 |
Syntax is now |
PR up for NDSL to expose the bounds of K: NOAA-GFDL#78 |
Further debug on the
Evap still not generating properly |
Hybrid indexing: I/J remains relative and K is absolute
The pattern to solves are as follows.
Current syntax: #64 (comment)
Working branch: https://github.com/FlorianDeconinck/gt4py/tree/cartesian/feature/absolute_k_indexation
ToDo:
field[K_at[...]]
tofield.at(K=...)
gt:X
&dace:gpu
backendsThe text was updated successfully, but these errors were encountered: