aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmakeBoundary.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/makeBoundary.py b/makeBoundary.py
index 3e2ebd0..0f98c91 100755
--- a/makeBoundary.py
+++ b/makeBoundary.py
@@ -136,16 +136,12 @@ numH = definition_dict["numH"] # number of height intervals
with open(height_data, "r") as topo:
xtp, ytp, ztp = np.loadtxt(topo, delimiter=' ', unpack=True)
-# domain extent in x-direction:
-xmax = (xtp[0]+xtp[-1])
-# domain extent in y-direction:
-ymax = (ytp[0]+ytp[-1])
-# number of cells in x-direction:
-ncols = int(math.sqrt(len(xtp)*xmax/ymax))
-# number of cells in y-direction:
-nrows = int(len(xtp)/ncols)
-# cell size
-dX = xmax/ncols
+
+xmax = (xtp[0]+xtp[-1]) # domain extent in x-direction
+ymax = (ytp[0]+ytp[-1]) # domain extent in y-direction
+ncols = int(math.sqrt(len(xtp)*xmax/ymax)) # number of cells in x-direction
+nrows = int(len(xtp)/ncols) # number of cells in y-direction
+dX = xmax/ncols # cell size
print('dX =', dX)
#print(ncols, nrows)