Skip to content

Commit 071b7f8

Browse files
committed
laplacian.py: cleaned up stencil_9pt_numba_test and added comment that the numba stencil with extrapolation into the deep atmosphere is used with radiative BC as it should be (cf. Appendix D of CSK23)
lol, I almost got a heart attack as I thought that I was inadvertently using the old jit-compiled stencil... Phew that this is not the case
1 parent e6894e6 commit 071b7f8

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

RKLM_Python/physics/low_mach/laplacian.py

+1-9
Original file line numberDiff line numberDiff line change
@@ -507,11 +507,7 @@ def stencil_9pt_numba_test(mpv,node,coriolis,diag_inv, ud):
507507

508508
dummy_p = np.zeros((node.isc[1],node.isc[0]))
509509

510-
# coeff_slc = (slice(1,None), slice(1,None))
511-
# coeffs = (hplusx[coeff_slc].T, hplusy[coeff_slc].T, hcenter.T)
512-
# cor_slc = (slice(1,None), slice(1,None))
513-
# coriolis = (coriolis[0][cor_slc],coriolis[1][cor_slc],coriolis[2][cor_slc],coriolis[3][cor_slc])
514-
510+
### Need to clean this up, but the Numba stencil is used in the Helmholtz solve for radiative BC!
515511
if hasattr(ud, 'LAMB_BDRY'):
516512
return lambda p : lap2D_numba_test(p, dummy_p, dx, dy, coeffs, diag_inv.T, coriolis, shp)
517513

@@ -523,12 +519,8 @@ def stencil_9pt_numba_test(mpv,node,coriolis,diag_inv, ud):
523519
y_rayleigh = ud.bdry_type[1] == BdryType.RAYLEIGH
524520

525521
cor_slc = (slice(1,-1), slice(1,-1))
526-
# cor_slc = (slice(0,-2), slice(0,-2))
527522
coeff_slc = (slice(1,-1), slice(1,-1))
528523

529-
# cor_slc = (slice(None,), slice(None,))
530-
# coeff_slc = (slice(None,), slice(None,))
531-
532524
coeffs = (hplusx[coeff_slc].T.reshape(-1,), hplusy[coeff_slc].T.reshape(-1,), hcenter[node.i1].T.reshape(-1,))
533525

534526
coriolis = (coriolis[0][cor_slc].reshape(-1,),coriolis[1][cor_slc].reshape(-1,),coriolis[2][cor_slc].reshape(-1,),coriolis[3][cor_slc].reshape(-1,))

0 commit comments

Comments
 (0)