[com1;com8;com9;in1;in2;in3] Read from raster#1193
Merged
Conversation
check that also with remeshed files it works
- add check for nan and neg values in rater input files = add option auto
Updated variable names in test files and configuration files from `FromShp` to `FromFile` comments to reflect the change. refactor(com9MoTVoellmy): switch from thFromShp to thFromFile; update tau variable naming - Updated string delimiters from single to double quotes for consistency. - Changed `tau0` references to `tauC` throughout for naming consistency. - Added a new method `setVariableEntrainmentParameters` for handling entrainment parameters dynamically. - Modified and extended related test cases to reflect updates. - Updated configuration to set default entrainment to `auto` and clarified `meshCellSize` behavior. - Updated Linux executable refactor(motUtils): remove unused `entitydefs` import refactor(all): update bed strength profile and thickness flag naming - Changed `Bed strength profile` value from `global` to `constant` in configurations. - Updated thickness flag naming from `FromShp` to `FromFile` - Adjusted related configuration and code references to align with these changes. refactor(com1DFA): remove `relThFromFile` flag and related references - Removed the `relThFromFile` flag from configurations and test files. - Adjusted code, comments, and related test cases to align with the removal. - Introduced new test data `testRel2.asc` and updated file references for consistency. - Removed unused or redundant lines in test files. refactor(com9MoTVoellmy): dynamically handle forest parameter files - Added `setVariableForestParameters` function to manage `nd` and `bhd` parameter files and update configuration accordingly. - Modified `getInput.py` to check for presence and remeshing status of forest parameter files. - Updated `com9MoTVoellmy` logic to handle `FOREST_EFFECTS` value dynamically, including `auto`, `yes`, and `no` states. - Changed default value of `FOREST_EFFECTS` in `com9MoTVoellmyCfg.ini` to `auto`. - Commented out unused dependencies (`gdal`, `geos`, and `proj`) in `pyproject.toml`. feat(com9MoTVoellmy): add simulation type override functionality - Introduced `simType` parameter to `runCom9MoTVoellmy` for overriding simulation type. - Updated command-line interface to accept `--sim_type` with defined options (`null`, `ent`, `res`, `entres`, `available`). - Modified `MoTUtils` to set default `Entrainment` to `none` when conditions are not met. - Improved logging to capture simulation type overrides. - Refined handling of forest effect parameters to ensure correct field extent. refactor(motUtils): moved forest nd to RES dir - Updated `pyproject.toml` to restrict Python version to `<3.14`. feat(com9MoTVoellmy): add functionality to copy timestep directories - Introduced `copyMoTDirs` function to handle the copying of specific timestep directories (`s`, `h`) from the work directory to the output directory. - Updated `com9MoTVoellmy` workflow to utilize `copyMoTDirs` for organizing timestep outputs in a structured format under a `timesteps` subfolder.
… exe refactor(all): Updated Pytest to reflect recent refactoring and handle unsupported `iniStep` scenario gracefully. - Updated configuration and test files to replace `thFromShp` flag with `thFromFile`. - Removed redundant code, comments, and unused flags across `com1DFA`, `ana4Stats`, and related test files. - Added error checks for invalid configurations involving raster inputs and thickness values. - Disabled unsupported `iniStep=True` and added appropriate error/warning messages in `com1DFA`. - Standardized string delimiters and improved readability in test functions. refactor(in1Data, out3Plot, tests): remove redundant checks and imports - Replaced `!= None` with `is not None` in `getInput.py` and `test_getInput.py` for better readability. - Removed unused imports from `outCom1DFA.py`, - Improved minor formatting issues in test assertions. refactor(pyproject): uncomment Python version restriction to `<3.14` test(tests): add comprehensive tests for `deriveLineRaster` and `MoTUtils` - Added unit tests for the `deriveLineRaster` function to handle various scenarios, including invalid raster types, zero raster creation, different file extensions, and inputs from shapefiles or existing rasters. - Expanded `MoTUtils` tests to cover the copying of files/directories (`copyMoTDirs`) and dynamic setting of friction, entrainment, and forest parameters based on input files and configurations. - Introduced new test cases for platform-specific behavior and logging in the `com9MoTVoellmy` module. refactor(all): reformat and improve code readability - Reformatted long lines across multiple files, including `test_ascUtils.py`, `outPlotAllPeak.py`, `deriveParameterSet.py`, and `test_com9MoTVoellmy.py`, for better readability and adherence to code style guidelines. - Replaced backslashes in `with` statements with parentheses to align with modern Python practices. - Removed unnecessary blank lines and optimized formatting in test modules and main scripts. refactor(tests, in1Data): reformat files and fix wrong pytest data path - Reformatted long lines and applied parentheses for better readability in `test_ascUtils.py`, `test_com9MoTVoellmy.py`, and `getInput.py`. feat(data): readd input files for avaSimilarity solution chore(config): add `*/out3Plot/*` to coverage omit list test(getInput): add tests for `initializeRelTh` to cover various scenarios - Added tests to validate `initializeRelTh` functionality: - Loading valid release thickness raster files. - Handling dimension mismatches between DEM and `relThFile`. - Detecting NaN values in `relThFile`. - Handling cases with empty configuration for the release thickness file. - Enhanced test coverage to improve robustness and catch configuration-driven edge cases. test(getInput/MoTUtils): add pytest refactor(com9MoTVoellmy): update configuration parameters and default values - Values based on a mix of existing rcf examples in the MoTVoellmy repository
… input file is of type .asc or .tif
awirb
commented
Nov 6, 2025
awirb
commented
Nov 7, 2025
fc3ab43 to
c6f7051
Compare
fso42
approved these changes
Nov 11, 2025
Contributor
|
Standardtest ok APART from avaInclinedPlaneEntresTest. Aparently this one got forgotten in the last update of benchmarks (due to res) see #1208 |
…er from configuration file Remove `avaHelixChannelWetSnowTest` descriptor JSON file fix color ordering in aimec plots for relTh from file or from ini refactor(com1,com9): improve file handling and comments in MoT modules - Updated comments in `MoTUtils.py`, `com9MoTVoellmy.py`, and `com1DFA.py` for clarity and consistency, particularly regarding file input types (`shapefile`, `raster`). - Improved configuration files (`com1DFACfg.ini` and `com9MoTVoellmyCfg.ini`) to clarify parameter usage and handle raster inputs.
62ae94a to
a7f6c2f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow reading input data from raster without any additional shapefile
Todos see: #1201
Notes:
When using raster files:
getThicknessValue returns early for raster files)
Maybe fixes #1110