aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Garlick <pgarlick@tourbillion-technology.com>2019-10-09 15:11:13 +0100
committerPaul Garlick <pgarlick@tourbillion-technology.com>2019-10-09 15:11:13 +0100
commit2e7d60929797ccc6e07b371b0e4c24e9bb6a1cc6 (patch)
treeb2c28d88395c8aa13061077aa2c237993c05a647
parent480ee33810139b32d4c7373503ba96dd22227032 (diff)
downloadfullSWOF-utils-2e7d60929797ccc6e07b371b0e4c24e9bb6a1cc6.tar.gz
define arrays for boundary co-ordinates and heights.
-rwxr-xr-xmakeBoundary.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/makeBoundary.py b/makeBoundary.py
index 3876e1e..730f96d 100755
--- a/makeBoundary.py
+++ b/makeBoundary.py
@@ -54,6 +54,28 @@ print('dX =', dX)
#print(ncols, nrows)
+# extract slices from height data array. Note: xyz format uses ncols
+# blocks, with nrows lines per block.
+if location == 'top':
+ xin = xtp[nrows-1:len(xtp):nrows]
+ yin = ytp[nrows-1:len(xtp):nrows]
+ zin = ztp[nrows-1:len(xtp):nrows]
+elif location == 'bottom':
+ xin = xtp[0:len(xtp):nrows]
+ yin = ytp[0:len(xtp):nrows]
+ zin = ztp[0:len(xtp):nrows]
+elif location == 'left':
+ xin = xtp[:nrows]
+ yin = ytp[:nrows]
+ zin = ztp[:nrows]
+elif location == 'right':
+ xin = xtp[nrows*(ncols-1):]
+ yin = ytp[nrows*(ncols-1):]
+ zin = ztp[nrows*(ncols-1):]
+
+
+print(xin)
+
# array index and co-ordinates are related by:
# index = (co-ord - 0.25)*2
xregion = xin[280:301]