---
title: "Scientific basis and interpretation"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Scientific basis and interpretation}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r plot-options, include=FALSE}
knitr::opts_chunk$set(fig.bg = "white", dev.args = list(bg = "white"))
```

The default eight-class scheme implements the depth and velocity thresholds
used by Cordero and Harris (Preprint), with the broader depth-velocity
mesohabitat framework informed by Aadland (1993). Cordero and
Harris define the exact eight rows implemented by the package, including
“Faster than Raceway” and “Faster than Deep Pool.”

Aadland studied fish assemblages, habitat-use and habitat-preference guilds,
and habitat relationships with flow in six Minnesota streams. The original
paper describes six types: shallow pool, slow riffle, fast riffle, raceway,
medium pool, and deep pool. It does not present the package's exact eight-row
SI table, and the package does not attribute the two added high-velocity labels
to Aadland.

The output is a hydraulic classification based on depth and velocity alone. It
does not establish habitat quality or species occupancy. Biological
interpretation can depend on species, life stage, stream type, substrate,
cover, connectivity, water quality, temperature, flow regime, and local field
validation. Raster results also inherit hydraulic-model, terrain, boundary
condition, calibration, and resolution uncertainty. Alignment or interpolation
can move cells across sharp class thresholds.

Users must document how dry cells are encoded. The default `dry_threshold =
NULL` preserves the mathematical scheme, including Class 1 for zero depth and
zero velocity. Classifying median hydraulic surfaces is not the same as taking
the modal class through time. Class IDs are identifiers, not ecological ranks.

## Default classification scheme

```{r scheme-figure, fig.cap="The exact eight-class depth-velocity scheme implemented by hydromeso."}
library(hydromeso)
plot_meso_scheme()
```

## References

- Cordero, E. and Harris, A. (Preprint). *Semi-Supervised and Supervised
  Machine Learning Approaches to Predicting Fluvial Mesohabitats from Satellite
  Data*. SSRN. DOI: `10.2139/ssrn.7100727`.
- Aadland, L. P. (1993). Stream Habitat Types: Their Fish Assemblages and
  Relationship to Flow. *North American Journal of Fisheries Management*,
  13(4), 790–806.
  DOI: `10.1577/1548-8675(1993)013<0790:SHTTFA>2.3.CO;2`.
