-
Notifications
You must be signed in to change notification settings - Fork 4
UNST-9434 merge branch sedmor #397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…merge_branch_sedmor
…merge_branch_sedmor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds functionality for storm impact modeling to the main branch, incorporating changes related to sediment transport, wave modeling, dynamic vegetation roughness, and various code quality improvements. The changes span morphology kernels, wave computation modules, sediment transport algorithms, and flow initialization routines.
Key Changes
- Added new alfad50 parameter for Van Rijn transport formulas (forms 19 and 20) to adjust transport based on grain size
- Implemented dynamic vegetation roughness functionality that adjusts friction based on erosion/sedimentation
- Enhanced wave-current interaction calculations and streaming layer physics
- Multiple consistency improvements and bug fixes across sediment transport and wave modules
Reviewed Changes
Copilot reviewed 38 out of 38 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| trab20.f90 | Added alfad50 parameter for grain size-dependent transport scaling |
| trab19.f90 | Added alfad50 parameter and facua conditional logic |
| calseddf1993.f90 | Corrected comment attribution from Van Rijn to Coleman |
| bedtr2004.f90 | Added layer boundary check for aks calculation |
| bedbc2004.f90 | Completed comment for orbital velocity magnitude |
| rdtrafrm.f90 | Updated default parameters and added alfad50 for transport forms 19 and 20 |
| swancom1.F | Added breaker fraction initialization and condition check |
| fm_external_forcings_init.f90 | Fixed format specifiers in error messages |
| setbobs.f90 | Reordered variable initialization for 1D links |
| flow_sedmorinit.f90 | Added dynamic vegetation support and removed wetslope warning |
| flow_flowinit.f90 | Implemented dynamic vegetation polygon processing |
| flow_allocflow.f90 | Allocated arrays for dynamic vegetation tracking |
| wave_comp_stokes_velocities.f90 | Replaced magic number with constant |
| xbeachwaves.f90 | Extensive conversion from 'd0' to '_dp' for consistency, added safety checks |
| xbeach_math_tools.F90 | Added array initialization after allocation |
| setwavfu.f90 | Added wave force factor and removed unused code |
| compute_wave_forcing_rhs.f90 | Moved xbeach_flow_bc call outside kmx check |
| m_fm_bott3d.f90 | Added dynamic vegetation link-based cumulative change tracking |
| fm_fallve.f90 | Added comment about kmx==1 limitation |
| fm_erosed.f90 | Enhanced diffusion parameter handling and fixed kmaxsd reference |
| duneaval.f90 | Added bermslope transport support |
| bermslopenudging.f90 | Simplified fixfac calculation and added wave direction consideration |
| apply_sediment_bc.f90 | Fixed boundary condition array indexing |
| update_verticalprofiles.f90 | Corrected wave turbulence penetration formula and conditional |
| set_kbot_ktop.f90 | Added TODO comment for z-layer morphology |
| getvanrijnwci.f90 | Changed single precision to double precision |
| getustwav.f90 | Refactored streaming layer calculations and removed roller contribution |
| getustbcfuhi.f90 | Enhanced wave velocity profile handling and streaming layer physics |
| furu.f90 | Reordered Stokes drift calculation |
| flow_initimestep.f90 | Added dynamic vegetation update call |
| compute_dynveg.f90 | New module implementing dynamic vegetation roughness updates |
| unstruc_netcdf.f90 | Fixed variable name from 'tp' to 'twav' |
| zlin.f90 | Added precision module import |
| unstruc_model.f90 | Added dynamic vegetation parameters and configuration |
| m_waves.f90 | Added new wave force tuning parameters |
| m_sediment.f90 | Added cumulative erosion tracking and diffusion parameters |
| m_physcoef.f90 | Added dynamic vegetation roughness parameters |
| m_flow.f90 | Added arrays for dynamic vegetation state tracking |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| end if | ||
| ! | ||
| if (alfad50 > 0.0_fp) then | ||
| !uamag = uamag * (0.000225_fp/d50)**alfad50 ! hoe kan een snelheidsasymmetrie fie zijn van korrelgrootte? |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'fie' to 'functie' (function in Dutch).
| !uamag = uamag * (0.000225_fp/d50)**alfad50 ! hoe kan een snelheidsasymmetrie fie zijn van korrelgrootte? | |
| !uamag = uamag * (0.000225_fp/d50)**alfad50 ! hoe kan een snelheidsasymmetrie functie zijn van korrelgrootte? |
| end if | ||
| ! | ||
| if (alfad50 > 0.0_fp) then | ||
| !uamag = uamag * (0.000225_fp/d50)**alfad50 ! hoe kan een snelheidsasymmetrie fie zijn van korrelgrootte? |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'fie' to 'functie' (function in Dutch).
| !uamag = uamag * (0.000225_fp/d50)**alfad50 ! hoe kan een snelheidsasymmetrie fie zijn van korrelgrootte? | |
| !uamag = uamag * (0.000225_fp/d50)**alfad50 ! hoe kan een snelheidsasymmetrie functie zijn van korrelgrootte? |
| integer, save :: lunfil | ||
|
|
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable 'lunfil' is declared with the 'save' attribute but is never used in the visible code. If it's unused, it should be removed to avoid confusion.
| integer, save :: lunfil |
| do L = Lb, Ltop(LL) | ||
| if (hu(L) <= slfacdeltau) then | ||
| htop = min(hu(L), slfacdeltau) ! max height within streaming layer | ||
| alin = 1_dp - htop / slfacdeltau ! linear from 1 at bed to 0 at 3*deltau |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment states 'linear from 1 at bed to 0 at 3*deltau' but the actual calculation uses slfacdeltau, which equals strlyrfac * deltau (default 3.0 * deltau). The comment should reference slfacdeltau for clarity or state the general formula.
| alin = 1_dp - htop / slfacdeltau ! linear from 1 at bed to 0 at 3*deltau | |
| alin = 1_dp - htop / slfacdeltau ! linear from 1 at bed to 0 at slfacdeltau (= strlyrfac * deltau) |
| if (writeall) then | ||
| call prop_set(prop_ptr, 'physics', 'Umodlin', umodlin, 'Linear friction umod, for friction_type=4,5,6') | ||
| end if | ||
| call prop_set(prop_ptr, 'physics', 'DynRoughVeg', dynroughveg, 'Switch for dynamic vegetation rougness. Default 0.') |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'rougness' to 'roughness'.
| call prop_set(prop_ptr, 'physics', 'DynRoughVeg', dynroughveg, 'Switch for dynamic vegetation rougness. Default 0.') | |
| call prop_set(prop_ptr, 'physics', 'DynRoughVeg', dynroughveg, 'Switch for dynamic vegetation roughness. Default 0.') |
What was done
Add various functionality for storm impact modeling to main
Evidence of the work done
<add video/figures if applicable>
Tests
<add testcase numbers if applicable, Issue number>
Documentation
to do: UNST-9452
Issue link