Skip to content

Vaassaa/Canopy_Interception

Repository files navigation

Canopy Interception

Rainfall canopy interception modelling for the AMALIA pilot site (PhD dissertation work, Vaclav Steinbach). The code implements and calibrates the Rutter (1971/1975) canopy interception model to estimate how much rain is intercepted by a forest canopy and how much reaches the ground as throughfall.

What it does

Given open-landscape rainfall and meteorological forcing (temperature, wind, relative humidity, solar radiation), the Rutter model partitions precipitation into:

  • C — water stored on the canopy,
  • E — evaporation from the wet canopy,
  • D — canopy drainage,
  • Tt — throughfall reaching the soil.

Throughfall (rain_tree.in) is then used as a rainfall boundary condition for the DRUtES soil simulations in the sibling calibration projects.

Model parameters

The four calibrated parameters of the Rutter model:

Parameter Symbol Units Meaning
S canopy storage capacity m maximum water the canopy can hold
b drainage exponent 1/m controls drainage rate vs. storage
D_s drainage at saturation m/s reference drainage flux
p free throughfall fraction of rain passing straight through

Workflow

  1. Obtain meteorological forcing. Preferably ERA5 (compatible with the MetData_GRIB_to_TXT project). You need 2 m temperature + 2 m dew temperature, and 10 m u/v wind components. Set the region to match amalie_gps_cords.txt. ERA5 is hourly, so interpolate to the AMALIA measurement step (10 min); the *_interp.in files are the interpolated forcing.
  2. Prepare rainfall. prepRain.py converts measured precipitation CSVs into the .in format (seconds + precipitation [m]), resampled to 10-minute steps. Run it once per gauge (open landscape → rain_free.in, forest → rain_<tree>.in).
  3. Calibrate. calibIntercept.py fits S, b, D_s, p with scipy.optimize.differential_evolution against measured forest throughfall. The objective combines cumulative-volume error, RMSE, and water-balance error. Optimal parameters are written to out/rutter_optimal.txt (the "trusty" file) plus a timestamped copy; every evaluation is logged to de_log.csv.
  4. Compute / plot. computeIntercept.py (and computeIntercept2.py) reload the optimal parameters, run the model, report the water balance, save the simulated throughfall to out/rain_tree.in, and plot open-landscape rain vs. throughfall.

Files

File Purpose
rutter_intercept_calib.py Core Rutter interception model (returns C, Tt, E, D)
calibIntercept.py Differential-evolution calibration of the four parameters
computeIntercept.py Run the model with optimal params, export throughfall + plot
computeIntercept2.py Variant of the compute/plot script
prepRain.py Convert measured precipitation CSV → DRUtES .in format
sensitivity.py Spearman sensitivity heatmap of parameters vs. errors (from de_log.csv)
checkRain.py Quick plot comparing free / beech / spruce rainfall series
showPrecip.py Compare measured precipitation across multiple gauges
drainge_plot.py Plot the canopy drainage curve
results.md Latest calibrated parameter values (spruce & beech)

Data layout

data/<campaign>/        # forcing + rainfall inputs, one dir per measurement campaign
  rain_free.in          # open-landscape rainfall   [s, m]
  rain_spruce.in        # spruce-forest throughfall  [s, m]
  rain_beech.in         # beech-forest throughfall   [s, m]
  temp.in / temp_interp.in   # air temperature (raw / interpolated)
  wind.in / wind_interp.in   # wind speed
  rh.in   / rh_interp.in     # relative humidity
  solar.in                   # solar / net radiation
  time.in                    # ISO datetime stamps
out/                    # results, plots, exported throughfall (git-ignored)
de_log.csv              # per-evaluation calibration log

Running

python3 prepRain.py          # edit the CONFIG block to select campaign / gauge
python3 calibIntercept.py    # calibrate (set `campaign` and forest at top of file)
python3 computeIntercept.py  # run with optimal params and plot
python3 sensitivity.py       # inspect parameter sensitivity

Most scripts are configured by editing the campaign / filename variables near the top rather than via command-line arguments.

Requires Python 3 with numpy, scipy, pandas, and matplotlib.

About

Collection of codes for numerical modeling of canopy interception based on Rutter model (1971).

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages