You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks @carlosmunozmoncayo, good catch! We don't use dt in the default version src/2d/shallow/b4step2.f90 but good to get this fixed for users who need it.
I was surprised that b4step was broken as we set a number of time-dependent things in multilayer and surge applications, but we don't need the current time step as that is used in src2. That got me thinking to the purpose of b4step and whether dt can be relied upon to be accurate, or if it is something that should be done in src2. I could see interpolation being a good use case though, and for the exact same reason we set the storm fields in b4step, the interpolation needs to be done there.
All this is to say, we should definitely fix this as this probably broke when moving b4step2 recently (me). The rest is thinking about how dt may be fragile, or maybe not and I am thinking too deeply on this.
@mandli, I don't think b4step was broken, it was the calls to b4step in advanc that passed dt instead of delt, the variable name used there.
You raise a question about whether this value is accurate -- It seems like it should be since the call to b4step in advanc should use the same value as in the call to stepgrid a bit later. That call returns dtnew suggested for the next step, but I think the step taken is of size delt.
b4step was broken, but the new code we added when we moved b4step to advanc needed to use delt, rather than what it was when being called from stepgrid. You are right though, any issues would have been present already.
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
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.
Fix uninitialized
dtpassed tob4step2inadvanc.