r.watershed returns bogus flow direction without warning when using large "virtual" terrain
I'm using the hydropotential, in units Pa, as my "elevation" for r.watershed in order to route flow under a glacier. The values are larger than a normal elevation, although perhaps not using grass for planetary research. The output of "r.info" follows. When I use this with r.watershed -a --v elevation=phi accumulation=acch drainage=fdir thresh=50 flow=RUh.2k
, the fdir
results are incorrect.
If I r.mapcalc 'phi = phi / 1000' # [Pa] to [kpa]
, then things work.
I can provide example files if needed to recreate this.
> r.info phi
+----------------------------------------------------------------------------+
| Layer: phi Date: Wed Feb 24 20:37:58 2016 |
| Mapset: PERMANENT Login of Creator: mankoff |
| Location: Morlighem_2014 |
| DataBase: /Users/mankoff/data/grass |
| Title: ( phi ) |
| Timestamp: none |
|----------------------------------------------------------------------------|
| |
| Type of Map: raster Number of Categories: 255 |
| Data Type: DCELL |
| Rows: 538 |
| Columns: 301 |
| Total Cells: 161938 |
| Projection: Stereographic |
| N: -657600 S: -3349500 Res: 5003.53159851 |
| E: 864700 W: -638000 Res: 4992.35880399 |
| Range of data: min = -250782 max = 32395007.4 |
| |
| Data Description: |
| generated by r.mapcalc |
| |
| Comments: |
| 1000 * 9.8 * z_b + 917 * 9.8 * (z_s - z_b) |
| |
+----------------------------------------------------------------------------+
Change History
(14)
Cc: |
mankoff added
|
Version: |
6.4.4 → 7.0.3
|
Milestone: |
7.0.6 → 7.2.1
|
Version: |
7.0.3 → 7.2.0
|
I've upgrade to
grass 7.0.3
and this bug still exists. Here is an MWE to recreate it:Now that grass supports other planets https://grasswiki.osgeo.org/wiki/Planetary_mapping it is likely others will run into similar issues when flow routing over terrain with values significantly larger than Earth topography.