Skip to content

272 add netcdf quadtree option input for all infiltration options using generic reader#273

Merged
Leynse merged 10 commits into268-make-generic-quadtree-nc-input-readerfrom
272-add-netcdf-quadtree-option-input-for-all-infiltration-options-using-generic-reader
Mar 19, 2026
Merged

272 add netcdf quadtree option input for all infiltration options using generic reader#273
Leynse merged 10 commits into268-make-generic-quadtree-nc-input-readerfrom
272-add-netcdf-quadtree-option-input-for-all-infiltration-options-using-generic-reader

Conversation

@Leynse
Copy link
Copy Markdown
Collaborator

@Leynse Leynse commented Feb 4, 2026

No description provided.

- If netinfiltrationfile exists, then netinftype should be used
- Do precheck of netinfiltrationfile before reading in all data
- Current implementation will check and retrieve multiple variables from the same file (e.g. cnb) individually
- Added some documentation what part of the code is reading/allocating/generic needed conversions
- Kept naming in netcdf files for now consistent with the equivalent netcdf files
…pe (orignal vs netcdf) vs grid type (regular vs quadtree)

- Idea for now is if quadtree model, only netcdf input is support, and for regular model only the original binary files
@Leynse Leynse marked this pull request as ready for review February 4, 2026 16:57
@Leynse Leynse changed the base branch from main to 268-make-generic-quadtree-nc-input-reader March 19, 2026 15:20
Copy link
Copy Markdown
Collaborator Author

@Leynse Leynse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Checked and getting same result for reguler grid CNA model and quadtree grid CNA model

@Leynse Leynse merged commit 9ca41e3 into 268-make-generic-quadtree-nc-input-reader Mar 19, 2026
@Leynse Leynse deleted the 272-add-netcdf-quadtree-option-input-for-all-infiltration-options-using-generic-reader branch March 19, 2026 15:21
Leynse added a commit that referenced this pull request Mar 19, 2026
#269)

* - Initial commit, working on make a generic read_netcdf_quadtree_generic function
- Apply first to netcdf storage volume

* - Working version for storage volume nc with fixed mapping to SFINCS (can always add a snapwave one) and with real*4 (can always make a double version as well)
- In sfincs_domain.f90, 'call read_netcdf_storage_volume' is now replaced by 'call read_netcdf_quadtree_to_sfincs'
- Succesfully tested for testbed run 'storage_volume_qt_sbg_thd2'

* - Add error when wanted variable was not found in file and directly stop
- Tested by supplying dummy stoarge volume nc file for manning, now nicely stops

* - Added version for reading in netcdf quadtree manningfile (#271)

* - Added version for reading in netcdf quadtree manningfile
- For now: input argument is still manningfile, internally checked whether it is a netcdf file or binary
- For now: expected variable in the netcdf file is 'manning'
- For now: tested only with dummy of stoarge nc file
- Full testing pending on having ncinput example

* - Add non-stopping warning if a manningfile is prescribed while there is also a subgridfile, because then it will be unused!

* - Bugfix in general read_netcdf_quadtree_to_sfincs routine

* - Bugfix that the netcdf manningfile is actually read in

* - Now define 'rghfield' in sfincs_data.f90 rather than sfincs_domain.f90, so we can use that variable for output to netcdf file

* - Add 'manning' as netcdf output in case not a subgrid model, and if manningfile supplied (either binary for regular model, or as netcdf for quadtree
- Tested and working for new quadtree netcdf manningfile input

* 272 add netcdf quadtree option input for all infiltration options using generic reader (#273)

* - Add netinfiltrationfile, netinftype variables
- If netinfiltrationfile exists, then netinftype should be used
- Do precheck of netinfiltrationfile before reading in all data

* - Implement netcdf reader option for all infiltration options
- Current implementation will check and retrieve multiple variables from the same file (e.g. cnb) individually
- Added some documentation what part of the code is reading/allocating/generic needed conversions
- Kept naming in netcdf files for now consistent with the equivalent netcdf files

* - Add stop_sfincs check on combination check of infiltration input type (orignal vs netcdf) vs grid type (regular vs quadtree)
- Idea for now is if quadtree model, only netcdf input is support, and for regular model only the original binary files

* - Constant uniform infiltration is allowed for both grid types

* - Edit check - still possible that precip is forced but qinf=0

* - Change names to infiltrationfile and infiltrationtype

* - Move whole subroutine 'initialize_infiltration' from sfincs_domain.f90 to sfincs_infiltration.f90

* - Add check whether specified infiltrationtype is correct

* - Bump date

* 288 switch for netcdf inifile also to read netcdf quadtree to sfincs but as real8 (#289)

* - Implementation for using the generic netcdf input reader also for existing ncinifile option
- Note - made real*8 version
- This means that sfincs_initial_conditions does not need netcdf handle error and macros, F90, and precompiler
- (unless we add a netcdf restartfile later)

* - Suggestion to replace 'ncinifile' input by same 'inifile' name, and just check on the .nc output
- Analagous with manningfile, volfile etc.

* - Small changes to compile

* - Maarten prefers "infiltration_file" and "infiltration_type"
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 netcdf quadtree option input for all infiltration options using generic reader

1 participant