Skip to content

Commit d8538cb

Browse files
making the format consistant for the gt4py kernel
1 parent 582d864 commit d8538cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

swm_python/swm_cartesian.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def calc_uold(
271271
uold: gtscript.Field[dtype]
272272
):
273273
with computation(PARALLEL), interval(...):
274-
uold[...] = u + alpha * (unew - 2 * u + uold)
274+
uold = u + alpha * (unew - 2 * u + uold)
275275

276276
@gtscript.stencil(backend=cartesian_backend)
277277
def calc_vold(
@@ -281,13 +281,13 @@ def calc_vold(
281281
vold: gtscript.Field[dtype]
282282
):
283283
with computation(PARALLEL), interval(...):
284-
vold[...] = v + alpha * (vnew - 2 * v + vold)
284+
vold = v + alpha * (vnew - 2 * v + vold)
285285

286286
time = 0.0
287287
# Main time loop
288288
for ncycle in range(ITMAX):
289289
if((ncycle%100==0) & (VIS==False)):
290-
print("cycle number ", ncycle)
290+
print(f"cycle number{ncycle} and gt4py type {gt4py_type}")
291291
# Calculate cu, cv, z, and h
292292
calc_h(p=p_gt, u=u_gt, v=v_gt, h=h_gt, origin=(0,0,0), domain=(nx,ny,nz))
293293
h = h_gt.asnumpy()

0 commit comments

Comments
 (0)