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

Commits on Apr 1, 2024

  1. - Make sfincs_infiltration F90 including setting Preprocess="preproce…

    …ssYes"
    
    - Also in Makefile.am
    Leynse committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    f4a9903 View commit details
    Browse the repository at this point in the history
  2. - Move all original infiltration type options to sfincs_infiltration.…

    …f90 within one subroutine "read_infiltration_file_original".
    
    - Division between original/netcdf input same as for subgrid
    Leynse committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    8100fb5 View commit details
    Browse the repository at this point in the history
  3. - Add option to specify a 'netinfiltrationfile'

    - 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
    Leynse committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    c844de1 View commit details
    Browse the repository at this point in the history
  4. - First implementation that should be able to read a netinfiltrationf…

    …ile with input qinffield/scs_se/ksfield assuming inftype = 'cnb'
    
    - Reading and remapping was tested for quadtree_msk
    Leynse committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    413d692 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2024

  1. Configuration menu
    Copy the full SHA
    6e8885a View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2024

  1. - First version without previous timestep dependency

    - 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
    Leynse committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    1e4d9ec View commit details
    Browse the repository at this point in the history
  2. - Solved so we can use the mean gamma again, issue was het H(k) is se…

    …t to 0 everytime snapwave_solver is called, so now determined again
    
    - Code can be cleaned up by doing a H inout definition probably
    Leynse committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    08b91f7 View commit details
    Browse the repository at this point in the history
  3. - Bit cleanup, and move back 'Make sure DoverE is filled based on pre…

    …vious ee' part
    
    - and result now only little bit different anymore, because of removal of previous loop now?
    Leynse committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    ef60bd1 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2024

  1. - Hprev should be based on full E, not ee(itheta), now result is same…

    … 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)
    Leynse committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    d577d54 View commit details
    Browse the repository at this point in the history
  2. - Clean up by changing H to inout, so that we don't have to determine…

    … it again at the start of solve_energy_balance2Dstat
    
    - Remove Sxx outside of subroutine 'solve_energy_balance2Dstat', since that is not needed anymore
    Leynse committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    b24e87a View commit details
    Browse the repository at this point in the history
  3. - Change water depth for warning limited depth in Herbers calculation…

    … to determine Hig,0 from 10 m to 5 m
    Leynse committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    d5b5a63 View commit details
    Browse the repository at this point in the history
  4. - Put the whole determination of the IG source term in a new subrouti…

    …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
    Leynse committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    46bdd02 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2024

  1. - Some style cleanup

    Leynse committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    c77075d View commit details
    Browse the repository at this point in the history
  2. - New implementation where IG source/sink term is first determined pr…

    …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
    Leynse committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    43623b7 View commit details
    Browse the repository at this point in the history
  3. - First significant speedup by putting ' do itheta = 1, ntheta' loop …

    …inside the subroutine
    Leynse committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    7f09dec View commit details
    Browse the repository at this point in the history
  4. save intermediate attempts:

    - ! 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
    Leynse committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    89eb173 View commit details
    Browse the repository at this point in the history
  5. - In iteration loop, save a little bit of computation time by updatin…

    …g srcsh only for the first sweep (but still every iteration)
    Leynse committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    c4906cb View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6c04c50 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0294561 View commit details
    Browse the repository at this point in the history
  8. Added text

    Leynse committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    ec6e818 View commit details
    Browse the repository at this point in the history
  9. Combine loops

    Leynse committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    04a8e61 View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2024

  1. Configuration menu
    Copy the full SHA
    d55cf87 View commit details
    Browse the repository at this point in the history
  2. Revert "Combine loops"

    This reverts commit 04a8e61.
    Leynse committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    f3c6925 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f46e1e4 View commit details
    Browse the repository at this point in the history
  4. - Update H(k) in first sweep of first iteration, so that in first tim…

    …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
    Leynse committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    e571ae6 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2024

  1. - Fix quadtree hmax output

    Leynse committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    decc4f0 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2024

  1. - Allocate vars in sfincs_domain

    - correct var names from quadtree infiltration netcdf file
    Leynse committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    80651d0 View commit details
    Browse the repository at this point in the history
  2. - Remove double write cuminf

    - add needed 'if (nm>0) ' checks for quadtree max output
    Leynse committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    9d09a34 View commit details
    Browse the repository at this point in the history
  3. - Cumprcp is already in meterds now !? > so then no conversion from m…

    …m to m needed anymore
    Leynse committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    e546e5f View commit details
    Browse the repository at this point in the history
  4. - Fix missing point_prcp because of meteo3d that was turned to false

    - fix debug mode issues with extra (nm > 0) checks
    Leynse committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    0dcf919 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e173662 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8a1020e View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2024

  1. - Merge '82 overcome dependency snapwave ig source term on previous t…

    …imestep' into '80 add option for netcdf infiltration quadtree file input'
    Leynse committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    f6387f0 View commit details
    Browse the repository at this point in the history