Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Interception Module #286

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Add Interception Module #286

wants to merge 9 commits into from

Conversation

jarq6c
Copy link
Collaborator

@jarq6c jarq6c commented Mar 6, 2025

Adds a module to compute basic estimates of canopy interception using reasonable defaults from literature.

Additions

  • compute_canopy_saturation
  • compute_trunk_saturation
  • compute_canopy_loss
  • compute_trunk_loss
  • compute_interception

Removals

Changes

Testing

Notes

Todos

Checklist

  • PR has an informative and human-readable title
  • PR is well outlined and documented. See #12 for an example
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows project standards (see CONTRIBUTING.md)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output) using numpy docstring formatting
  • Placeholder code is flagged / future todos are captured in comments
  • Reviewers requested with the Reviewers tool ➡️

@jarq6c jarq6c added the enhancement New feature or request label Mar 6, 2025
@jarq6c jarq6c requested a review from hellkite500 March 6, 2025 19:55
@jarq6c jarq6c self-assigned this Mar 6, 2025

## Interception

The `hydrotools.events.models.interception` module includes a basic method that estimates canopy interception. The method includes reasonable defaults from the literature for average evaporation rates and trunk fractions. The primary point of entry is the `compute_interception` method which estimates canopy intercepted rainfall in units of depth. `compute_interception` requires a gross rainfall amount, an average rain rate, and a canopy fraction. The defaults assume that gross rainfall is in mm, rainfall rate in in mm/h, and canopy fraction is dimensionless. While this method can be used in different contexts, expected usage is for event-scale (single storm) catchment-wide estimates of intercepted rainfall.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `hydrotools.events.models.interception` module includes a basic method that estimates canopy interception. The method includes reasonable defaults from the literature for average evaporation rates and trunk fractions. The primary point of entry is the `compute_interception` method which estimates canopy intercepted rainfall in units of depth. `compute_interception` requires a gross rainfall amount, an average rain rate, and a canopy fraction. The defaults assume that gross rainfall is in mm, rainfall rate in in mm/h, and canopy fraction is dimensionless. While this method can be used in different contexts, expected usage is for event-scale (single storm) catchment-wide estimates of intercepted rainfall.
The `hydrotools.events.models.interception` module includes a basic method that estimates canopy interception. The method includes reasonable defaults from the literature for average evaporation rates and trunk fractions. The primary point of entry is the `compute_interception` method which estimates canopy intercepted rainfall in units of depth. `compute_interception` requires a gross rainfall amount, an average rain rate, and a canopy fraction. The defaults assume that gross rainfall is in mm, rainfall rate is in mm/h, and canopy fraction is dimensionless. While this method can be used in different contexts, expected usage is for event-scale (single storm) catchment-wide estimates of intercepted rainfall.

mm (Miralles et al, 2010). Notated $S_c$. Expected to vary little by
location and leaf type (± 0.4 mm, standard deviation). Measurement
units should correspond to rainfall_rate (i.e. if rainfall_rate is in
mm/hour, then canopy_storate should be in mm).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
mm/hour, then canopy_storate should be in mm).
mm/hour, then canopy_storage should be in mm).

rainfall_rate: float, required
Mean rainfall rate in L/T, typically mm/hour. Notated 'R'.
canopy_storage: float, required
Minimum depth of water required to saturate the canopy. Typically 1.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this parameter has a "typical" value with little expected variance, could it be made an optional arg with 1.2 the default?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I chose to make these optional for the top level method, but required for the lower level methods. I figured it would be easier to maintain that way. I guess I could add another layer (module or object) to store the default values, then point all these parameters at that.

0.02 (Miralles et al, 2010). Notated $\\epsilon$. Unitless. Valid
range is [0.0, 1.0)
evaporation_rate: float, required
Average evaporation rate. Typically 0.3 mm/hour (Miralles et al, 2010).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another one to consider for optional with a default value

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the larger problem there though is dealing with unit reconciliation...


Parameters
----------
gross_rainfall: float, require
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
gross_rainfall: float, require
gross_rainfall: float, required

mm (Miralles et al, 2010). Notated $S_c$. Expected to vary little by
location and leaf type (± 0.4 mm, standard deviation). Measurement
units should correspond to rainfall_rate (i.e. if rainfall_rate is in
mm/hour, then canopy_storate should be in mm).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
mm/hour, then canopy_storate should be in mm).
mm/hour, then canopy_storage should be in mm).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants