Skip to content

Commit 6b4bbc3

Browse files
committed
small modification for comparison tests
benchmark tests for FP pep8speaks small bug update bug fix add statement that rasters are close Option to have an uMax_Limit Layer as input alpha and umax same for each startcell default fix comment small comment rename variables - camelCase; paths can beread in with customPaths rename variables - camelCase; paths can beread in with customPaths add flag if variable alpha is computed add dynamic exponent shorten part where calculation is executed (independend of forest True/False rename variables, option to provide variable zdeltaLim or umaxLim pep8speaks docu for variable parameter calculation with generations (MN) Add relative comparison (when rasters are close) write message in report file add option/ FLAG to calculate with generations data for benchmark tests with generations docu for generations pep8speaks pep8speaks pep8spekas
1 parent 0aaf7b0 commit 6b4bbc3

45 files changed

Lines changed: 1778 additions & 94 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

avaframe/com4FlowPy/com4FlowPy.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ def com4FlowPyMain(cfgPath, cfgSetup):
6666
modelParameters["varUmaxBool"] = cfgSetup.getboolean("variableUmaxLim")
6767
modelParameters["varAlphaBool"] = cfgSetup.getboolean("variableAlpha")
6868
modelParameters["varExponentBool"] = cfgSetup.getboolean("variableExponent")
69+
modelParameters["calcGeneration"] = cfgSetup.getboolean("calcGeneration")
6970
# modelParameters["infra"] = cfgSetup["infra"]
7071
# modelParameters["forest"] = cfgSetup["forest"]
7172

@@ -243,10 +244,13 @@ def startLogging(modelParameters, forestParams, modelPaths, MPOptions):
243244
log.info("calculation with Infrastructure")
244245
log.info(f"{'INFRA LAYER:' : <14}{'%s'%modelPaths['infraPath'] : <5}")
245246
log.info("------------------------")
246-
for param, value in MPOptions.items():
247-
log.info(f"{'%s:'%param : <20}{value : <5}")
247+
try:
248+
for param, value in MPOptions.items():
249+
log.info(f"{'%s:'%param : <20}{value : <5}")
248250
# log.info("{}:\t{}".format(param,value))
249-
log.info("------------------------")
251+
log.info("------------------------")
252+
except:
253+
log.info("------------------------")
250254
log.info(f"{'WorkDir:' : <12}{'%s'%modelPaths['workDir'] : <5}")
251255
log.info(f"{'ResultsDir:' : <12}{'%s'%modelPaths['resDir'] : <5}")
252256
# log.info("WorkDir: {}".format(modelPaths["workDir"]))

avaframe/com4FlowPy/com4FlowPyCfg.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,13 @@ forestFrictionLayerType = absolute
144144
# NOTE: this currently only works with 'forestFrictionLayer' module!!
145145
skipForestCells = 1
146146

147+
#++++++++++++ Calculate with generations
148+
# If calcGenerations = True, a different order of cells in a path are calculated.
149+
# The results can vary when computing with generations.
150+
# Additionally, the generation (iteration step) can be derived, which is required
151+
# to get thalweg information.
152+
calcGeneration = False
153+
147154
#++++++++++++ Parameters for Tiling
148155
# tileSize: size of tiles in x and y direction in meters (if total size of) x
149156
# or y of input DEM is larger than tileSize, then the input raster

avaframe/com4FlowPy/flowClass.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,10 +347,10 @@ def calc_distribution(self):
347347
row_local, col_local = np.where(self.dist > threshold)
348348

349349
return (
350-
self.rowindex - 1 + row_local,
351-
self.colindex - 1 + col_local,
352-
self.dist[row_local, col_local],
353-
self.z_delta_neighbour[row_local, col_local],
350+
list(self.rowindex - 1 + row_local),
351+
list(self.colindex - 1 + col_local),
352+
list(self.dist[row_local, col_local]),
353+
list(self.z_delta_neighbour[row_local, col_local]),
354354
)
355355

356356
def forest_detrainment(self):

avaframe/com4FlowPy/flowCore.py

Lines changed: 201 additions & 87 deletions
Large diffs are not rendered by default.
371 KB
Binary file not shown.
371 KB
Binary file not shown.
371 KB
Binary file not shown.

avaframe/data/avaArzlerAlm/Inputs/dem10m.asc

Lines changed: 382 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PROJCS["MGI_Austria_GK_West",GEOGCS["GCS_MGI",DATUM["D_MGI",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",-5000000.0],PARAMETER["Central_Meridian",10.3333333333333],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]
Binary file not shown.

0 commit comments

Comments
 (0)