Skip to content

Commit 8802afa

Browse files
committed
feat(fileHandlerUtils, com1DFA): improve array handling and export configuration
- Added logic in `fileHandlerUtils` to remove zero value from arrays to prevent unnecessary initial time step handling. - Updated `com1DFACfg.ini` to introduce `exportData` option for controlling peak file exports and plot generation.
1 parent 87cc9a7 commit 8802afa

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

avaframe/com1DFA/com1DFACfg.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,9 @@ unitpfv = ms-1
541541

542542

543543
[EXPORTS]
544+
# peak files and plots are exported, option to turn off exports when exportData is set to False
545+
# this affects export of peak files and also generation of peak file plots
546+
exportData = True
544547
# export release and optional entrainment raster files derived from shp files saved to Outputs/com1DFA/internalRasters
545548
exportRasters = False
546549

avaframe/in3Utils/fileHandlerUtils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,9 @@ def splitTimeValueToArrayInterval(cfgValues, endTime):
384384
items = np.array(itemsL, dtype=float)
385385
items = np.sort(items)
386386

387+
# make sure that 0 is not in the array (initial time step is any ways saved)
388+
if items[0] == 0:
389+
items = np.delete(items, 0)
387390
# make sure the array is not empty
388391
# ToDo : make it work without this arbitrary 2*timeEnd
389392
if items.size == 0:

0 commit comments

Comments
 (0)