Skip to content

315 veggie effect on mean flow - #316

Open
Leynse wants to merge 84 commits into
mainfrom
315-veggie-effect-on-mean-flow
Open

315 veggie effect on mean flow#316
Leynse wants to merge 84 commits into
mainfrom
315-veggie-effect-on-mean-flow

Conversation

@Leynse

@Leynse Leynse commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

MarliesA and others added 30 commits March 12, 2026 10:47
… with 'snapwave_baldock_exponent', with 0 meaning unused as default.

- can be set to 1 or 2 for more dissipation for steep coasts
- baldock_opt not used anymore I see
… directly in SnapWave

- Made clearer by putting the read functions in new filed 'sfincs_read', and only call those in sfincs_snapwave.f90
- Check further for best ratio later, start at 0.5
…factor_DoverA keywords to sfincs_snapwave

- By default set to 0.25 for both for now
Leynse and others added 20 commits April 14, 2026 13:24
Add the toml-f third-party TOML parser (sources and licenses) and wire it into the build (Makefile.am and Visual Studio .vfproj). Implement TOML-based parsing for src_structure inputs in sfincs_src_structures.f90: new types, constants, read_toml_src_structures routine, validation helpers and a dispatcher in initialize_src_structures() that probes for TOML and falls back to the legacy reader. Also include minor non-functional whitespace/formatting cleanups in sfincs_discharges.f90.
Vegetation parameters can now be specified via a two-file approach:
- The NetCDF file (vegetationfile) stores only an integer vegetation_type
  per grid cell, following CF flag_values / flag_meanings conventions so
  the file is self-documenting in standard tools (ncview, Panoply, xarray).
- A companion TOML file (vegfile_toml) contains the parameter lookup table
  keyed by type name, supporting any number of vertical layers per type
  (mixed layer counts across types are handled by zero-padding).

The old single-NetCDF code path is fully preserved for backward
compatibility; the new path is activated only when vegfile_toml is set
in sfincs.inp.

Changes:
- sfincs_vegetation.f90: add read_vegetation_toml(); rewrite
  initialize_vegetation() with old/new path split; lift 4-layer cap to 64
- sfincs_ncinput.F90: add read_netcdf_quadtree_integer() and
  read_netcdf_flag_meanings() for the new input format
- sfincs_data.f90: add veggiefile_toml, vegetation_type_index; rename
  vegetation_cd -> vegetation_stems_cd and
  vegetation_stems_width -> vegetation_stems_diameter for consistency
- sfincs_input.f90: add vegfile_toml keyword
- snapwave_domain.f90: update to renamed variable names
@Leynse
Leynse marked this pull request as ready for review May 1, 2026 09:15
@Leynse
Leynse requested a review from maartenvanormondt May 1, 2026 09:41
@Leynse Leynse modified the milestone: 2026.02 release May 6, 2026
Removed incorrect division by rhow (water density).

In the veg force formula is multiplied by the water density and in the momentum divided by the water density. These effects cancel each other. After removing division by /rhow, excellent match with DFM.
Base automatically changed from 292-renewed-branch-vegetation-effects-on-short-waves-and-wave-forces to snapwave_domain_updates May 27, 2026 14:24
Base automatically changed from snapwave_domain_updates to 2026.01-Galibier-Release May 27, 2026 14:34
Base automatically changed from 2026.01-Galibier-Release to main June 15, 2026 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Veggie effect on mean flow

4 participants