QGIS TUFLOW Apply Stability Styling: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
 
(26 intermediate revisions by 2 users not shown)
Line 1:
This tool styles the selected layer using a 'traffic light' method to indicate where instabilities could be occurring. This tool currently only supports the _TS.mif (_TS_P.shp) 1D output, however it is intended to expand the scope of this tool in future releases to other inputs and outputs to help with model checking.<Br>
<BR>
''Introduced in version 3.3.1'4''<Br><br>
 
===Running the Tool===
Line 11:
[[File: stability_styling_legend.PNG]]<br><Br>
 
The following ruleslayers are appliedcurrently toapplicable determinein the whichtool category(the eachrules featureare described in the fallssections withinbelow):
* <b>[[QGIS_TUFLOW_Apply_Stability_Styling#TS_P_Output | _TS_P]]</b>
 
====_TS_P Output====
The _TS_P.shp (_TS.mif) is a 1D timeseries output for Q, V, and H, and includes the following information:
* Maximum value (from every timestep) and the time of maximum
Line 19 ⟶ 20:
* Time series information - this can be slightly different from the results exported to the 'plot' folder as it will reduce the number of outputs to ensure it conforms with GIS attribute limits
 
=====Rules=====
The rules to categorise 'Likely Unstable' and 'Possibly Unstable' are very similar and the main difference is that they use different sensitivities. The parameters determining how sensitive each is can be modified by the user. The basic rules are as follows, a more detailed description and how to change the sensitivity can be found further below:
* '''Rule 1:''' Flag as unstable if the minimum value is less than zero ''(only applied to "Possibly Unstable")''<br>
: [[File: min_max_close_in_time_examplenegative_results_example.PNG | 450px]]<brBr>
* Rule 2: Flag as unstable if the minimum and maximum values occur within a certain timeframe of each other
* '''Rule 32:''' Flag as unstable if the maximumminimum valueand fallsmaximum outsidevalues ofoccur thewithin timea seriescertain valuestimeframe byof a certaineach amountother<br>
: [[File: min_max_close_in_time_example.PNG | 450px]]<br>
* Rule 4: Flag as unstable if the minimum value falls outside of the time series values by a certain amount
* '''Rule 53:''' Flag as unstable if athe numbermaximum timevalue seriesfalls 'bounces'outside withof athe magnitudetime greaterseries than a given valuevalues exceedby a givencertain countamount<br>
: [[File: max_not_close_to_ts_example.PNG | 450px ]]<br>
* '''Rule 4:''' Flag as unstable if the minimum value falls outside of the time series values by a certain amount<br>
: [[File: min_not_close_to_ts_example.PNG | 450px ]]<br>
* '''Rule 5:''' Flag as unstable if a number time series 'bounces' with a magnitude greater than a given value exceed a given count
<br><Br>
''Detailed Description''<Br>
Line 31 ⟶ 36:
<br>
'''<tt>FORWARD_LOOK_COUNT</tt>'''<br>
'''<tt>DIFF_BETWEEN_MAX_AND_TSPERC_DIFF_BETWEEN_MAX_AND_TS</tt>'''<br>
'''<tt>UNSTABLE_COUNT_LIMIT</tt>'''<br>
'''<tt>UNSTABLE_PERC_LIMIT</tt>'''<br>
<Br><Br>
* '''Detailed Description Rule 1:''' Flag as unstable if the minimum value is less than zero ''(only applied to "Possibly Unstable")''
* '''Detailed Description Rule 2:''' Flag as unstable if the minimum and maximum values occur within '''<tt>FORWARD_LOOK_COUNT</tt>''' number of timesteps. This will not be flagged if the minimum value occurs at the first timestep.
* '''Detailed Description Rule 3:''' The following rule uses a <tt>'''TOLERANCE'''</tt> value defined as
[[File: min_max_close_in_time_example.PNG | 450px]]<br>
<pre>TOLERANCE = DIFF_BETWEEN_MAX_AND_TSPERC_DIFF_BETWEEN_MAX_AND_TS multiplied by the time series range (time series max value - time series min value).</pre>
* Detailed Description Rule 3: The following rule uses a <tt>'''TOLERANCE''</tt> defined as
: Flag as unstable if the max value is outside of the time series equal to, or greater than the '''<tt>TOLERANCE</tt>''' value (outside means either not close to any of the data points or an interpolated value if the time of max falls inbetween data points)<br>
<pre>TOLERANCE = DIFF_BETWEEN_MAX_AND_TS multiplied by the time series range (time series max - time series min).</pre>
* '''Detailed Description Rule 4:''' Same as rule 3 however with the minimum value rather than the maximum value
: Flag as unstable if the max value is different than the time series maximum by '''<tt>TOLERANCE</tt>'''. Or flag as unstable if the time of max is different than the time series time of max by '''<tt>TOLERANCE</tt>''' AND the time series value at the time of max is different than the max by '''<tt>TOLERANCE</tt>'''.
* '''Detailed Description Rule 5:''' The following rule uses a <tt>'''TOLERANCE'''</tt> value defined as
<pre>TOLERANCE = UNSTABLE_PERC_LIMIT multiplied by the time series range (time series max value - time series min value).</pre>
: This rule also defines a bounce as where there are consecutive gradient sign changes<br>
: e.g.<br>
: [[File: consecutive_gradient_change_example.PNG | 450px]]<br>
: The gradient sign change is considered 'consecutive' if it occurs within '''<tt>FORWARD_LOOK_COUNT</tt>''' timesteps<Br>
: [[File: lookahead_gradient_change_example.PNG | 450px]]<br>
: The magnitude of a bounce is defined as:<br>
: [[File: bouce_magnitude_example.PNG | 450px]]<br>
: Flag as unstable if the number of bounces with a magnitude greater than '''<tt>TOLERANCE</tt>''' exceeds '''<tt>UNSTABLE_COUNT_LIMIT</tt>'''.<Br>
<br><Br>
''How to Modfiy the Settings''<br>
The settings can be modified by opening the following Python file in a text editor and changing the constants at the top of the file. The values shown in the image below are currently the default values.
<pre>%appdata%\QGIS\QGIS3\profiles\default\python\plugins\tuflow\alg\custom_styling_functions.py</pre>
[[File: python_file_example.PNG]]<Br>
<br>
<br>
{{Tips Navigation
|uplink=[[TUFLOW_QGIS_Plugin#Usage| Back to TUFLOW QGIS Plugin Main Page]]
}}