Skip to content

Remove invalid debug check and integrate GridRiverLake sediment module#485

Merged
CoLM-SYSU merged 6 commits intoCoLM-SYSU:masterfrom
zhongwangwei:master
Mar 21, 2026
Merged

Remove invalid debug check and integrate GridRiverLake sediment module#485
CoLM-SYSU merged 6 commits intoCoLM-SYSU:masterfrom
zhongwangwei:master

Conversation

@zhongwangwei
Copy link
Contributor

Introduce a new MOD_Grid_RiverLakeSediment module implementing sediment transport (suspended load, bedload, erosion, deposition, layer redistribution, diagnostics and NetCDF I/O) and integrate it into the river/lake routing code. Hook points and calls (init, calc, final, forcing_put, diag accumulation, restart I/O, history output) were added to MOD_Grid_RiverLakeFlow and MOD_Grid_RiverLakeHist, with namelist/config flag support and zero-length-allocation patterns to avoid passing unallocated arrays to MPI/assumed-shape routines. Makefile updated to build the new module and establish dependencies; small fix in MOD_Grid_RiverLakeNetwork (correct deallocation variable). Also add run scripts/namelist for canopy interception and update related shared modules to support the integration.

Remove the CoLMDEBUG block that printed a warning when tex_rain+tex_snow+tti_rain+tti_snow exceeded p0 because this check is not valid for the MATSIRO scheme. Add a comment explaining that Rutter exponential drainage drains pre-existing canopy water (ldew), so tex+tti can legitimately exceed p0, and that the true mass-balance check is carried out later (residual check with abort). This avoids spurious debug warnings while preserving the actual mass-balance enforcement.
Introduce a new MOD_Grid_RiverLakeSediment module implementing sediment transport (suspended load, bedload, erosion, deposition, layer redistribution, diagnostics and NetCDF I/O) and integrate it into the river/lake routing code. Hook points and calls (init, calc, final, forcing_put, diag accumulation, restart I/O, history output) were added to MOD_Grid_RiverLakeFlow and MOD_Grid_RiverLakeHist, with namelist/config flag support and zero-length-allocation patterns to avoid passing unallocated arrays to MPI/assumed-shape routines. Makefile updated to build the new module and establish dependencies; small fix in MOD_Grid_RiverLakeNetwork (correct deallocation variable). Also add run scripts/namelist for canopy interception and update related shared modules to support the integration.
Increase MAX_SED_CONC from 0.01 to 0.1 to match CoLM-sed-master. Swap the order of calc_sediment_exchange and apply_sediment_input calls (and their timing counters) so hillslope sediment input is applied after exchange. Update apply_sediment_input to follow CoLM-sed-master behavior: add input to suspended storage when water is sufficient, enforce the MAX_SED_CONC cap, send excess to the bed layer and adjust netflw; deposit directly to the bed for shallow/dry cells. Remove the redundant MAX_SED_CONC capping block from calc_sediment_exchange and apply minor comment/formatting updates.
Large refactor of the sediment module and its interaction with routing:

- Rename/propagate flooded-area variable (fldfrc_sed -> floodarea_sed) and pass it into sediment_diag_accumulate so sediment uses instantaneous flooded area rather than history averages.
- Compute per-routing-period flooded fraction from sed_acc_floodarea inside grid_sediment_calc to preserve routing-period flood exposure for hillslope yield.
- Split sediment processing into morphology step and CFL-limited advection substeps: compute dt_morph and then iterate advection with a global CFL-based dt_adv to ensure numerical stability across MPI workers.
- Revise bedload computation to use an Ashida–Michiue shear-velocity form (coefficient 17) and handle reverse flow using downstream/source cell state.
- Move forward-commit-first strategy and add handling/limiting for reverse fluxes (avail_sto/avail_layer). Ensure stranded sediment is deposited when concentration exceeds MAX_SED_CONC.
- Add new accumulators/diagnostics (sed_acc_floodarea, sed_precip_yield, exch_es_raw/exch_d_raw/exch_es_eff/exch_d_eff, many summed/maxed counters) and corresponding MPI reductions and verbose diagnostic prints to better track exchange and mass balance.
- Change precipitation accumulation: sediment_forcing_put now accumulates the yield power-law term per forcing step (sed_precip_yield) to avoid Jensen bias; sed_precip remains for diagnostics.
- Change calc_critical_shear_velocity API: now returns squared critical shear velocity (cm/s)^2 via calc_critical_shear_vel_sq and adjust callers accordingly.
- Add parameter checks (lambda, CFL, DT_MAX, DEF_SED_IGNORE_DPH) and a new sed_ignore_dph threshold used instead of hard-coded IGNORE_DPH.
- Deposit erosion input directly into bed layer for shallow/dry cells and record resulting netflw change for diagnostics.
- Numerous allocation/initialization/deallocation updates to support new arrays and ensure consistent state.
- Minor text change to history variable label: 'net bed-water exchange flux (incl. shallow deposit)'.

Overall this patch improves numerical stability, preserves routing-period flood/yield fidelity, enhances diagnostics and mass-balance tracking, and updates bedload/exchange implementations.
@CoLM-SYSU CoLM-SYSU merged commit 0cc70e3 into CoLM-SYSU:master Mar 21, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants