Skip to content

Spatial Parameters

Manjaree Binjolkar edited this page Jan 2, 2026 · 7 revisions

Spatially varying model parameters are provided via a CSV file specified in config.yaml under the parameters.spatially_varying_file field. This file contains per-stream physical properties required by Model204 to compute infiltration, percolation, evapotranspiration, snowmelt, and runoff.

Each row represents a single stream link, and column names must match exactly as listed below. The model directly reads these columns, applies unit conversions internally, and uses them in the ODE system.


Required CSV Columns

  • stream Unique identifier for each stream link.

  • next_stream ID of the downstream link (optional to pass it to the runoff model).

  • drainage_area_km2 Total drainage area for the link $km²$. (Loaded but not directly used for runoff calculations.)

  • length_km Channel length $km$. Converted to meters internally.

  • area_sqkm Total hillslope area draining into the link $km²$. Converted to m² internally.

  • centroid_lon, centroid_lat Longitude and latitude of the hillslope centroid $degrees$. Used in potential evapotranspiration (HamonPET) calculations.

  • hu Depth of the static soil storage tank (Hu) $mm$. Converted to meters internally.

  • i2, i3 Infiltration (i2) and percolation (i3) rates $mm/hr$.

  • sw, ss Relative soil moisture at wilting point (sw) and at stomatal closure (ss) $unitless$. Used to compute actual evapotranspiration (ETactual).

  • n Manning’s roughness coefficient (n_mann) $unitless$, used to calculate surface runoff velocity.

  • slope Average hillslope gradient $m/m$.

  • res_ss, res_gw Residence time in the subsurface storage (res_ss) and groundwater storage (res_gw) $days$. Converted to minutes (alpha3, alpha4) for use in the ODE solver.

  • melt Degree-day snowmelt factor $mm/day/°C$. Internally converted to $m/min/°C$.

  • t_thres Temperature threshold for snow accumulation $°C$.


Insights from Model Code

  • The parameter c1 is a fixed conversion factor (0.001 / 60) used to convert precipitation rates from mm/hr to m/min.

  • infil and perco are computed from i2 and i3 respectively after applying the c1 conversion.

  • Snow processes depend on melt (degree-day factor) and t_thres (accumulation threshold) parameters. Snowmelt is limited by available snowpack and temperature. When the temperature falls below t_thres, all precipitation is stored as snow. If the temperature exceeds the melting threshold (melt_thr = 0°C), snowmelt occurs at a rate proportional to the temperature (temperature * melt_f).

Importantly, the snowmelt rate is limited by the available snowpack (h_snow), ensuring that melting cannot exceed the existing snow storage.

  • Hu defines the static tank’s maximum soil moisture storage. Excess water above this depth is routed to surface runoff unless the ground is frozen.

  • Evapotranspiration is computed using HamonPET with lat (and implicitly doy) as inputs, while sw and ss define how soil moisture stress modifies the actual ET (ETactual).

  • Residence times res_ss and res_gw control water release rates from gravitational and groundwater storages.

  • The file must have all parameters with correct units* to avoid runtime errors.


Example Spatial Parameters File

This file is located at data/Stony_Brook/Stony_Brook_spatial_params.csv.

stream,next_stream,drainage_area_km2,length_km,area_sqkm,centroid_lon,centroid_lat,hu,i2,i3,sw,ss,n,slope,res_ss,res_gw,melt,t_thres
420558772,420558773,0.112,0.33,0.112,-74.79066176,40.31169117647059,178,4,1.6,0.11,0.33,0.1,0.02,2,55,3.7,0
420557886,420558773,0.086,0.21,0.086,-74.78842949,40.31451923076923,178,4,1.6,0.11,0.33,0.1,0.02,2,55,3.7,0
420553620,420553417,0.761,1.358,0.761,-74.79696121,40.32966235632185,178,4,1.6,0.11,0.33,0.1,0.02,2,55,3.7,0
420553824,420553417,0.053,0.117,0.053,-74.78989583,40.33020833333335,178,4,1.6,0.11,0.33,0.1,0.02,2,55,3.7,0

Clone this wiki locally