ASC to ASC: Difference between revisions
Content deleted Content added
| Chris Huxley (talk | contribs) | Ellis Symons (talk | contribs) No edit summary | ||
| Line 295: Example:<br> <li><tt>asc_to_asc.exe -na 1d_na_storgae_R.shp DEM_1m.flt</tt><br> ==Statistics== <big>'''"-stat<type>"'''</big> As of the 2017-10-AA build, the ASC_to_ASC.exe utility allows the user to perform a number of statistical analyses on a group of input grids (*.flt or *.asc format). This is particularly useful when extracting information from assessments that produce multiple result files for a single event, for example, processing grids from an ensemble assessment with numerous temporal pattern arrangements. The available options are: * Median * Mean * Frac * Min * Max * All * Rank<integer id> The below gives a description on each option as well as an example. It is also useful to consider using wildcards in the batch file to supplement typing out each input grid file individually. Several of the examples below utilise this ability to demonstrate how it can be done.<br> <br/> ==="-statMedian"=== The -statMedian flag outputs the median value at each grid cell from all the input grids. All the input grids are considered, regardless of if the grid cell is dry in some of the input grids (dry areas are still ranked). If the number of input grids is an even number, the median value is taken from the grid that is ranked ''n / 2 + 1'' (where n is the number of input grids). For example if the number of input grids is 10, at each grid cell the values are ranked lowest to highest (from 1 to 10). The result is taken from the 6th ranked grid. The median command outputs two grids: * A value grid: the resulting median value * An SRC grid: a grid listing which source input grid the median result value came from (a corresponding .csv file is also written as a legend)<br> <li><tt>asc_to_asc.exe -statMedian Q100_30min_TP1_h.asc Q100_30min_TP2_h.asc Q100_30min_TP3_h.asc Q100_30min_TP4_h.asc Q100_30min_TP5_h.asc</tt><br> [[File: asc_to_asc_statsMedian_eg.PNG|1000px|]]<br> ==="-statMean"=== The -statMean flag outputs the mean value at each grid cell. Unlike the median, the mean is only calculated at grid cells that are wet (that show flooding) in all input grids. Please note that the source grid is the next grid above the mean value. The mean command outputs two grids: * A value grid: the resulting value * An SRC grid: a grid listing which source input grid the result value came from or was the next above (a corresponding .csv file is also written as a legend)<br> <li><tt>asc_to_asc.exe -statMean Q100_30min_*_h.asc</tt><br><br> ==="-statFrac"=== The -statFrac flag outputs a value at each grid cell that represents the fraction of the events that the grid cell is wet in. For example, if the number of input grids is 10, and a value of 0.2 is returned, this means this grid cell experienced flooding in 2 out of the 10 events. A value of 1.0 means that the grid cell was wet in all events. The utility outputs one grid: * A Frac grid: the resulting Fraction value<br> <li><tt>asc_to_asc.exe -statFrac Q100_30min_*_h.asc</tt><br><br> ==="-statMin"=== The -statMin flag outputs the minimum value at each grid cell from all the input grids. This flag is analogous with the [[#Minimum|-Min]] operation flag. The utility outputs two grids: * A value grid: the resulting value * An SRC grid: a grid listing which source input grid the minimum result value came from (a corresponding .csv file is also written as a legend)<br> <li><tt>asc_to_asc.exe -statMin Q100_30min_*_h.asc</tt><br><br> ==="-statMax"=== The -statMax flag outputs the maximum value at each grid cell from all the input grids. This flag is analogous with the [[#Maximum|-Max]] operation flag. The utility outputs two grids: * A value grid: the resulting value * An SRC grid: a grid listing which source input grid the maximum result value came from (a corresponding .csv file is also written as a legend)<br> <li><tt>asc_to_asc.exe -statMax Q100_30min_*_h.asc</tt><br><br> ==="-statAll"=== The -statAll flag undertakes and creates results for all the statistic operations mentioned above. The utility outputs 9 grids: * A median, mean, max, min and frac grid (as detailed above) * An SRC grid: for the median, mean, min and max calculations (calculation of source grids as detailed above) * A .csv file that contains the legend for all SRC grids<br> <li><tt>asc_to_asc.exe -statAll Q100_30min_*_h.asc</tt><br><br> ==="-statRank<integer id>"=== The -statRank<integer> flag outputs the ''n<integer>'' ranked value at each grid cell from all the input grids. All the input grids are considered, regardless of if the grid cell is dry in some of the input grids (dry areas are still ranked). For example, if the number of input grids is 10, at each grid cell the values are ranked lowest to highest (from 1 to 10). -statRank8 will output results taken from the 8th ranked grid. In this example, -statRank1 is equivalent to ''Min'', -statRank10 is equivalent to ''Max'', and -statRank6 is equivalent to ''Median''. The Rank flag allows additional functionality that lets users extract results in between those that are pre-programmed. The utility outputs one grid: * A value grid: the resulting value * An SRC grid: a grid listing which source input grid the ranked result value came from (a corresponding .csv file is also written as a legend)<br> <li><tt>asc_to_asc.exe -statRank5 Q100_30min_*_h.asc</tt><br><br> =Other Options (switches)= | |||