Skip to content

Conversation

@Leynse
Copy link
Collaborator

@Leynse Leynse commented May 1, 2024

No description provided.

Leynse added 30 commits April 1, 2024 12:20
…f90 within one subroutine "read_infiltration_file_original".

- Division between original/netcdf input same as for subgrid
- In sfincs_domain read either read_infiltration_file_original or read_infiltration_file_netcdf, and check whether combinations match
- We use _original only for regular grid, and _netcdf only for quadtree grid
…ile with input qinffield/scs_se/ksfield assuming inftype = 'cnb'

- Reading and remapping was tested for quadtree_msk
- Note ; had to change definition of gamma, so not anymore mean gamma over current and upwind point > changes gamma and thus source term and IG growth, have to check still whether that is a problem or not
- todo: clean up
…t to 0 everytime snapwave_solver is called, so now determined again

- Code can be cleaned up by doing a H inout definition probably
…vious ee' part

- and result now only little bit different anymore, because of removal of previous loop now?
… as in paper

- Thereby not using H_inc_old and H_ig_old anymore from wave heights of last time step (but implicitly we still do)
… it again at the start of solve_energy_balance2Dstat

- Remove Sxx outside of subroutine 'solve_energy_balance2Dstat', since that is not needed anymore
…ne 'determine_infragravity_source_sink_term' for clarity

- Also makes it easier to experiment puting the source term determination in the ' do iter=1,niter
'-loop
…ior to iteration loop, to fill 'srcsh', based on effectively incident energy from previous SnapWave timestep

- Then depending on new option, 'snapwave_iterative_srcsh=1, is new default', the subroutine is called again to determine srcsh now based on just updated incident wave energy.
- If nr_sweeps = 4, this is slower because subroutine 'determine_infragravity_source_sink_term' is called multiple times
- But, Hm0 IG converges now immediately, instead of after a few timesteps!

- However, to speed up you can with snapwave_iterative_srcsh = 0 still keep old behaviour of only using the initial filling of 'srcsh'. Depends on application whether slower convergence IG wave height is problem
- TODO: check whether slower performance can still be counteracted some way
- ! Update H(k), used in subroutine to calculate relative waterdepth 'gam' > TL: this creates a variability over sweeps/iterations/timesteps since 'gam' changes every time > seems more stable not to do this
- OMP loop in solver did not seem to provide speedup
- OMP loop in subroutine 'determine_infragravity_source_sink_term' made things slower
- Even without these 3 attempts, performance loss of more times calling subroutine 'determine_infragravity_source_sink_term' in iteration loop seems negligible for small model
…g srcsh only for the first sweep (but still every iteration)
This reverts commit 04a8e61.
…estep we get already a good estimate of srcig and thereby Hig, and not just only conservative shoaling from the boundary

- Only done once to prevent changing H(k) > and thereby gam and alphaig > every time, to prevent oscillations
- correct var names from quadtree infiltration netcdf file
- add needed 'if (nm>0) ' checks for quadtree max output
- fix debug mode issues with extra (nm > 0) checks
Leynse added 4 commits April 25, 2024 17:34
…imestep' into '80 add option for netcdf infiltration quadtree file input'
   - Now determine nuvisc per grid cell, depending on refinement level (min of dx-dy)!
   - crsgeo true or false is still considered
   - removed option for direct 'nuvisc' input, still possible to scale through 'nuviscdim'
@Leynse Leynse requested a review from maartenvanormondt May 1, 2024 14:45
@Leynse Leynse linked an issue May 1, 2024 that may be closed by this pull request
@Leynse
Copy link
Collaborator Author

Leynse commented May 1, 2024

Note: branch builds on last commmit of '80-add-option-for-netcdf-infiltration-quadtree-file-input'

Leynse added 3 commits May 31, 2024 12:11
…e per level, not grid cell, to save computation time in sfincs_momentum
… value of 1.0 that is later divided by 100, but make this 0.01 directly

- This is the 'viscosity per meter grid cell length'
- Note, to prevent issues with old input, I use in sfincs.inp the 'nuvisc' keyword instead of 'nuviscdim', so people with nuviscdim=1 in their older sfincs.inp suddenly do not have a lot of visco, but have the same default
@Leynse
Copy link
Collaborator Author

Leynse commented May 31, 2024

@Leynse Leynse closed this May 31, 2024
@Leynse Leynse deleted the 88-determine-viscosity-per-refinement-level-for-quadtree-simulation branch May 31, 2024 11:08
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.

Determine viscosity per refinement level for quadtree simulation

2 participants