aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Garlick <pgarlick@tourbillion-technology.com>2020-07-10 10:02:03 +0100
committerPaul Garlick <pgarlick@tourbillion-technology.com>2020-07-10 10:02:03 +0100
commit6c213c3ccff0effbe36b655782a2b6e7b9e6f907 (patch)
tree607ebbbd912454c487bb1051bcdd4760d742e921
parent897c7faa826ac0bdc8fca0f6ba649dfba527e0d5 (diff)
downloadfullSWOF-utils-6c213c3ccff0effbe36b655782a2b6e7b9e6f907.tar.gz
python: slope.py: Use cell size in index definition.
* python/slope.py (dzdy): Update note.
-rwxr-xr-xpython/slope.py4
1 files 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])