Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
fa8cd8f
- Add option where IG source term uses mean wave energy Eprev_ig in s…
Leynse Feb 12, 2026
3713e3b
- Also add a 4th option where dSxx/dx is based on the mean incident w…
Leynse Feb 12, 2026
6d021b7
- Start igopt5 with addition to limit srcig around incident wave brea…
Leynse Feb 25, 2026
3339c8b
- Try lower beta5 (/only in shallow water part)
Leynse Feb 25, 2026
d9b5b4c
- Fix Hmx vs Hmx_ig inconsistency in SnapWave code, as found by Maarten
Leynse Feb 25, 2026
ab2767d
- Add option 6 where there is no energy transfer anymore after incide…
Leynse Feb 26, 2026
dab2264
- Add igopt 7 where srcig is multiplied by (-Qb), similar to Reniers&…
Leynse Feb 27, 2026
0617660
- igopt 8 option that is same as 6, but with changing cg_ig to sqrt(g…
Leynse Feb 27, 2026
6113058
- Add percentage of breaking waves qb to his output
Leynse Feb 27, 2026
c9bc56f
- Add cg_ig to netcdf his output for testing igopt=8 where after brea…
Leynse Feb 28, 2026
1db5716
- Add ig_opt = 9 with bound/free wave criterion based on Hm0,inc / h …
Leynse Feb 28, 2026
9b1fa7e
- Seems more robust as fraction of gamma, 2/3 seems to work quite wel…
Leynse Feb 28, 2026
c942b81
- Also set cg_ig to sqrt(g*h) after breaking for ig_opt 9
Leynse Mar 2, 2026
86c7a17
- Add igopt 10 with first version SxxoverE
Leynse Mar 3, 2026
ba99dcb
- Add igopt 11 with better rewritten code for determining srcig based…
Leynse Mar 3, 2026
9773193
- first version moving srcig term over from 'R' to 'B', for igopt=11
Leynse Mar 3, 2026
5ad4779
- Not fully working yet, so end now by last working step of having sr…
Leynse Mar 3, 2026
8759ada
- Add again suggestion of calculation beta in shorter way, to test
Leynse Mar 3, 2026
9c4ff32
- Latest version for ig_opt 12 wth srcif in B-term
Leynse Mar 3, 2026
498fa38
- Make ig_opt 11 default for now
Leynse Mar 3, 2026
962cbf2
- Commit comment of Maarten - to be checked later
Leynse Mar 6, 2026
bf406b6
- Change default snapwave_gammaig to 0.7
Leynse Mar 9, 2026
5aedb82
- Add variable 'snapwave_gamma_fac_br' instead of the fixed 2.0/3.0 v…
Leynse Mar 9, 2026
4894a9a
- For instance in shadow zone of Boers tests, changing the cg_ig did …
Leynse Mar 9, 2026
937c206
- bump date
Leynse Mar 9, 2026
5a95122
- Big cleanup
Leynse Mar 9, 2026
a1ede23
- Rename subroutine to original name of 'determine_infragravity_sourc…
Leynse Mar 9, 2026
2971fdd
- Fix change indexing
Leynse Mar 9, 2026
2519daf
- Actually set default to 1 again
Leynse Mar 9, 2026
533fe33
- Add a smooth transition function as suggested by Maarten. Now there…
Leynse Mar 10, 2026
a475787
merged veggie shortwave drag branch143 into current main
MarliesA Mar 12, 2026
683b73d
added missing vfproj update
MarliesA Mar 12, 2026
85fd766
some refactoring of snapwave solver
maartenvanormondt Mar 14, 2026
3e6e51c
minor stuff
maartenvanormondt Mar 14, 2026
7cd84e3
deleted snapwave_solver.f90.ori
maartenvanormondt Mar 16, 2026
4648636
- Redo ig_opt 12 to be same as ig_opt 1 (current best default), with …
Leynse Mar 16, 2026
53ecdfc
- Add ig_opt 13, where based on beta_local, snapwave_gamma_fac_br is …
Leynse Mar 16, 2026
7b643b9
- Better result for 1:20 slope if beta_limit_2 = 0.005
Leynse Mar 16, 2026
616c589
Merge branch '281-add-version-of-ig-source-term-where-dsxxdx-does-not…
Leynse Mar 16, 2026
d314a94
Merge branch '292-renewed-branch-vegetation-effects-on-short-waves-an…
Leynse Mar 16, 2026
8712589
- Bump version
Leynse Mar 17, 2026
c3f14f7
- First step to making mean flow correct on the uv points
Leynse Mar 17, 2026
e702a53
- Make exponent for multiplying for extra dissipation user defineable…
Leynse Mar 24, 2026
54075ab
- Bump version for clarity
Leynse Mar 24, 2026
989af68
- clean repo
Leynse Mar 24, 2026
fba786c
- clean repo
Leynse Mar 24, 2026
328a46a
- As done in PR of jre/snapwave_sfincs, use the SFINCS input routines…
Leynse Mar 25, 2026
2227188
- Also in sfincs_spiderweb.f90 replace local read_real_input and read…
Leynse Mar 25, 2026
6b006a3
- add posibility to inspect snapwave grid as in PR jre/snapwave_sfincs
Leynse Mar 25, 2026
50b75da
- restart already fixed to true in sfincs_snapwave
Leynse Mar 25, 2026
fe0f275
- Remove unused subroutine 'neuboundaries' that is replaced by neubou…
Leynse Mar 25, 2026
79804e0
- Add back some description
Leynse Mar 25, 2026
cab2d6e
- Bugfix, actually update Hk so it is used in IG bottom friction dete…
Leynse Mar 25, 2026
fe4d760
- Preprocess snapwave_ncoutput
Leynse Mar 25, 2026
3061713
Merge branch 'main' into snapwave_domain_updates
Leynse Mar 25, 2026
3811c90
- Comment
Leynse Mar 25, 2026
67e8144
- Commit merge main into branch
Leynse Mar 25, 2026
d2a20c3
- Keep snapwave_crit= 0.001 as default as in main
Leynse Mar 25, 2026
b89c802
- make (:,k) to (:, k) consistently, everywhere I hope
Leynse Mar 25, 2026
2c3a75f
- Try adding back missing stuff
Leynse Mar 25, 2026
b6f5338
tmp
maartenvanormondt Mar 26, 2026
1782de6
tmp
maartenvanormondt Mar 26, 2026
40e4a34
making it work for wind
maartenvanormondt Mar 27, 2026
ef31070
removed second call to celerities
maartenvanormondt Mar 31, 2026
2934b8e
- Bump version for clarity when testing
Leynse Mar 31, 2026
fdd1ad7
- Remove references to ig_opt 20+ in main solver
Leynse Apr 1, 2026
596e42d
- Remove cg_ig adjustment option
Leynse Apr 1, 2026
3f83248
- Added subroutine 'estimate_shoaling_parameter_alphaig_steep_slopes'…
Leynse Apr 1, 2026
61c890c
- Add back an option 11 that does have the beta lim, but no srcig to …
Leynse Apr 1, 2026
deb83be
- Make the 5 steep_fac options user defineable, with defaults as hard…
Leynse Apr 1, 2026
e6aaaeb
Merge branch '281-add-version-of-ig-source-term-where-dsxxdx-does-not…
Leynse Apr 2, 2026
7b6f0a5
Merge branch 'snapwave_domain_updates' of https://github.com/Deltares…
Leynse Apr 2, 2026
80365f0
- Fix
Leynse Apr 2, 2026
9d1ad92
- Make Herbers IG boundary warning dimensionless, using hsinc / depth
Leynse Apr 2, 2026
d13e33b
- Add user definable snapwave_relax_factor_DoverE and snapwave_relax_…
Leynse Apr 2, 2026
12bce8f
- For now do simple Hmx(k) = gamma * depth(k) and IG as in trunk, TBD
Leynse Apr 2, 2026
2b9c7e2
- As discussed, remove fdrspr for now. Could be added back later on (…
Leynse Apr 2, 2026
6f41285
- Add back comment
Leynse Apr 2, 2026
0815e57
- Remove subroutine bj78
Leynse Apr 2, 2026
ea6bcf5
- Added calculation and write_log message of error_ig and %ok_ig with…
Leynse Apr 2, 2026
653b2c2
- Add omp parallellisation
Leynse Apr 2, 2026
7e50bdf
- Already do the bugfix of PR #283 by switching to srcig based on E a…
Leynse Apr 2, 2026
68b79a2
Merge branch 'snapwave_domain_updates' of https://github.com/Deltares…
Leynse Apr 2, 2026
d3bebd5
- Remove double cgprev
Leynse Apr 2, 2026
9d1b5b8
- Add back Neumann message
Leynse Apr 2, 2026
bbcd4a5
Merge branch 'main' of https://github.com/Deltares/SFINCS into snapwa…
Leynse Apr 3, 2026
dfd7a05
Merge branch 'snapwave_domain_updates' of https://github.com/Deltares…
Leynse Apr 3, 2026
d9989ba
- Bump version for clarity
Leynse Apr 3, 2026
e2103c2
- Clean up this PR, so that only the pure snapwave veggie changes rem…
Leynse Apr 10, 2026
7a93b8c
- Cleanup and switch to logicals
Leynse Apr 10, 2026
be6f771
- Start of sfincs_vegetation
Leynse Apr 10, 2026
bf1ff20
- Only for quadtree
Leynse Apr 10, 2026
e4f0320
Merge branch 'main' of https://github.com/Deltares/SFINCS into 292-re…
Leynse Apr 10, 2026
9820d7b
- Move veggie reference out of sfincs_quadtree
Leynse Apr 10, 2026
0e68552
- Add new generic subroutine 'read_netcdf_quadtree_get_dimension'
Leynse Apr 10, 2026
6ffdb26
- Neat way to import only needed veggie variables from sfincs_data in…
Leynse Apr 10, 2026
6064edb
- Cleanup code
Leynse Apr 10, 2026
bd61678
Merge branch 'snapwave_domain_updates' of https://github.com/Deltares…
Leynse Apr 10, 2026
2ef01e5
- Manual merge back swvegnonlin, momeqveg, update F(k)
Leynse Apr 10, 2026
4ac54a6
Merge branch 'main' of https://github.com/Deltares/SFINCS into snapwa…
Leynse Apr 10, 2026
40deeae
- For now limit vegetation_vertical_segments to max 4
Leynse Apr 10, 2026
942d71d
- move check from sfincs_snapwave to wavemaker (not veggie related), …
Leynse Apr 10, 2026
ee097c9
Delete source/src/snapwave/RFveg.inc
Leynse Apr 10, 2026
96b4271
Delete source/src/snapwave/snapwave_RFtable.f90
Leynse Apr 10, 2026
02b727f
Merge branch 'snapwave_domain_updates' into 292-renewed-branch-vegeta…
Leynse Apr 10, 2026
ccc47ee
Merge branch '292-renewed-branch-vegetation-effects-on-short-waves-an…
Leynse Apr 10, 2026
c8a4477
- Add back changes in momentum & data
Leynse Apr 10, 2026
8916cc7
- Pre-calculate vegetation_stems_height already on uv points (only do…
Leynse Apr 10, 2026
488ada8
- In theory could work now for multiple layers in the vertical
Leynse Apr 10, 2026
e26fff5
- Last changes
Leynse Apr 10, 2026
4f76a35
Merge branch 'main' of https://github.com/Deltares/SFINCS into 301-al…
Leynse Apr 13, 2026
baad37a
- Add input variable 'snapwave_waveforces_ratio' which you can set to…
Leynse Apr 13, 2026
a15f0c0
Merge branch '318-add-factor-to-wave-forces' of https://github.com/De…
Leynse Apr 13, 2026
aad2550
- Calculate per layer now, commit before refactor
Leynse Apr 14, 2026
02f3480
- Start pre-calculating vegetation effects on streamflow in pre-compu…
Leynse Apr 14, 2026
0a76557
- Double check wet averaged vs grid averaged properties
Leynse Apr 14, 2026
f7c0c84
- Add netcdf output of the veggie variables (change names later)
Leynse Apr 14, 2026
7834847
- Update names
Leynse Apr 14, 2026
ca7446c
- Add code documentation
Leynse Apr 14, 2026
7bcc2fc
- Add implementation figure
Leynse Apr 14, 2026
86f1ffa
- Add fixme note
Leynse Apr 14, 2026
da3533b
- Update last name
Leynse Apr 14, 2026
0d6e39a
- Bugfix in calculating kwav_ig!
Leynse Apr 15, 2026
a5e6dbe
- Suggestion of Marlies to keep the original formulation for Hmx_ig
Leynse Apr 15, 2026
9f75711
- Bump version
Leynse Apr 22, 2026
76d3709
- Change to hwet
Leynse Apr 22, 2026
da136a1
Merge branch '292-renewed-branch-vegetation-effects-on-short-waves-an…
Leynse Apr 22, 2026
466986b
Merge branch '315-veggie-effect-on-mean-flow' of https://github.com/D…
Leynse Apr 22, 2026
0181d45
- Bump version
Leynse Apr 22, 2026
f9c9b9f
Reinit Tp for inner/Neumann; ignore docs/_build
maartenvanormondt Apr 29, 2026
fb0c6e8
- Add gamma_fac_br as in PR #281
Leynse Apr 29, 2026
d696902
- issue for Buckley solved if no limiter at all
Leynse May 6, 2026
a6a4da1
- Temp save, need to still make it work here/in sfincs_snapwave
Leynse May 6, 2026
4884c36
- Option to determine fwmaxfac once every 'update_wave_field' call in…
Leynse May 8, 2026
bc4adb0
Merge branch '331-adapt-wave-force-limiter-for-lab-tests' of https://…
Leynse May 19, 2026
61c04d0
- bump date
Leynse May 20, 2026
5cd02d1
336 direction dependent wavemaker issue (#337)
Leynse May 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,12 @@ source/third_party_open/netcdf/x64
source/sfincs/sfincs.opt.yaml
/source/sfincs_lib/*.yaml
/source/third_party_open/netcdf/netcdf-fortran-4.6.1/Debug
/docs/_build
/source/build_nvfortran_gpu_h7.sh
/source/build_nvfortran_gpu.sh
/source/Singularityfile-gpu.def
/source/Dockerfile.xpu
/source/Dockerfile.gpu.test
/source/Dockerfile.gpu.update01
/source/Dockerfile.gpu
/source/Dockerfile.gpu.25.5.ccall
Binary file added source/code_docs/vegetation_lookup_figure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
151 changes: 151 additions & 0 deletions source/code_docs/vegetation_lookup_figure.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
"""
Visualisation of SFINCS vegetation drag lookup table concept.
Run with: python vegetation_lookup_figure.py
"""

import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
from matplotlib.gridspec import GridSpec

# --------------------------------------------------------------------------
# Example vegetation: 3 vertical sections stacked from bed
# --------------------------------------------------------------------------
sections = [
{"ah": 0.5, "cd_wd": 0.8, "label": "section 1\n(dense canopy base)", "color": "#4CAF50"},
{"ah": 0.8, "cd_wd": 0.4, "label": "section 2\n(mid canopy)", "color": "#8BC34A"},
{"ah": 0.4, "cd_wd": 0.15, "label": "section 3\n(sparse canopy top)", "color": "#CDDC39"},
]

# Cumulative section boundaries
bottoms = [0.0]
for s in sections:
bottoms.append(bottoms[-1] + s["ah"])
tops = bottoms[1:]
h_veg_total = bottoms[-1] # = 1.7 m

# --------------------------------------------------------------------------
# Build lookup table (vegetation_nlookup = 20)
# --------------------------------------------------------------------------
nlookup = 20
dh = h_veg_total / nlookup
h_nodes = np.arange(0, nlookup + 1) * dh # shape (21,)

table = np.zeros(nlookup + 1)
for k in range(1, nlookup + 1):
h_k = k * dh
sec_bot = 0.0
for s in sections:
sec_top = sec_bot + s["ah"]
table[k] += s["cd_wd"] * max(0.0, min(sec_top, h_k) - sec_bot)
sec_bot = sec_top

slope_table = np.diff(table) # length nlookup

# --------------------------------------------------------------------------
# Runtime lookup example: water depth hu
# --------------------------------------------------------------------------
hu = 1.1 # example water depth at a timestep
hu_eff = min(hu, h_veg_total)
frac = hu_eff / dh
ik = min(int(frac), nlookup - 1)
frac_r = frac - ik
veg_cd_eff = table[ik] + frac_r * slope_table[ik]

# --------------------------------------------------------------------------
# Plot
# --------------------------------------------------------------------------
fig = plt.figure(figsize=(13, 6))
fig.suptitle("SFINCS vegetation drag — lookup table concept", fontsize=13, fontweight="bold")
gs = GridSpec(1, 3, figure=fig, wspace=0.40, left=0.06, right=0.97, top=0.88, bottom=0.10)

# ── Panel A: vegetation sections ─────────────────────────────────────────
ax1 = fig.add_subplot(gs[0])
ax1.set_title("A Vegetation sections\n(single uv-point)", fontsize=10)

for i, s in enumerate(sections):
ax1.barh(
bottoms[i] + s["ah"] / 2, 1.0,
height=s["ah"], left=0,
color=s["color"], edgecolor="k", linewidth=0.8, alpha=0.85
)
ax1.text(
0.5, bottoms[i] + s["ah"] / 2,
f'cd·b·N = {s["cd_wd"]:.2f}\nah = {s["ah"]} m',
ha="center", va="center", fontsize=7.5
)
# section boundary lines
ax1.axhline(bottoms[i], color="gray", lw=0.7, ls="--")

ax1.axhline(h_veg_total, color="gray", lw=0.7, ls="--")
ax1.set_xlim(0, 1); ax1.set_xticks([])
ax1.set_ylim(-0.15, 2.1)
ax1.set_ylabel("Height above bed (m)")
ax1.set_xlabel("← stem density schematic →")

# water surface at hu
ax1.axhline(hu, color="#1565C0", lw=2, ls="-", label=f"water depth hu = {hu} m")
ax1.fill_betweenx([0, hu], 0, 1, color="#90CAF9", alpha=0.25)
ax1.legend(fontsize=7.5, loc="upper right")

# ── Panel B: lookup table ─────────────────────────────────────────────────
ax2 = fig.add_subplot(gs[1])
ax2.set_title("B Pre-computed lookup table\n(built once in initialize_vegetation)", fontsize=10)

ax2.step(table, h_nodes, where="post", color="k", lw=1.2, label="table values")
ax2.plot(table, h_nodes, "o", color="k", ms=4, zorder=5)

# shade each section contribution band
sec_bot = 0.0
for s in sections:
sec_top = sec_bot + s["ah"]
ax2.axhspan(sec_bot, sec_top, color=s["color"], alpha=0.20)
sec_bot = sec_top

# interpolation at hu
ax2.axhline(hu_eff, color="#1565C0", lw=1.5, ls="--", label=f"hu = {hu} m")
ax2.plot(veg_cd_eff, hu_eff, "*", color="red", ms=12, zorder=10,
label=f"veg_cd_eff = {veg_cd_eff:.3f} m²/s² (interpolated)")

# show interpolation bracket
ax2.plot([table[ik], table[ik+1]], [h_nodes[ik], h_nodes[ik+1]],
"r-", lw=1.5, label="linear interpolation")
ax2.plot([table[ik], table[ik+1]], [h_nodes[ik], h_nodes[ik+1]],
"rs", ms=6)

ax2.set_xlabel("Cumulative drag integral\n∑ cd·b·N · submerged thickness (m²/s²)")
ax2.set_ylabel("Depth level h_k (m)")
ax2.set_ylim(-0.15, 2.1)
ax2.legend(fontsize=7.5, loc="lower right")

# ── Panel C: flux update (implicit) ──────────────────────────────────────
ax3 = fig.add_subplot(gs[2])
ax3.set_title("C Explicit flux update\n(every timestep in compute_fluxes)", fontsize=10)
ax3.axis("off")

textblock = (
r"$\bf{Runtime\ lookup\ (O(1),\ no\ inner\ loop):}$" + "\n\n"
r"$\mathrm{frac} = \min(h_u,\; h_{veg}) \;/\; \Delta h$" + "\n"
r"$ik = \lfloor \mathrm{frac} \rfloor$" + "\n"
r"$cd_{eff} = \mathrm{table}[ik] + (\mathrm{frac}-ik)\times\mathrm{slope}[ik]$" + "\n\n"
r"$\bf{Explicit\ momentum\ update:}$" + "\n\n"
r"$F_{veg} = -\phi\;cd_{eff}\;u_0\;|u_0|$" + "\n\n"
r"$q^{n+1} = \dfrac{q^n + (F_{ext} + F_{veg})\,\Delta t}"
r"{1 + \dfrac{g\,n^2\,|q|}{h_u^{7/3}}\,\Delta t}$"
+ "\n\n"
r"$\bf{Key\ properties:}$" + "\n"
"• No inner loop over sections at runtime\n"
"• Linear interpolation between table bins\n"
"• Sections stacked from bed upward\n"
" (consistent with SnapWave swvegatt)\n"
r"• $\phi$ = wet fraction (subgrid correction)"
)

ax3.text(0.03, 0.97, textblock, transform=ax3.transAxes,
fontsize=9, va="top", ha="left",
bbox=dict(boxstyle="round,pad=0.5", fc="#F5F5F5", ec="#BDBDBD"),
linespacing=1.6)

plt.savefig("vegetation_lookup_figure.png", dpi=150)
print("Saved: vegetation_lookup_figure.png")
plt.show()
49 changes: 36 additions & 13 deletions source/sfincs_lib/sfincs_lib.vfproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,15 @@
<Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl">
<Filter Name="snapwave">
<File RelativePath="..\src\snapwave\interp.F90"/>
<File RelativePath="..\src\snapwave\RFveg.inc"/>
<File RelativePath="..\src\snapwave\snapwave_boundaries.f90">
</File>
<File RelativePath="..\src\snapwave\snapwave_data.f90"/>
<File RelativePath="..\src\snapwave\snapwave_date.f90"/>
<File RelativePath="..\src\snapwave\snapwave_domain.f90"/>
<File RelativePath="..\src\snapwave\snapwave_data.f90">
</File>
<File RelativePath="..\src\snapwave\snapwave_date.f90">
</File>
<File RelativePath="..\src\snapwave\snapwave_domain.f90">
</File>
<File RelativePath="..\src\snapwave\snapwave_infragravity.f90"/>
<File RelativePath="..\src\snapwave\snapwave_ncinput.F90">
<FileConfiguration Name="Release|x64">
Expand All @@ -45,34 +49,48 @@
<Tool Name="VFFortranCompilerTool" Preprocess="preprocessYes"/>
</FileConfiguration>
</File>
<File RelativePath="..\src\snapwave\snapwave_ncoutput.F90">
<FileConfiguration Name="Release|x64">
<Tool Name="VFFortranCompilerTool" Preprocess="preprocessYes"/>
</FileConfiguration>
<FileConfiguration Name="Debug|x64">
<Tool Name="VFFortranCompilerTool" Preprocess="preprocessYes"/>
</FileConfiguration>
</File>
<File RelativePath="..\src\snapwave\snapwave_RFtable.f90"/>
<File RelativePath="..\src\snapwave\snapwave_solver.f90">
</File>
<File RelativePath="..\src\snapwave\snapwave_windsource.f90"/>
<File RelativePath="..\src\snapwave\snapwave_windsource.f90">
</File>
</Filter>
<File RelativePath="..\third_party_open\Delft3D\astro.f90"/>
<File RelativePath="..\third_party_open\bicgstab\bicgstab_solver_ilu.f90"/>
<File RelativePath="..\third_party_open\bicgstab\bicgstab_solver_ilu.f90">
</File>
<File RelativePath="..\third_party_open\utils\deg2utm.f90"/>
<File RelativePath="..\third_party_open\utils\geometry.f90"/>
<File RelativePath="..\src\sfincs_bathtub.f90">
</File>
<File RelativePath="..\src\sfincs_boundaries.f90"/>
<File RelativePath="..\src\sfincs_continuity.f90"/>
<File RelativePath="..\src\sfincs_crosssections.f90"/>
<File RelativePath="..\src\sfincs_crosssections.f90">
</File>
<File RelativePath="..\src\sfincs_data.f90">
</File>
<File RelativePath="..\src\sfincs_data.f90"/>
<File RelativePath="..\src\sfincs_date.f90"/>
<File RelativePath="..\src\sfincs_discharges.f90"/>
<File RelativePath="..\src\sfincs_domain.f90">
</File>
<File RelativePath="..\src\sfincs_error.f90"/>
<File RelativePath="..\src\sfincs_infiltration.f90"/>
<File RelativePath="..\src\sfincs_infiltration.f90">
</File>
<File RelativePath="..\src\sfincs_initial_conditions.F90"/>
<File RelativePath="..\src\sfincs_input.f90">
</File>
<File RelativePath="..\src\sfincs_lib.f90"/>
<File RelativePath="..\src\sfincs_log.f90"/>
<File RelativePath="..\src\sfincs_meteo.f90">
<File RelativePath="..\src\sfincs_lib.f90">
</File>
<File RelativePath="..\src\sfincs_log.f90"/>
<File RelativePath="..\src\sfincs_meteo.f90"/>
<File RelativePath="..\src\sfincs_momentum.f90">
</File>
<File RelativePath="..\src\sfincs_ncinput.F90">
Expand All @@ -93,9 +111,9 @@
</File>
<File RelativePath="..\src\sfincs_nonhydrostatic.f90"/>
<File RelativePath="..\src\sfincs_obspoints.f90"/>
<File RelativePath="..\src\sfincs_openacc.f90">
<File RelativePath="..\src\sfincs_openacc.f90"/>
<File RelativePath="..\src\sfincs_output.f90">
</File>
<File RelativePath="..\src\sfincs_output.f90"/>
<File RelativePath="..\src\sfincs_quadtree.F90">
<FileConfiguration Name="Release|x64">
<Tool Name="VFFortranCompilerTool" Preprocess="preprocessYes"/>
Expand All @@ -104,8 +122,11 @@
<Tool Name="VFFortranCompilerTool" Preprocess="preprocessYes"/>
</FileConfiguration>
</File>
<File RelativePath="..\src\sfincs_read.f90">
</File>
<File RelativePath="..\src\sfincs_runup_gauges.f90"/>
<File RelativePath="..\src\sfincs_snapwave.f90"/>
<File RelativePath="..\src\sfincs_snapwave.f90">
</File>
<File RelativePath="..\src\sfincs_spiderweb.f90"/>
<File RelativePath="..\src\sfincs_structures.f90"/>
<File RelativePath="..\src\sfincs_subgrid.F90">
Expand All @@ -116,6 +137,8 @@
<Tool Name="VFFortranCompilerTool" Preprocess="preprocessYes"/>
</FileConfiguration>
</File>
<File RelativePath="..\src\sfincs_vegetation.f90">
</File>
<File RelativePath="..\src\sfincs_timestep_analysis.f90">
</File>
<File RelativePath="..\src\sfincs_wave_enhanced_roughness.f90"/>
Expand Down
9 changes: 6 additions & 3 deletions source/src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@ libsfincs_la_SOURCES = \
sfincs_date.f90 \
sfincs_spiderweb.f90 \
sfincs_data.f90 \
../third_party_open/Delft3D/astro.f90 \
sfincs_read.f90 \
../third_party_open/Delft3D/astro.f90 \
../third_party_open/utils/geometry.f90 \
sfincs_error.f90 \
sfincs_quadtree.f90 \
sfincs_vegetation.f90 \
snapwave/interp.F90 \
snapwave/snapwave_data.f90 \
snapwave/snapwave_ncinput.F90 \
snapwave/snapwave_ncinput.F90 \
snapwave/snapwave_ncoutput.F90 \
snapwave/snapwave_infragravity.f90 \
snapwave/snapwave_boundaries.f90 \
snapwave/snapwave_date.f90 \
Expand All @@ -50,7 +53,7 @@ libsfincs_la_SOURCES = \
sfincs_snapwave.f90 \
../third_party_open/utils/deg2utm.f90 \
sfincs_meteo.f90 \
../third_party_open/bicgstab/bicgstab_solver_ilu.f90 \
../third_party_open/bicgstab/bicgstab_solver_ilu.f90 \
sfincs_nonhydrostatic.f90 \
sfincs_ncoutput.F90 \
sfincs_output.f90 \
Expand Down
30 changes: 29 additions & 1 deletion source/src/sfincs_data.f90
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ module sfincs_data
real*4 factor_pres
real*4 factor_prcp
real*4 factor_spw_size
real*4 waveforces_ratio
!
integer mmax
integer nmax
Expand Down Expand Up @@ -164,6 +165,7 @@ module sfincs_data
character*256 :: z0lfile
character*256 :: qtrfile
character*256 :: volfile
character*256 :: veggiefile
!
character*256 :: trefstr_iso8601
character*41 :: treftimefews
Expand Down Expand Up @@ -192,6 +194,8 @@ module sfincs_data
logical :: subgrid
logical :: manning2d ! spatially-varying roughness
logical :: coriolis
logical :: vegetation
logical :: snapwave_vegetation
logical :: store_cumulative_precipitation
logical :: store_maximum_waterlevel
logical :: store_maximum_waterdepth
Expand All @@ -206,6 +210,7 @@ module sfincs_data
logical :: store_zvolume
logical :: store_storagevolume
logical :: store_meteo
logical :: store_vegetation
logical :: store_wind
logical :: store_wind_max
logical :: store_wave_forces
Expand Down Expand Up @@ -419,6 +424,26 @@ module sfincs_data
!
real*4, dimension(:), allocatable :: uvmean
!
! Vegetation
!
integer :: vegetation_vertical_segments ! nr of vegetation sections in vertical
real*4, dimension(:,:), allocatable :: vegetation_cd
real*4, dimension(:,:), allocatable :: vegetation_stems_height
real*4, dimension(:,:), allocatable :: vegetation_stems_height_uv
real*4, dimension(:,:), allocatable :: vegetation_stems_width
real*4, dimension(:,:), allocatable :: vegetation_stems_density
real*4, dimension(:,:), allocatable :: vegetation_stems_cd_width_density_uv
! Lookup table arrays (pre-computed in initialize_vegetation, used in compute_fluxes without inner loop)
integer :: vegetation_nlookup ! number of equidistant vertical sections in lookup table (default 20, set via sfincs.inp)
real*4, dimension(:), allocatable :: vegetation_lookup_hmin_uv ! minimum vegetation height on uv points
real*4, dimension(:), allocatable :: vegetation_lookup_hmax_uv ! maximum vegetation height on uv points
real*4, dimension(:), allocatable :: vegetation_lookup_dh_uv ! bin width of lookup table: hmax / vegetation_nlookup, per uv point
real*4, dimension(:,:), allocatable :: vegetation_cd_sum_table ! cumulative sum of cd*width*density at vegetation_nlookup equidistant depth levels, (npuv, 0:vegetation_nlookup)
real*4, dimension(:,:), allocatable :: vegetation_cd_slope_table ! slope between consecutive table entries: table(k+1)-table(k), (npuv, 0:vegetation_nlookup-1)
!
! Wave forces limiter determined in sfincs_snapwave
real*4 :: fwmaxfac
!
!!! Wave makers
!
character*256 :: wavemaker_wvmfile ! polylines
Expand Down Expand Up @@ -624,7 +649,10 @@ module sfincs_data
real*4, dimension(:), allocatable :: df
real*4, dimension(:), allocatable :: dwig
real*4, dimension(:), allocatable :: dfig
real*4, dimension(:), allocatable :: cg
real*4, dimension(:), allocatable :: cg
real*4, dimension(:), allocatable :: cgig
real*4, dimension(:), allocatable :: qb
real*4, dimension(:), allocatable :: gam
real*4, dimension(:), allocatable :: betamean
real*4, dimension(:), allocatable :: srcig
real*4, dimension(:), allocatable :: alphaig
Expand Down
Loading