Skip to content

- Initial commit, working on make a generic read_netcdf_quadtree_gene…#269

Merged
Leynse merged 9 commits intomainfrom
268-make-generic-quadtree-nc-input-reader
Mar 19, 2026
Merged

- Initial commit, working on make a generic read_netcdf_quadtree_gene…#269
Leynse merged 9 commits intomainfrom
268-make-generic-quadtree-nc-input-reader

Conversation

@Leynse
Copy link
Copy Markdown
Collaborator

@Leynse Leynse commented Feb 4, 2026

…ric function

  • Apply first to netcdf storage volume
  • Work in progress still

…ric function

- Apply first to netcdf storage volume
- Work in progress still
@Leynse Leynse linked an issue Feb 4, 2026 that may be closed by this pull request
…(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'
@Leynse Leynse marked this pull request as ready for review February 4, 2026 14:12
Leynse and others added 2 commits February 4, 2026 15:55
- Tested by supplying dummy stoarge volume nc file for manning, now nicely stops
* - 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
Comment thread source/src/sfincs_lib.f90 Outdated
Leynse and others added 4 commits March 19, 2026 16:21
…ng 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
…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.
@Leynse
Copy link
Copy Markdown
Collaborator Author

Leynse commented Mar 19, 2026

Can you review @maartenvanormondt ?

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.

  • Changes checked with Maarten, and netcdf manning and cna infiltration inputs have been tested

@Leynse Leynse merged commit 7e872aa into main Mar 19, 2026
@Leynse Leynse deleted the 268-make-generic-quadtree-nc-input-reader branch March 19, 2026 16:17
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.

Make generic quadtree nc input reader

2 participants