diff options
author | Paul Garlick <pgarlick@tourbillion-technology.com> | 2019-10-09 15:11:13 +0100 |
---|---|---|
committer | Paul Garlick <pgarlick@tourbillion-technology.com> | 2019-10-09 15:11:13 +0100 |
commit | 2e7d60929797ccc6e07b371b0e4c24e9bb6a1cc6 (patch) | |
tree | b2c28d88395c8aa13061077aa2c237993c05a647 | |
parent | 480ee33810139b32d4c7373503ba96dd22227032 (diff) | |
download | fullSWOF-utils-2e7d60929797ccc6e07b371b0e4c24e9bb6a1cc6.tar.gz |
define arrays for boundary co-ordinates and heights.
-rwxr-xr-x | makeBoundary.py | 22 |
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] |