com4FlowPy.com4FlowPy
com4FlowPy main function mainly handling input of data, model params and output of model results
Functions
function checks if release area is a .shp file and tries to convert to tif in that case |
|
check if all input layers have the same size and can be read from the provided paths |
|
check if the input parameters alpha, uMaxLimit/ zDeltaMaxLimit, exponent are within a physically sensible range |
|
com4FlowPy main function performs the model run and writes results to disk: |
|
define not affected cells as -9999 |
|
delete tempFolder containing the pickled np.arrays of the input data and output data tiles. should be called after all merged model results are written to disk. performs a few checks to make sure the folder is indeed a com4FlowPy tempFolder, i.e. - does not contain subfolders - no other file-extensions than '.npy' and ''. |
|
function handles merging of results for all tiles inside the temp Folder and also writing result files to the resultDir |
|
wrapper around fc.run() handles passing of model paths, configurations to fc.run() also responsible for processing input-data tiles in sequence |
|
performs logging at the start of the simulation |
|
computes the number of tiles (_tileCols, _tileRows) and tileOverlap (_U) based on input layer dimensions and tilingParameters, divides all used input layers into tiles and saves the tiles to the temp folder |