The Canadian Hydrological Model
A novel modular unstructured mesh based approach for hydrological modelling.
https://github.com/chrismarsh/chm
Category: Hydrosphere
Sub Category: Freshwater and Hydrology
Keywords from Contributors
earth-system-model
Last synced: about 18 hours ago
JSON representation
Repository metadata
The Canadian Hydrological Model
- Host: GitHub
- URL: https://github.com/chrismarsh/chm
- Owner: Chrismarsh
- License: gpl-3.0
- Created: 2014-07-01T20:51:22.000Z (almost 11 years ago)
- Default Branch: develop
- Last Pushed: 2025-04-08T20:48:06.000Z (20 days ago)
- Last Synced: 2025-04-10T06:39:35.226Z (18 days ago)
- Language: C++
- Homepage:
- Size: 89.3 MB
- Stars: 40
- Watchers: 10
- Forks: 26
- Open Issues: 17
- Releases: 29
-
Metadata Files:
- Readme: README.md
- License: LICENSE
README.md
[!WARNING]
The default branch was renamed frommaster
todevelop
.Develop
will always be in a state of development
with tags serving to marke quasi-stable releases
The Canadian Hydrological Model
The Canadian Hydrological Model (CHM) is a novel modular unstructured mesh based approach for hydrological modelling. It can move between spatial scale, temporal scale, and spatial extents. It is designed for developing and testing process representations for hydrological models.
Usage
Details on how to use CHM, as well as more implimentation details, can be found in the documentation.
Motivation
Modelling of hydrological processes at any scale is hampered by large uncertainties in parameters and forcing data, incomplete process representations (the scientific conceptualization of a phenomena codified numerically), and arbitrary process representation selections and linkages (collectively ‘model structure’). There is also consistent difficulty or an inability to easily test and estimate the uncertainty due to variations in model structure, parameter values, number of parameters, forcing data requirements, and spatial discretization requirements (collectively ‘model complexity’).
In this work, a new distributed model framework is presented that can examine a variety of process representations, process linkages and levels of model complexity. Algorithms can be easily interchanged, removed, and decoupled while preserving the underlying model framework. Thus, uncertainty propagation and subsequent feedbacks within the model structure can be quantified. Unstructured meshes represent the spatial heterogeneity of surface and sub-surface features in a computationally efficient manner and also decreases number of parameters and initial conditions. The parallel architecture allows for efficient uncertainty testing of parameter ranges. By utilizing unstructured meshes, fewer than 5% of the computational elements of high-resolution structured (raster) grids are usually necessary. This preserves surface and sub-surface heterogeneity but results in fewer parameters and initial conditions.
Design goals
- Multi-scale, multi-physics, variable complexity and domain model
- Assessment of model structural, parameter, and data uncertainty
- Easily test multiple hypotheses, avoid rigid model structures
- Incorporate existing code
- Contribute to decision support systems
Publications
The following publications provide an overview of CHM and its capabilities
- V. Vionnet, Marsh, C.B., B. Menounos, S. Gascoin, N.E. Wayand, J. Shea, K. Mukherjee, and J.W. Pomeroy. Multi-scale snowdrift-permitting modelling of mountain snowpack. The Cryosphere Discussions, 2020:1--43, 2020.
- Marsh, C.B., J.W. Pomeroy, and H.S. Wheater. The Canadian Hydrological Model (CHM) v1.0: a multi-scale, multi-extent, variable-complexity hydrological model – design and overview. Geoscientific Model Development, 13(1):225--247, 2020.
- Marsh, C.B, J. W. Pomeroy, R.J. Spiteri, and H.S Wheater. A Finite Volume Blowing Snow Model for Use With Variable Resolution Meshes. Water Resources Research, 56(2), 2020.
- Marsh, C.B, R. J. Spiteri, J.W. Pomeroy, and H.S. Wheater. Multi-objective unstructured triangular mesh generation for use in hydrological and land surface models. Computers & Geosciences, 119:49--67, 2018.
Features
Spatial Scales
CHM is applicable to multiple scales from the basin scale, to the provincial/state scale and beyond. It may also be applied at a single point-scale.
Visualization
Output is in the vtu file format, allowing for visualization, analysis, and timeseries animation in ParaView. Date-time support has been added to ParaView via an filter .
netCDF support
Input meterology may be either in a standard ASCII file, or as a netCDF file allowing for ease of use when using climate model outputs.
The below figure shows virtual stations that correspond to the center of the 2.5 km GEM numerical weather prediction output in netCDF format.
Process representations
Process represetenation will be extented to include the entirety of the hydrological cycle. However, current representation includes mostly surface and cold regions processes
Process | Module |
---|---|
Canopy | Open/forest (exp/log) (Pomeroy et al., 1998; Ellis et al., 2010) |
Snowpack | 2-layer Snobal (Marks et al, 1999); Multi-layer Snowpack (Lehning et al., 1999); Various albedo e.g., CLASS (Verseghy 1991) |
Soil | Frozen soil infiltration (Gray et al., 2001) |
Mass redistribution | PBSM3D (Marsh et al, 2018 in review); Snowslide (Bernhardt 2010) |
Input meterology is spatially interpolated and down-scaled from the input station or virtual-station (e.g., from numerical weather prediction) to produce a spatially distributed driving dataset. There are a number of ways to downscale these meterology.
Variable | Type |
---|---|
Air temperature | Linear lapse rates (measured, seasonal, constant, neutral stability) (Kunkel, 1989, Dodson et al., 1997) |
Relative humidity | Linear lapse rates (measured, seasonal, constant) (Kunkel, 1989) |
Horizontal wind | Topographic curvature (Liston, et al., 2006); Mason-Sykes (Mason and Sykes, 1979); uniform wind |
Precipitation | Elevation based lapse (Thornton, 1997) |
Precipitation Phase | Linear; Psychometric (Harder and Pomeroy, 2013); Threshold |
Solar radiation | Terrain shadows (Marsh et al., 2011, Dozier and Frew, 1990); Clear sky transmittance (Burridge, 1975); Transmittance from observations; Cloud fraction estimates (Walcek, 1994); Direct/diffuse splitting (Iqbal, 19xx) |
Longwave | T, RH based (Sicart et al., 2006); Constant (Marty et al., 2002) |
Unstructured mesh
CHM uses an unstructured triangular mesh to representent the terrain. This mesh is generated by , a novel multi-objective unstructured mesh generation software that allows mesh generation to be generated from an arbitrary number of hydrologically important features while maintaining a variable spatial resolution. Triangle quality is guaranteed as well as a smooth graduation from small to large triangles. Including these additional features resulted in a better representation of spatial heterogeneity versus classic topography-only mesh generation while significantly reducing the total number of computational elements.
Parallel computing
In CHM, parallelism is currently implemented via the shared memory API OpenMP. As described above, modules may either be point-scale models that are applied to each triangle independently or require knowledge of the surrounding triangles. Mixing these two types of parallelism complicates the implementation of parallel code. To provide as much seamless parallelism as possible to the modules, each module declares the type of algorithm it is: data parallel or domain parallel. Data parallel modules are point-scale models that are applied to every triangle. Domain parallel modules are modules that require knowledge of surrounding mesh points. Thus, after the topological sort is performed to determine module execution order, the modules are scheduled together into groups that share a parallelism type
Uncertainty analysis
A key feature of CHM is the ability to, on the command line, change any value specified by a configuration parameter. CHM provides a seamless mechanism to easily allow modules to obtain parameter data from configuration files.
import subprocess
import shutil
prj_path = "CHM.config"
cf1 = "-c output.VistaView.file:vv_dodson.txt"
cf2 = "-c output.UpperClearing.file:uc_dodson.txt"
cf3 = "-c output.FiserraRidge.file:fr_dodson.txt"
cf4 = "--add-module Dodson_NSA_ta"
subprocess.check_call(['./CHM %s %s %s %s %s' % (prj_path, cf1, cf2, cf3,cf4)], shell=True)
Demonstration
SnowCast
SnowCast is an experimental, daily data product that uses the Global Environmental Multiscale (GEM) model forecasts from Environment and Climate Change Canada (ECCC) to drive the Canadian Hydrological Model (CHM). Estimates of snowpack are provided over the a Bow River Basin, centered over Banff, Canada.
SnowCast is developed as part of Global Water Futures and the Centre for Hydrology, University of Saskatchewan.
Large extent
Hourly solar radiation modelling for the territory of Yukon, Canada.
Point scale
Comparison of CHM driving Snobal and Snowpack at the Upper Clearing site at Marmot Creek Research Basin in Alberta, Canada
Blowing snow
Blowing snow for a small sub-basin of Wolf Creek Reserach Basin, located in the Yukon, Canada.
Owner metadata
- Name: Chris Marsh
- Login: Chrismarsh
- Email:
- Kind: user
- Description: Research Scientist @ Environment and Climate Change Canada. Computational hydrologist.
- Website: chrismarsh.ca
- Location: Canada
- Twitter:
- Company: Environment and Climate Change Canada
- Icon url: https://avatars.githubusercontent.com/u/630436?u=e6aee5ab31db89fe64c8e203910f8735f6c21e82&v=4
- Repositories: 64
- Last ynced at: 2024-06-11T15:59:30.185Z
- Profile URL: https://github.com/Chrismarsh
GitHub Events
Total
- Create event: 14
- Issues event: 2
- Release event: 13
- Watch event: 2
- Delete event: 1
- Issue comment event: 2
- Push event: 24
- Pull request event: 1
- Fork event: 1
Last Year
- Create event: 14
- Issues event: 2
- Release event: 13
- Watch event: 2
- Delete event: 1
- Issue comment event: 2
- Push event: 24
- Pull request event: 1
- Fork event: 1
Committers metadata
Last synced: 8 days ago
Total Commits: 2,176
Total Committers: 14
Avg Commits per committer: 155.429
Development Distribution Score (DDS): 0.141
Commits in past year: 99
Committers in past year: 3
Avg Commits per committer in past year: 33.0
Development Distribution Score (DDS) in past year: 0.02
Name | Commits | |
---|---|---|
Chris Marsh | c****2@g****m | 1869 |
Kevin Green | k****n@g****m | 163 |
NicWayand | n****y@g****m | 83 |
VVionnet | v****t@g****m | 39 |
Shawn McAdam ssm259 | s****9@u****a | 9 |
Chris Marsh | c****h@g****t | 3 |
Shawn Samuel Carl McAdam | S****n@S****l | 2 |
Vincent Vionnet | v****t@u****a | 2 |
Andre Bertoncini | a****i@g****m | 1 |
Binben Wang | b****4@g****m | 1 |
Joachim Meyer | j****r@b****u | 1 |
Shawn McAdam | 5****9 | 1 |
phillip-harder | h****p@g****m | 1 |
Chris Marsh | c****c@g****m | 1 |
Committer domains:
Issue and Pull Request metadata
Last synced: 2 days ago
Total issues: 126
Total pull requests: 77
Average time to close issues: 7 months
Average time to close pull requests: 16 days
Total issue authors: 3
Total pull request authors: 5
Average comments per issue: 1.74
Average comments per pull request: 1.34
Merged pull request: 64
Bot issues: 0
Bot pull requests: 0
Past year issues: 1
Past year pull requests: 3
Past year average time to close issues: N/A
Past year average time to close pull requests: 11 days
Past year issue authors: 1
Past year pull request authors: 3
Past year average comments per issue: 2.0
Past year average comments per pull request: 0.0
Past year merged pull request: 2
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- NicWayand (78)
- Chrismarsh (47)
- djmallum (1)
Top Pull Request Authors
- NicWayand (58)
- Chrismarsh (16)
- shawn-mcadam (1)
- djmallum (1)
- jomey (1)
Top Issue Labels
- enhancement (20)
- bug (8)
- invalid (2)
Top Pull Request Labels
Dependencies
- breathe <4.13.0
- exhale *
- FranzDiebold/github-env-vars-action v2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- allenevans/set-env v2.0.0 composite
Score: 6.682108597449808