From 2e7d60929797ccc6e07b371b0e4c24e9bb6a1cc6 Mon Sep 17 00:00:00 2001 From: Paul Garlick Date: Wed, 9 Oct 2019 15:11:13 +0100 Subject: define arrays for boundary co-ordinates and heights. --- makeBoundary.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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] -- cgit