From 6c213c3ccff0effbe36b655782a2b6e7b9e6f907 Mon Sep 17 00:00:00 2001 From: Paul Garlick Date: Fri, 10 Jul 2020 10:02:03 +0100 Subject: python: slope.py: Use cell size in index definition. * python/slope.py (dzdy): Update note. --- python/slope.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/slope.py b/python/slope.py index 29d967e..03839e5 100755 --- a/python/slope.py +++ b/python/slope.py @@ -62,8 +62,8 @@ dzdy = np.zeros((NYCELL, NXCELL)) for i in range(1, NYCELL + 1): for j in range(1, NXCELL + 1): dzdy[i-1, j-1] = (z3[i+1, j] - z3[i-1, j])/(2.0*DY) -# array index and co-ordinates are related by: -# index = (co-ord - 0.25)*2 +# Note: dz/dy index and co-ordinates are related by: +# index = int(co-ord/DX - 0.5) #print("dzdy", dzdy[NYCELL-1, 280:301]) #print("elev", elev[NYCELL-1, 280:301]) -- cgit