Model Architecture模型架构
The national distributed differentiable hydrologic model consists of three coupled components: a 3-km gridded GR4J differentiable runoff-generation operator, a 1-km gridded Muskingum differentiable routing operator, and a neural-network (NN)-based spatiotemporal dynamic parameter adapter. The differentiable runoff-generation operator converts daily precipitation, air temperature, and potential evapotranspiration into gridded runoff; the differentiable routing operator propagates runoff through channels following the topology of the 1-km river network; and the spatiotemporal dynamic parameter adapter generates parameter fields that vary in space and time from grid attributes and daily hydrometeorological states. Embedding all three components within a single end-to-end neural-network framework allows streamflow errors at basin outlets to be backpropagated layer by layer to the parameter adapter. This enables spatiotemporally adaptive learning of runoff-generation and routing parameters, overcoming the homogenized and static limitations of conventional parameter-calibration methods.
全国分布式可微分水文模型由 3 km 网格 GR4J 可微分产流算子、1 km 网格马斯京根可微分汇流算子和基于神经网络(NN)的参数时空动态适配器等 3 个相互耦合的部分组成。可微分产流算子负责将逐日降水、气温和潜在蒸散发转化为网格产流;可微分汇流算子按照 1 km 河网拓扑对产流量进行河道演进;参数时空动态适配器则根据网格属性以及逐日水文气象状态生成时空变化的参数场。将三者嵌入同一个端到端的神经网络框架内,可实现流域出口断面流量误差向参数适配器的逐级反向传播,进而实现模型产汇流参数的时空自适应学习,破除以往参数率定方法“均一化、静态化”的局限。
Architecture of CDLM extracted from the manuscript. The 3-km GR4J differentiable runoff-generation operator, 1-km Muskingum differentiable routing operator, and NN-based spatiotemporal dynamic parameter adapter are integrated into one end-to-end computational graph.
图为论文中的 CDLM 模型架构。3 km 网格 GR4J 可微分产流算子、1 km 网格马斯京根可微分汇流算子和基于 NN 的参数时空动态适配器被整合在同一个端到端计算图中。
Core Ideas核心思想
Physics-encoded differentiability物理过程可微化
Instead of treating runoff generation and routing as black-box predictors, CDLM implements GR4J and Muskingum equations as differentiable recurrent operators. This keeps the model interpretable while allowing gradient-based training at national scale.
CDLM 不将产流和汇流视为黑箱预测器,而是将 GR4J 与马斯京根方程实现为可微分递归算子,在保留物理可解释性的同时支持全国尺度的梯度优化训练。
Spatiotemporal parameter adaptation参数时空动态适配
The NN-based adapter uses grid and river-reach attributes together with daily hydrometeorological states to generate parameter fields that vary in space and time, replacing homogenized and static parameter calibration with adaptive learning.
基于 NN 的适配器综合网格与河段属性及逐日水文气象状态,生成随空间和时间变化的参数场,以自适应学习取代“均一化、静态化”的传统参数率定。
Runoff-routing coupling产汇流联合建模
Runoff from 3-km cells is mapped to a 1-km river network and routed downstream. The runoff-generation and routing parameters are learned jointly through the same end-to-end computational graph rather than calibrated as isolated components.
3 km 网格产流被映射到 1 km 河网并向下游汇流。产流与汇流参数通过同一个端到端计算图联合学习,而不是作为彼此独立的模块进行率定。
National training data全国尺度训练数据
The framework uses streamflow observations from 1,167 near-natural gauges in China to learn the spatiotemporal parameter adapter and evaluate spatial transfer performance.
该框架利用中国 1,167 个近自然水文站流量观测学习参数时空动态适配器,并评估模型在空间迁移和无资料流域模拟中的表现。
CDLM Code ArchiveCDLM 代码归档
cdlm.zip
ZIP
The active public download will be enabled upon manuscript acceptance.
论文接收后将开放公众下载。
- cdlm.zip124 KB2026-06-04 15:55
- upload/-2026-06-04 15:52
- README.md1.9 KB2026-06-04 15:47
- pyproject.toml390 B2026-06-04 15:47
- configs/-2026-06-04 15:46
- train_example.toml1.8 KB2026-06-04 15:46
- data/-2026-06-04 15:47
- README.md906 B2026-06-04 15:47
- sample/-2026-06-04 15:47
- .gitkeep1 B2026-06-04 15:47
- scripts/-2026-06-04 15:47
- build_pm_forcing_cache.sh248 B2026-06-04 15:47
- export_checkpoint_outputs.sh230 B2026-06-04 15:47
- train.sh2.4 KB2026-06-04 15:47
- src/-2026-06-04 15:44
- diff_gr4j_reachkx/-2026-06-04 15:49
- __init__.py1.4 KB2026-05-30 12:51
- attributes.py7.3 KB2026-05-30 12:51
- build_3k_cell_attributes.py2.8 KB2026-06-04 14:12
- build_basin_attributes.py929 B2026-05-30 12:51
- build_basin_hierarchy.py2.6 KB2026-06-04 14:13
- build_basin_runoff_attributes.py3.4 KB2026-05-30 12:51
- build_forcing_cache.py2.1 KB2026-06-04 14:12
- build_obs_tensor.py6.4 KB2026-05-30 12:51
- build_pm_pet_cache.py1.7 KB2026-05-30 12:51
- build_precip_seasonality.py8.5 KB2026-05-30 12:51
- build_reach_attributes.py9.4 KB2026-06-04 14:12
- build_runoff_signature_target.py6.2 KB2026-06-04 14:12
- compute_detailed_station_metrics.py10.6 KB2026-05-31 10:17
- compute_metrics_from_streamflow.py9.3 KB2026-05-30 12:51
- config.py2.7 KB2026-05-30 12:51
- data_config.py4.5 KB2026-06-04 15:45
- export_checkpoint_outputs.py25.6 KB2026-06-04 14:13
- forcing.py25.4 KB2026-05-30 12:51
- gr4j.py5.7 KB2026-05-30 12:51
- graph.py18.5 KB2026-05-30 12:51
- hierarchy.py9.6 KB2026-06-04 14:18
- import_fortran_muskingum.py4.2 KB2026-06-04 14:13
- losses.py1.8 KB2026-05-30 12:51
- model.py7.5 KB2026-05-30 12:51
- obs.py3.5 KB2026-05-30 12:51
- params.py28.4 KB2026-06-04 14:12
- remap.py4.0 KB2026-05-30 12:51
- routing.py5.9 KB2026-05-30 12:51
- routing_numba.py27.7 KB2026-05-30 12:51
- run_national_mean_runoff.py24.3 KB2026-06-04 14:15
- scale.py18.9 KB2026-05-30 12:51
- snow.py4.4 KB2026-05-30 12:51
- training.py19.8 KB2026-06-04 01:46
- training_index.py6.0 KB2026-05-30 12:51
- train_joint.py70.4 KB2026-06-04 15:48
- train_joint_ddp_windows.py70.1 KB2026-06-04 15:48
- validate_checkpoint.py10.5 KB2026-06-04 14:13
Preprint预印本
Dong, N., et al. (2026). Enhancing National High-Resolution Distributed Hydrological Modeling with Physics-Encoded Differentiable Regionalization. ESS Open Archive preprint.
For questions, contact: Ningpeng Dong / 董宁澎 (ndong1993@163.com).