Riverscapes / riverscapes-tools

Open-source Python 3.0 tools for the Riverscapes organization
https://tools.riverscapes.net/
GNU General Public License v3.0
11 stars 8 forks source link

Add a JSON summary statistics report to RS_Context #870

Closed joewheaton closed 8 months ago

joewheaton commented 9 months ago

WORKING DRAFT - IGNORE @aarditti and I are teaching Fluvial Geomorphology and I have a lab we assign next week where we ask them to calculate a bunch of simple morphometrics: https://riverscapes.github.io/Fluvial-Geomorphology/Assignments/module-03_assignment.html. These are all at the scale of a HUC 10 watershed. I thought it would be a good excuse, to try and get these added in a JSON summary and/or CSV/XLSX file, which we could later incorporate into updating our reports. This is exactly the sort of summary information Alden is after.

The current list and ideas/notes for inclusion

3 - Catchment Morphometrics

For the Logan River Watershed:

  1. What is its catchment length in meters?

From P 34 of Fryris et al (2011): "L is a stream length measured in a straight tline from the highest topographic point to the river mouth along the longest axis of the Catchment P

Also need Drainage Area.

  1. What is its catchment area in square meters and in square kilometers?
  2. What is the the catchment perimeter length in meters and kilometers?
  3. Calculate the circularity ratio.
  4. Calculate the elongation ratio.
  5. Calculate the form factor of the Logan River Watershed.
  6. What is the catchment relief of the Logan River Watershed?
  7. What is the relief ratio of the Logan River Watershed?
  8. What is the drainage density of the Logan River perennial drainage network?

In a perfect world we should do this for perennial, vs. intermittent, vs. ephemeral, vs. all combined. And then if we were greedy, we would in VBET (or RME) do riverscape network density too.

  1. What is the drainage pattern of the Logan River drainage network?
aarditti commented 8 months ago

@jtgilbert can you meet tmrw afternoon or Friday to determine if these are feasible? I've attached definitions and suggested calculations for each

For the Logan River Watershed:

 1. What is its catchment length in meters?

             Definition: From P 34 of Fryris et al (2011): "L is a stream length measured in a straight line from the highest topographic point to the river mouth along the longest axis of the Catchment

             Calculation: diameter of minimum bounding circle of watershed. I know ESRI has this tool, so I would guess you could find it open-source somewhere as well.

2. What is its catchment area in square meters and in square kilometers?
         Already included

3. What is the catchment perimeter length in meters and kilometers?

            Calculation: geometry attribute perimeter of watershed

4. Calculate the circularity ratio.

        Definition: The ‘normal’ pear-like ovoid shape of catchments can be related to circular forms (Figure 3.4) to determine the circularity ratio : R c = A/A c where R c is the circularity ratio, A is catchment area and A c is the area of a circle with the same circumference as the catchment.

            Calculation: Watershed area/Area of minimum bounding circle of catchment

5. Calculate the elongation ratio.

        Definition: Unlike the circularity ratio that relies on the measurement of circles, the elongation ratio measures the catchment area to length relationship to give a measure of catchment shape: E r = A^0.5A/L where E r is the elongation ratio, A (km 2 ) is the catchment area and L (km) is the catchment length along its axis. The closer to 1.0 the ratio is, the more round the catchment is. Catchments with elongation ratios around 0.6 are relatively elongate. In theory, the more elongate the catchment is, the slower the runoff from the basin is.

           Calculation: Catchment Area^0.5/Catchment Length

6. Calculate the form factor of the Logan River Watershed.

           Definition: The form factor is another measure of the relationship between catchment area and length. However, unlike the elongation ratio that gives a measure of the shape of the catchment, the form factor provides a measure of the relationship between catchment area and catchment length and it’s effect on hydrology: R f = A/L^2 where R is the form factor, A (km 2 f ) is the catchment area and L (km) is the catchment length along its axis.

        Calculation:  Catchment Area/Catchment Length^2

7. What is the catchment relief of the Logan River Watershed?

           Calculation:  Max elevation-Minimum Elevation of Watershed

8. What is the relief ratio of the Logan River Watershed?

         Definition: This provides a measure of the average drop in elevation per unit length of river: R h = H/L where R h is the relief ratio, H (m) is the maximum catchment relief and L (m) is the basin length along its axis. Note: units of H and L should be the same (e.g. metres), so as to make R h dimensionless.

            Calculation: Relief/Catchment Length

9. What is the drainage density of the Logan River perennial drainage network?

          Definition: Drainage density D/d is measured as the total length of stream channels per unit area of a catchment (e.g. km/km − 2 ). 

           Calculation: Perennial Stream Network (from NHD?)/Catchment Area

           Considerations: In a perfect world we should do this for perennial, vs. intermittent, vs. ephemeral, vs. all combined. And then if we were greedy, we would in VBET (or RME) do riverscape network density too. Perennial is the priority.

 10. What is the drainage pattern of the Logan River drainage network?

           Definition: This refers to the categorical arrangement of the stream network. Would be difficult to do- check out the patterns below.
            https://ebookcentral-proquest-com.dist.lib.usu.edu/lib/usu/reader.action?docID=1032536&ppg=53
jtgilbert commented 8 months ago

@aarditti yeah, this afternoon works for me.

jtgilbert commented 8 months ago

https://shapely.readthedocs.io/en/stable/reference/shapely.minimum_bounding_radius.html

aarditti commented 8 months ago

@jtgilbert I messaged you on Google Chat

joewheaton commented 8 months ago

Thanks both for this. @jtgilbert how realistic is this for next week and just getting examples up for Logan HUC?

jtgilbert commented 8 months ago

@joewheaton I could easily get it done if it just needs to be for an example HUC.

aarditti commented 8 months ago

We could always just add the values to the Logan too.

jtgilbert commented 8 months ago

@joewheaton Do you want me to expose this in business logic now, or hold off?

aarditti commented 8 months ago

Fix RAVE link @alecarditti

jtgilbert commented 8 months ago

Here is the project that has the metrics uploaded to the exchange. Updating business logic to expose this file in the web viewer.

joewheaton commented 8 months ago

Thanks @jtgilbert. This is really helpful.

{
  "catchmentLength": "51.0638756636521",
  "catchmentArea": "646.5600000000001",
  "catchmentPerimeter": "172.3413016540187",
  "circularityRatio": "0.3157122285421035",
  "elongationRatio": "0.49795562498990165",
  "formFactor": "0.24795980445908355",
  "catchmentRelief": "1697.6404",
  "reliefRatio": "33.245427590365544",
  "drainageDensityPerennial": "0.3354283226924029",
  "drainageDensityIntermittent": "0.08941121520044541",
  "drainageDensityEphemeral": "0.7430523523106907",
  "drainageDensityAll": "1.1678918902035391"
}

@jtgilbert can you please confirm units here: https://docs.google.com/spreadsheets/d/1KeV-VIEVYGc_qSHGI1RxNxo5gtnjmLn0zLzLtykwLaw/edit?usp=sharing

@jtgilbert can you confirm that this will be incorporated into the new re-runs of RS_Context? Also, we should think about if there are others. Thanks for your help on this.

jtgilbert commented 8 months ago

@joewheaton units are correct. To come up with some of these I had to use a shapely 2.0 function. Adding metrics in the re-runs is easy enough but we'll have to decide if we want to ditch the ones that need shapely 2.0 or go through the process of upgrading everything before the re-run.

joewheaton commented 8 months ago

@philipbaileynar your thoughts?

aarditti commented 8 months ago

@joewheaton units are correct. To come up with some of these I had to use a shapely 2.0 function. Adding metrics in the re-runs is easy enough but we'll have to decide if we want to ditch the ones that need shapely 2.0 or go through the process of upgrading everything before the re-run.

@jtgilbert I think I missed something in checking. The components of the relief ratio should have the same units, so the metric is dimensionless. I think you have relief in meters and length in km, so you should change length to meters, and it should be 0.033 for the Logan River.

jtgilbert commented 8 months ago

oh good catch @aarditti, I'll update it.