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
Draft
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f4a9903
- Make sfincs_infiltration F90 including setting Preprocess="preproce…
Leynse Apr 1, 2024
8100fb5
- Move all original infiltration type options to sfincs_infiltration.…
Leynse Apr 1, 2024
c844de1
- Add option to specify a 'netinfiltrationfile'
Leynse Apr 1, 2024
413d692
- First implementation that should be able to read a netinfiltrationf…
Leynse Apr 1, 2024
6e8885a
- Add option to try implementation first for simpler cna method
Leynse Apr 2, 2024
1e4d9ec
- First version without previous timestep dependency
Leynse Apr 4, 2024
08b91f7
- Solved so we can use the mean gamma again, issue was het H(k) is se…
Leynse Apr 4, 2024
ef60bd1
- Bit cleanup, and move back 'Make sure DoverE is filled based on pre…
Leynse Apr 4, 2024
d577d54
- Hprev should be based on full E, not ee(itheta), now result is same…
Leynse Apr 5, 2024
b24e87a
- Clean up by changing H to inout, so that we don't have to determine…
Leynse Apr 5, 2024
d5b5a63
- Change water depth for warning limited depth in Herbers calculation…
Leynse Apr 5, 2024
46bdd02
- Put the whole determination of the IG source term in a new subrouti…
Leynse Apr 5, 2024
c77075d
- Some style cleanup
Leynse Apr 8, 2024
43623b7
- New implementation where IG source/sink term is first determined pr…
Leynse Apr 8, 2024
7f09dec
- First significant speedup by putting ' do itheta = 1, ntheta' loop …
Leynse Apr 8, 2024
89eb173
save intermediate attempts:
Leynse Apr 8, 2024
c4906cb
- In iteration loop, save a little bit of computation time by updatin…
Leynse Apr 8, 2024
6c04c50
- Rename all references to 'srcsh' to more descriptive 'srcig'
Leynse Apr 8, 2024
0294561
- Do actually limit the depth to 5m, not only warning
Leynse Apr 8, 2024
ec6e818
Added text
Leynse Apr 8, 2024
04a8e61
Combine loops
Leynse Apr 8, 2024
d55cf87
- depth needed to be inout to be able to change it
Leynse Apr 9, 2024
f3c6925
Revert "Combine loops"
Leynse Apr 9, 2024
f46e1e4
- Determinen above, so that we can correctly allocatie nmindbnd
Leynse Apr 9, 2024
e571ae6
- Update H(k) in first sweep of first iteration, so that in first tim…
Leynse Apr 9, 2024
decc4f0
- Fix quadtree hmax output
Leynse Apr 22, 2024
80651d0
- Allocate vars in sfincs_domain
Leynse Apr 25, 2024
9d09a34
- Remove double write cuminf
Leynse Apr 25, 2024
e546e5f
- Cumprcp is already in meterds now !? > so then no conversion from m…
Leynse Apr 25, 2024
0dcf919
- Fix missing point_prcp because of meteo3d that was turned to false
Leynse Apr 25, 2024
e173662
- remove in the end not needed check (bit unclear, but works)
Leynse Apr 25, 2024
8a1020e
- Index was wrong in wavemaker for case subgrid
Leynse Apr 25, 2024
f6387f0
- Merge '82 overcome dependency snapwave ig source term on previous t…
Leynse Apr 26, 2024
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
Prev Previous commit
Next Next commit
- 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
commit c844de1ed2150b4d562e9069b7da317e50696453
1 change: 1 addition & 0 deletions source/src/sfincs_data.f90
Original file line number Diff line number Diff line change
@@ -136,6 +136,7 @@ module sfincs_data
character*256 :: netampfile
character*256 :: netamprfile
character*256 :: netspwfile
character*256 :: netinfiltrationfile
character*256 :: scsfile
character*256 :: smaxfile
character*256 :: sefffile
24 changes: 20 additions & 4 deletions source/src/sfincs_domain.f90
Original file line number Diff line number Diff line change
@@ -1817,12 +1817,28 @@ subroutine initialize_infiltration()
infiltration = .false.
!
! Two input types for infiltration:
! a) Netcdf input file for values on quadtree grid (CNA, CNB, GA, Horton). Checked for existence first, if not check:
! b) Original input type with simple input keyword (qinf) or binary input files (qinffile, CNA, CNB, GA, Horton)
! a) Netcdf input file for values on quadtree grid (CNA, CNB, GA, Horton). Required for quadtree input! Check for existence first, if not check:
! b) Original input type with simple input keyword (qinf) or binary input files (qinffile, CNA, CNB, GA, Horton). Only works for original regular grid!
!
if (precip) then
if (precip) then !TL: CHECK - for Horton this should not be a requirement anymore !?
!
call read_infiltration_file_original()
if (netinfiltrationfile /= 'none') then
!
if (use_quadtree) then
call read_infiltration_file_netcdf()
else
write(*,*)'Warning : new Netcdf infiltration input format can only be specified for quadtree mesh model!'
endif
!
else! Original
!
if (use_quadtree .eqv. .false.) then
call read_infiltration_file_original()
else
write(*,*)'Warning : infiltration input for quadtree mesh can only be specified using the new Netcdf infiltration input format!'
endif
!
endif
!
else
!
25 changes: 20 additions & 5 deletions source/src/sfincs_infiltration.F90
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
module sfincs_infiltration

contains


subroutine read_infiltration_file_original()
!
! Six options for infiltration:
!
! 1) Spatially-uniform constant infiltration
@@ -24,9 +26,7 @@ module sfincs_infiltration
! or:
! b) inftype == 'cna' or inftype == 'cnb'
!
! First we determine precipitation type, as part of either _original or _netcdf input type

subroutine read_infiltration_file_original()
! First we determine infiltration type
!
use sfincs_data
!
@@ -303,7 +303,22 @@ subroutine read_infiltration_file_original()
!
endif
!
end subroutine
end subroutine read_infiltration_file_original

subroutine read_infiltration_file_netcdf()
!
use sfincs_data
!
implicit none
!
integer :: nm
!
write(*,*)'TODO'



end subroutine read_infiltration_file_netcdf


subroutine update_infiltration_map(dt)
!
1 change: 1 addition & 0 deletions source/src/sfincs_input.f90
Original file line number Diff line number Diff line change
@@ -179,6 +179,7 @@ subroutine read_sfincs_input()
call read_char_input(500,'netamprfile',netamprfile,'none')
call read_char_input(500,'netampfile',netampfile,'none')
call read_char_input(500,'netspwfile',netspwfile,'none')
call read_char_input(500,'netinfiltrationfile',netinfiltrationfile,'none')
!
! Output
call read_char_input(500,'obsfile',obsfile,'none')