Skip to content
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

80 add option for netcdf infiltration quadtree file input #81

Draft
wants to merge 33 commits into
base: main
Choose a base branch
from

Conversation

Leynse
Copy link
Contributor

@Leynse Leynse commented Apr 1, 2024

No description provided.

Leynse added 4 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
@Leynse Leynse linked an issue Apr 1, 2024 that may be closed by this pull request
Leynse added 25 commits April 2, 2024 15:33
- 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
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 option for netcdf infiltration quadtree file input
1 participant