Pr 308 restructured#317
Open
maartenvanormondt wants to merge 5 commits into
Open
Conversation
Introduce a new sfincs_buildings module to model building drainage: collects rainfall on building footprints, creates thin dams along edges, optionally stores detention volume, and distributes runoff to perimeter or gutter outlet cells. Added building data and input options (bldfile, bprfile) to sfincs_data and sfincs_input, updated build scripts (Makefile.am and vfproj) to include the new source, and integrated setup and per-timestep update calls (setup_buildings, update_buildings) into sfincs_lib. The module provides routines for reading building and property files, identifying interior/perimeter/gutter cells, creating thin dams via quadtree intersections, accumulating rainfall, and redistributing water each timestep.
Replace direct write(*) calls in source/src/sfincs_buildings.f90 with calls to write_log by adding "use sfincs_log" and routing informational, warning and error messages through the logging API. Dynamic messages are formatted into a local log string (logstr) before being passed to write_log. This centralizes output handling for the buildings module and preserves existing message content/severity while decoupling from direct stdout writes.
Contributor
Author
|
I tested compilation (no issues with Visual Studio and ifx) and running of IMDC's test model (results seemed physically realistic and identical to animation they provided). These updates should not break anything in any of the tests. I tried to keep the IMDCs building code as separate as possible. I suggest we start doing this with some other features as well. |
Draft
- Both zs and dh are already real*8; the intermediate cast was discarding 7 digits. - Added documentation
- To discuss, is meters or m3 more useful?
Collaborator
|
Please send example model for testbed |
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.
This pull request introduces support for handling buildings within the SFINCS model. The changes add new input options for specifying building files and integrate logic to set up and update building-related structures and parameters during the simulation lifecycle.
Building support integration:
sfincs_buildings.f90to the project and build system, and included it in the source list (sfincs_lib.vfproj,Makefile.am). [1] [2]sfincs_datamodule to include new variables for building support:has_buildings,bldfile, andbprfile.sfincs_input.f90to read new parametersbldfileandbprfile, and sethas_buildingsaccordingly.Simulation lifecycle integration:
sfincs_lib.f90to use the newsfincs_buildingsmodule and callsetup_buildings()during initialization if buildings are present. [1] [2]update_buildings()each timestep to handle rainfall accumulation and redistribution for buildings.