GRID to GRID draft: Difference between revisions

Content deleted Content added
 
(9 intermediate revisions by one other user not shown)
Line 1:
=Introduction=
The grid_to_grid.exe is a utility that can be used to perform a range of operations on gridded files. The input grids can be a combination of GeoTIFF (.tif), ESRI ASCII (.asc), binary float (.flt) geopackage (.gpkg), NetCDF (.nc) and Cloud Optimised GeoTIFFs (.cog) grids, all of which can be input and output from TUFLOW and any of the format can be set as output from the utility.<br>
For some options (such as processing maximums or differences) the input files must be of the same row/column dimensions.<br>
 
Line 357:
The out nodal area table extends from the minimum to the maximum elevation in the DEM. A user defined minimum value can be specified using the "Skew" attribute of the GIS region.<br>
Example:
*<tt>grid_to_grid.exe -na 1d_na_storage_Rstorage_R.shp DEM_1m.tif</tt>
 
==Calibration Points==
Line 393:
* 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>
Example:
*<tt>grid_to_grid.exe -statMedian Q100_30min_TP1_h.tif Q100_30min_TP2_h.tif Q100_30min_TP3_h.tif Q100_30min_TP4_h.tif Q100_30min_TP5_h... Q100_30min_TP10_h.tif </tt><br>
 
[[File: asc_to_asc_statsMedian_eg.PNG|1000px|]]<br>
<br>
Note, the median value for thatthe cellexample wasbelow dryis (a 'NULL') value, then the output wouldis bea dry cell. For example, 7 out of the 10 inputs are dry at athis particular locationcell. Once theythe outputs are ordered them (with NULL showing at the lowest spots), then the median (6th) value for thisthe cell is 'NULL' (dry) and the source would be 8, as shown below. Therefore, at this location you would see a dry cell in the median output, and '8' inis the source grid output.
<br>
[[File:A2A median.png|400px]]<br>
Line 413:
 
The utility outputs one grid:
* A Frac grid: the resulting Fractionfraction value<br>
Example:
*<tt>grid_to_grid.exe -statFrac Q100_30min_*_h.tif</tt><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:
Line 446:
 
==="-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 as low e.g. Rank1, Rank2 and so on). 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 two grids:
Line 455:
 
==Flood Extent==
'''"-wl <wl_file>fe"'''<br>
Returns a simple grid with value of 1 where the input grid has an active, non-zero value.<br>
Example:
Line 460 ⟶ 461:
 
==Remap==
'''"-wl <wl_file> -dem <dem_file>"'''<br>
RemapRemaps acoarser resolution water level grid to a higherfiner resolution DEM.<br>
'''"-wl <wl_file>"'''<br>
Sets the coarser resolution water level grid to remap from.<br>
'''"-dem <dem_file>"'''<br>
Sets the finer resolution DEM.<br>
The default interpolation method is TIN. But "-idw_npt<number of points>" flag can be used to change the interpolation method to IDW and set the number of points used for IDW interpolation (default is 12).<br>
Example:
*TheRemaps utilitywater canlevel also remap additional map output grids (e.g. velocity, hazard and others)grid to the resolution of the DEM file, e.g.:<br>
:<tt>grid_to_grid.exe -remap -wl lowres_h.tif -dem DEM_highres.tif</tt>
*The utility can also applyremap adepth bufferoutput distancegrids or add freeboard. For example,to the below applies a buffer distanceresolution of 20m, and adds a freeboard of 0.2m to the original water levelDEM grid.file:<br>
:<tt>grid_to_grid.exe -remap -wl lowres_h.tif -dem DEM_highres.tif lowres_v.tif lowres_hazardlowres_d.tif</tt>
*The utility can also apply a buffer distance or add a freeboard. The below applies a buffer distance of 20m, and adds a freeboard of 0.2m to the original water level grid.<br>
:<tt>grid_to_grid.exe -remap -fb0.2 -bd20 -wl lowres_h.tif -dem DEM_highres.tif</tt>
 
Note that, for any output types other than depth, this utility does NOT interpolate the result from the coarser grid to the finer grid, but only extends/reduces the output extent to the dry/wet extent. More discussions on this function is documented here <u>[[TUFLOW_Remapping | TUFLOW Remapping Tool]]</u>.<br>
 
 
=GPKG and NetCDF=