timestep limiter diagnostics (csv) + unified timestep analysis #284
Closed
EgemenAnder wants to merge 2 commits intoDeltares:mainfrom
Closed
Conversation
Leynse
added a commit
that referenced
this pull request
Mar 13, 2026
Leynse
pushed a commit
that referenced
this pull request
Mar 19, 2026
* Initial commit of diagnostics * Moved diagnostic to separate module * - Also add sfincs_timestep_diag.f90 to Makefile.am for Linux compilation * - Don't want this change back to older VS version * Refactored code after discussion with Maarten: - determination required timestep should be based over the flux uv point instead of cell centre nm - renaming variables - doing calculation of average required timestep per cell in finalize - naming to _analysis consistently - make a initialize_timestep_analysis subroutine - keep compute_cell_min_timestep simple in sfincs_momentum instead - fix openacc data management * - Working netcdf output for 'average_required_timestep' and 'percentage_limiting_timestep' - Note that percentage limiting timestep might not be visible when plotting as continuous/patches, if simulation is always limitied by 1 flux link (2 cells) * - Add to docs, as done by PR #284 * - Add logstring message of most limiting cell, x&y-coordinates and % of computation * - Fix for Docker CPU compilation * Made it work properly for quadtree (not tested for regular). Some refactoring. * - Fix situation where a neumann msk=6 cell does not find any neighbouring msk=1 cell, then set to 0 - Windows compiler already stepped over this issue, but gfortran does not * Updated documentation to match source code * - Fix merge issue * - bump version --------- Co-authored-by: Kees Nederhoff <kees.nederhoff@deltares.nl> Co-authored-by: Leynse <Tim.Leijnse@deltares.nl> Co-authored-by: Tim Leijnse <timleynse94@gmail.com> Co-authored-by: Maarten van Ormondt <maarten.vanormondt@deltares.nl> Co-authored-by: Maarten van Ormondt <maarten.vanormondt@deltares.nl> With thanks to EgemenAnder for providing feedback on implementating this functionality!
Collaborator
|
Merged in PR #280 , implementation was done a bit differently with output on netcdf grid, but combined functionality deemed relevant, including outputing the uv, x&y locations |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I combined the timestep analysis idea from #267/#280 with my timestep diagnostics implementation.
Main changes:
sfincs_timestep_diagnostics.f90timestep_analysisproduces the NetCDF map variablesaverage_timestepandtimes_limiting(withcoordinates = "x y").reason=2(ip/nm/nmu/x/y set to 0).I rebuilt and ran short CPU tests (diag off/on, every/interval writes, analysis on, and dtmax-cap). All runs completed cleanly and outputs look consistent.
Inputs/Outputs
timestep_diagnostics(0/1)dt_timestep_diagnostics(s; 0 = every timestep)timestep_analysis(0/1)timestep_diagnostics=1:timestep_diagnostics.csvtimestep_diagnostics_domain.csvtimestep_analysis=1(netcdf map):average_timesteptimes_limitingEdge cases handled
dtmaxis limiting, diagnostics reportreason=2with limiter metadata set to zero.Best,
Egemen