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.
If a
output_parameters->stream_output->mask_output
file was configured, the flows, velocities, and depths written to disk are an erroneous mixture of flows, velocities, and depths. For example, theflow
field for a givenfeature_id
contains values for a mixture of aggregated flows, velocities, and depths. Not the expected flows.This patch corrects this behavior so the expected aggregated flows and depths are produced. However, I am not certain that velocities are correctly aggregated. I observed NAN values returned for aggregated velocities. The
optimized_v_data
subroutine needs to be checked to ensure velocity values are correctly aggregated.Technical Description
If a
output_parameters->stream_output->mask_output
file is included and contains anex
section,t-route
will aggregate contributions from flowpaths directly upstream of anex
us. The aggregation subroutine contained an error which changed the output column ordering of the flow velocity depth dataframe changes from(0, q), (0, v), (0, d), ...
to(0, q), (1, q), (0, v), (1, v), (0, d), (1, d), ...
. The subroutine that operated on the potentially aggregated flow, velocity, and depth dataframe expects the(0, q), (0, v), (0, d), ...
column ordering. The mismatching expectations resulted in erroneous flow velocity and depth values written to disk. For example, theflow
field for a givenfeature_id
would contain values for a mixture of aggregated flows, velocities, and depths. Not the expected flows.Reindexing the flow velocity depth dataframe returned from the aggregation subroutine resolves this issue.