Skip to content

Conversation

Leynse
Copy link
Collaborator

@Leynse Leynse commented Apr 15, 2025

No description provided.

Leynse and others added 11 commits March 26, 2025 10:00
…fied Cd

- veg_Cd(m) = Cdterm
- Todo; check with Bob whether this is the intended use
…l not be defined nor become undefined. [VEG_CD] snapwave_solver.f90 1396

- For now not use this part (as was before), and ONLY give warning
…ree netcdf to coupled SnapWave solver

- Added reading the 4 veggie variables from quadtree netcdf (for now) added directly in quadtree.F90
- User input is 'snapwave_vegetation=1', now also used in sfincs_input.f90
- Added logical 'store_vegetation' in sfincs_data.f90 - used in quadtree.F90 whether veggie variables should be read or not (default off)
- Veggie allocation / calling moved down in snapwave_domain.f90. After determining the mapping to SNapwave ids from the regular grid and msk variables, since is now also done for the veggie variables.
- If vegetation = false, they are initiated with 1 level (previously undefined in snapwave trunk), and set to 0.0 (though later in snapwave_solver.f90 not actually used, but input of variable is still expected)
- allocate vars
- Do (probably overkill) for now with double for-loop: veg_Cd(nac,iq)   = quadtree_snapwave_veg_Cd(ip,iq)
Also taken out F(k) calculation out of the wind loop, and put after determination of Dveg.

F(k) = (Dw(k) + Dveg(k))

Df correctly not included?
@Leynse Leynse linked an issue Apr 15, 2025 that may be closed by this pull request
Leynse added 18 commits April 15, 2025 15:12
…ater levels; if a cell was set to false initially, it is not set to True again after becoming wet

- For now turn it off, but could add option to allow set to true again
- Added print statement
…, because of copypasting code it was set back to zeros....
… to make it compile

- Note - used 'Tp(k)' as Trep
- Question is where/how to get ’ RFveg . inc ’ - same as RFtable.inp?
…h compiling process.

- Now the solution builds without errors
…ues directly in snapwave_solver.f90

- Model runs up to '    write(*,*)'Done with - Compute phase and weights for Ruessink wave shape'"
Leynse added 10 commits July 11, 2025 14:54
…ow it runs

- Move calling subroutine swvegnonlin, so it's only called once per time calling SnapWave solver, after initial iteration loop, since it's determined over the whole grid directly - but still depends on actual depth and wave height
- Fix dh = 0.03
- Temp additions debug writes
…le.f90 to clean up the snapwave_solver.f90, and call new subroutine load_RFtable from snapwave_solver's swvegnonlin
…tum.f90

- Enough to improve still in terms of code cleanup, moving vars from quadtree to sfincs_domain, checking parallelisation, checking results
- And checking what uv(ip) velocity to use & when
- turn off the momentum eq part of veggie for now, it was still unstable
- Run for 1 vertical veggie section only for now
- Switch from ip indexing to nm
- use 'uu_nm' as velocity > velocity of previous timestep for the considered flux link
- Added divide by rhow
- plus/minus needs to be double checked
…erestimate the drag force. Was not the reason for earlier instabilities
- veg_CdBNstems in quadtree.F90, taht is multiplication of Cd, bstems and Nsterms
- veg_fvm in sfincs_momentum.f90 before starting main computation loop, only needs to be multiplied still with the effective waterdepth - hu can still change
…to use vegetation input for SFINCS and/or SnapWave calculations

- SFINCS: vegetation = 1
- SnapWave: snapwave_vegetation = 1
- through store_vegetation = True, the needed vars are read from netcdf quadtree grid
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.

Add SnapWave veggie input file optoin
1 participant