This study introduces a Python-based framework for constructing differentiable hydrological models with a modular design to streamline research workflows. The framework integrates five key modules: hydrodataset and hydrodatasource for data preprocessing, hydromodel and torchhydro for traditional and differentiable modeling, and HydroDHM for orchestrating integrated workflows. The data modules automate preparation of diverse datasets, including open-access and proprietary resources. Hydromodel supports process-based model calibration and evaluation, while torchhydro enables neural network integration for differentiable models. HydroDHM coordinates these components through a unified interface for configuring and executing end-to-end modeling pipelines. Case studies in CAMELS basins demonstrate that differentiable models achieve comparable streamflow simulation performance to traditional approaches. By decoupling data handling from model development and providing uv-installable (and pip-compatible) modules, the framework ensures reproducibility, scalability, and adaptability across diverse hydrological contexts.
In data–scarce basins, hydrological models often fail to capture the peak–dominated, nonstationary behaviour of rainfall–runoff events, limiting cross–basin generalization. To reconcile physical interpretability with deep learning capacity, we develop a differentiable Xin’anjiang model (dXAJ) that couples the conceptual XAJ structure with an LSTM network via differentiable programming, and further integrates transfer learning to enhance regional adaptability. Using 663 flood events from 18 diverse basins in Anhui Province, China, we evaluate dXAJ against the XAJ and LSTM under three tiers: data–rich training, zero–shot ungauged transfer, and fine–tuning with limited local data. Regionally trained dXAJ achieves a median KGE of 0.785 on the test set, rising to 0.811 for large floods, confirming robust temporal generalization. In zero–shot transfer, the multi–source pre–trained dXAJ attains a median KGE of 0.694 and a median absolute peak error of 21.4%, with log–regression R2 > 0.90 for peak flows, demonstrating strong spatial transferability. With transfer learning, fine–tuning using only 33% of local events yields a KGE of 0.785 and reduces peak error to 15%, matching full–data performance, indicating that the primary benefit lies in lowering data demand rather than raising the upper bound. Parameter analysis further shows that transfer–learning corrections align with the natural drift induced by expanded data (84% directional consistency, correlation 0.64), confirming a physically consistent parameter space. These findings demonstrate that differentiable hydrological modelling integrated with transfer learning provides a practical, interpretable framework for improving flood prediction and cross–basin generalization in data–scarce regions.
The performance of deep learning-based hydrological forecasting is highly sensitive to input quality, yet existing studies lack a systematic framework to evaluate the impact of high-frequency noise based on hydrological characteristics. To address this, we propose a frequency-based framework to assess the robustness of LSTM runoff prediction models. We define three hydrologically meaningful noise types-long-term trend, short-term event, and transient interference-and employ a synthetic noise injection strategy on the CAMELS dataset. Furthermore, we introduce an adaptive exponentially weighted moving average (AEWMA) algorithm that dynamically adjusts smoothing based on local signal variability. Results from dual-domain evaluation (time and frequency) indicate that model accuracy deteriorates significantly when high-frequency noise exceeds 30% of the total signal energy. Moderate adaptive smoothing (e.g., alpha=0.9&0.6) effectively preserves hydrological signals while mitigating performance loss, whereas aggressive smoothing suppresses meaningful variations. This study underscores the necessity of noise-type-specific preprocessing and suggests spectral energy ratios as quantitative thresholds for adaptive data quality control in hydrological modeling workflows.
Predicting river flow in places without streamflow records is challenging because basins respond differently to climate, terrain, vegetation, and soils. Traditional basin attributes describe some of these differences, but they cannot fully represent the complexity of natural environments. This study examines whether AlphaEarth Foundation embeddings, which are learned from large collections of satellite images rather than designed by experts, offer a more informative way to describe basin characteristics. These embeddings summarize patterns in vegetation, land surface properties, and long-term environmental dynamics. We find that models using them achieve higher accuracy when predicting flows in basins not used for training, suggesting that they capture key physical differences more effectively than traditional attributes. We further investigate how selecting appropriate donor basins influences prediction in ungauged regions. Similarity based on the embeddings helps identify basins with comparable environmental and hydrological behavior, improving performance, whereas adding many dissimilar basins can reduce accuracy. The results show that satellite-informed environmental representations can strengthen hydrological forecasting and support the development of models that adapt more easily to different landscapes.
Real-time flood forecasting is essential for disaster mitigation, yet precipitation forecast biases in intensity and spatiotemporal distribution cause hydrological models to deviate in predicted peak discharge, timing, and hydrograph shape. Incorporating real-time error correction of flood predictions is an effective approach to improving forecast accuracy. This study proposes a flood forecast error-correction framework using Temporal Convolutional Networks (TCN) and Convolutional Neural Networks (CNN) to integrate precipitation information at multiple basin scales. The hybrid CNN-TCN model compensates for limitations of models driven by areal-average rainfall, better capturing the spatiotemporal dynamics of rainfall-runoff processes. Validation across three watersheds demonstrates that the CNN-TCN model achieves the best performance, with average NSE reaching 0.89 and RMSE decreasing to 41.58 m³/s. It significantly outperforms the TCN (NSE=0.85, RMSE=50.36 m³/s) and baseline XAJ (NSE=0.78, RMSE=61.37 m³/s) models, showing clear advantages in peak discharge and hydrograph prediction. Further evaluation using GFS forecast precipitation confirms the proposed framework improves accuracy across different lead times. The CNN-TCN model maintains an average NSE of 0.73, 0.63, and 0.49 for 1-, 2-, and 3-day lead times, respectively, significantly reducing RMSE. Overall, this study highlights deep learning's effectiveness in extracting precipitation-runoff error patterns and emphasizes the critical role of precipitation spatial distribution in error correction, providing reliable support for enhancing real-time forecasting accuracy.
Study region: This study focuses on the Mangla Basin in Pakistan, a data-scarce catchment with limited streamflow observations, where reliable hydrological modeling is challenging. Study focus: We evaluate the potential of transfer learning (TL) to improve streamflow prediction by leveraging pretrained long short-term memory (LSTM) models developed using large-sample datasets, including CAMELS-US (531 basins) and Caravan (similar to 5000 basins). Model performance was assessed using progressively increasing target-basin training data, corresponding to approximately 2-10 years (2000-2014), while validation and testing periods were fixed. New hydrological insights: Results show that under severely limited training data (20%), both local and TL models perform poorly (validation NSE approximate to 0.1-0.3), reflecting insufficient hydrological learning. As training data increases, TL models improve substantially, achieving validation NSE values of 0.89 for CAMELS-US and 0.87 for Caravan-based models at 80% training length, consistently outperforming the local model. At full training length, TL performance declines slightly but remains marginally superior, suggesting local models adapt more to basin-specific dynamics with additional data. Across all scenarios, negative FHV values indicate systematic underestimation of high flows under data scarcity. Overall, findings demonstrate that transfer learning enhances streamflow prediction in data-scarce basins, although its relative advantage diminishes as local data availability increases.
Against the backdrop of climate change, medium- to long-term runoff forecasting is crucial for water resources management. While deep learning models, particularly Long Short-Term Memory (LSTM) networks, have shown substantial promise in unified multi-basin modeling, they struggle to capture the spatially heterogeneous impacts of global- and astronomical-scale teleconnection factors. To address this gap, we propose the Basin-Aware Long Short-Term Memory LSTM (BA-LSTM), which introduces a dynamic feature modulation module based on static basin properties. For the first time, global and astronomical factors are explicitly incorporated into a unified multi-basin modeling framework, equipped with learnable basin-aware weights that modulate the heterogeneous sensitivities of different basins to identical macroscopic forcings. Tested across 669 basins globally, the BA-LSTM achieved a median testing Nash-Sutcliffe Efficiency (NSE) of 0.776, outperforming both local basin-by-basin models with an NSE of 0.706 and traditional global LSTM architectures with an NSE of 0.698, representing improvements of 9.9% and 11.2%, respectively. Spatially, the proposed framework demonstrated exceptional robustness across diverse continental hydro-climatic regimes, effectively mitigating the regional predictive biases inherent in traditional modeling. Furthermore, we demonstrated the model’s strong cross-basin generalization through transfer learning in data-scarce regions of China, specifically the Songhua River and Wu River basins, where a fine-tuning strategy leveraging global pre-trained weights significantly improved predictive reliability over local benchmarks by achieving testing NSE values of 0.791 and 0.874, respectively. Finally, an Integrated Gradients (IG) analysis was conducted to interpret the internal model sensitivity, revealing that basin-scale factors dominate, with precipitation contributing approximately 50% of the relative sensitivity, while explicit multi-scale varying feature importance within the trained BA-LSTM is captured. Our findings provide a robust and interpretable framework for integrating multi-scale forcings into large-sample hydrological modeling.
Amid the ongoing impacts of climate change, the frequency and intensity of extreme precipitation, a key driver of flood disasters, have clearly increased. Currently, primarily focus on large-scale basins, often overlooking spatial heterogeneity within watersheds and rarely offering comprehensive frameworks to reliably analyze future extreme precipitation at the watershed scale. This paper presents a comprehensive and detailed framework for future flood risk assessment, which includes an analysis of the ability of various climate models to simulate extreme precipitation events across different spatial and temporal scales within a basin, the construction of regional climate multi-model ensembles, bias correction, and the development of a flood disaster risk assessment model under future scenarios. The Songhua and Liao River Basin (Songliao Basin) serves as a case study for employing CMIP6 climate models to simulate extreme precipitation, utilizing this framework to evaluate future flood risks. The results reveal that the extreme precipitation indices (Rx5day, R20mm, SDII) exhibit a decreasing pattern in magnitude, extending from the southeast to the northwest of the basin. Additionally, the pattern of flood risk variations across time and space under different development scenarios aligns with the shifts in extreme precipitation indices projected for the period between 2025 and 2099, especially in the SSP5-8.5 scenario, where the high-risk zone with a 100-year return period increases by 8.19 times relative to the historical period. By accounting for regional differences in climate model performance, the framework enhances the reliability of future extreme precipitation predictions, enables the analysis of spatiotemporal flood risk changes under various scenarios, and supports flood mitigation and disaster reduction efforts in the basin.
The topological relationships between hydrological stations and their corresponding catchments within river networks are fundamental for hydrological modeling and analysis. Traditional methods often rely on manual operations or specific hydrological modeling frameworks combined with predefined coding systems, limiting both efficiency and generalizability. This study proposes an efficient, coding-free method to determine the topological relationships among hydrological stations within river networks. The methodology consists of three main steps: First, for each hydrological station, the nearest river segment is identified based on Euclidean distance, the projection point is calculated, and the river segment is segmented and reindexed accordingly. Secondly, the correspondence between river segments and hydrological stations is established by associating each station with its nearest river segment, providing the foundation for topological analysis. Finally, a directed graph constructed from river segments is analyzed to determine the upstream and downstream relationships between hydrological stations. Validation experiments conducted on the Songliao River Basin confirmed the full accuracy of the method. When station coordinates and river network positions are accurate, this method can precisely capture the topological structure. It thus offers a powerful tool for hydrological topology analysis. Compared to traditional approaches, the proposed method achieves performance improvements by several orders of magnitude, offering a practical, coding-independent solution for transboundary water management and providing a computational foundation for real-time flood forecasting systems.
Deep learning has shown great promise in hydrological modeling, especially when large sample data sets are used to capture generalizable patterns across basins. However, challenges remain in addressing data scarcity and ensuring model reliability, particularly when key hydrological observations are modeled as individual tasks. In this study, we shift from traditional single‐task learning (STL) to multi‐task learning (MTL) to leverage the interconnections among hydrological variables and potentially improve modeling outcomes in data‐limited settings. Using a Long Short‐Term Memory (LSTM) neural network with the Catchment Attributes and Meteorology for Large‐Sample Studies data set, we developed an MTL model to predict streamflow and evapotranspiration across 591 basins. The MTL model exhibited comparable predictions for streamflow and evapotranspiration to STL models, with similar spatiotemporal generalization across varying data sizes. MTL's strength appeared when using LSTM cell state probes to predict the non‐target variable, surface soil moisture (SSM), showing slightly higher correlation coefficients. This highlights MTL's ability to capture intrinsic hydrological rules, enhancing model reliability. Leveraging this ability, we further explored MTL's advantages under two data‐limited scenarios: one with less‐observed SSM data and another with no available streamflow data. In both cases, MTL, supported by another well‐observed variable, outperformed STL models by a notable difference. These findings highlight MTL's potential to address the challenges of hydrological modeling in data‐limited basins. As Earth observation data continues to grow, MTL could become a valuable approach for building more reliable and generalizable hydrological models.
This study delves into the integration of hydrological modeling and deep learning, addressing key challenges that arise from data constraints, especially in analyzing basins with limited data samples. In this context, we employ deep transfer learning, leveraging a Long Short-Term Memory (LSTM) network trained on the CAMELS dataset as the foundational source model for transfer learning. Our research focuses on the Duoyingping and Fujiangqiao basins in the upper Three Gorges basin area, aiming to enhance the predictive accuracy and our understanding of deep learning in modeling rainfall-runoff dynamics under data-limited conditions. Our results indicate that the transfer learning approach outperforms a locally trained LSTM model in streamflow prediction during validation periods. Specifically, in the Duoyingping basin, the local deep learning model and the transfer learning model achieved Nash-Sutcliffe Efficiency (NSE) scores of 0.69 and 0.71, respectively, while in the Fujiangqiao basin, they scored 0.56 and 0.62, respectively. Notably, in scenarios with small datasets, the local deep learning model did not exhibit an advantage over physically-based model - the Xin'anjiang model, which achieved NSE scores of 0.65 and 0.63 in the respective basins. Conversely, the transfer learning model demonstrated robust predictive performance in both basins, making it a vital approach for deep learning-based hydrological modeling in contexts of limited data. Additionally, the transfer learning model exhibited minimal weight variation in its transfer module during training, showing consistent weight changes across different hyperparameter training settings. This stability and consistency highlight the effective transferability of knowledge regarding rainfall-runoff relationships from larger datasets, offering a significant advantage for hydrological modeling in basins with limited data availability.
Recent advancements in deep learning (DL) have significantly improved hydrological modeling by extracting generalities from large-sample datasets and enhancing predictive accuracy. However, DL models often rely heavily on large volumes of data, which are often unavailable or insufficient in many real-world hydrological applications. This challenge has prompted interest in integrating DL with physically based hydrological models (PBHMs). This study explores such integration using differentiable programming with the Xin’anjiang model. We introduce two advanced model variants: the differentiable Xin’anjiang model (dXAJ), which retains the Xin’anjiang model’s structure while incorporating Long Short-Term Memory (LSTM) networks for parameter learning, and the dXAJnn model, which replaces the traditional evapotranspiration module of dXAJ model with a neural network. Both models were evaluated against the evolutionary algorithm-calibrated XAJ model (eXAJ) across five basins in the Three Gorge region of China and eight basins from the CAMELS dataset under varying data-limited conditions. Our results showed that both dXAJ and dXAJnn models outperformed the eXAJ model in streamflow prediction accuracy as they have different optimization mechanism, demonstrating that the local optimization mechanism in differentiable models (DMs) tends to generalize better during validation than global optimization approaches in data-limited contexts. The DMs also provided reliable evapotranspiration estimates, even without using evapotranspiration data for calibration. Although the dXAJnn model offered greater flexibility, it did not consistently yield better results and exhibited a tendency toward overfitting in certain basins. The study also found that both models require a minimum of three years of training data (including a one-year warm-up period) to achieve acceptable predictive performance, with longer data records further preventing overfitting. These findings underscore the ability of DMs to effectively balance data-driven techniques and physical mechanisms, highlighting the importance of sufficient training data.
Class Phi(2) (or Class EF2) reduces the voltage stress of a Class E converter by adding an additional LC branch, which increases the complexity of the circuit. This letter proposes an integrated Class Phi(2) converter that uses the bifurcation phenomenon of the impedance matching network of the isolation transformer to eliminate the additional LC of a typical Class Phi(2) (or Class EF2) converter. With bifurcation between the isolation transformer, the resonant circuit can be tuned simultaneously at the first, second, and third harmonics, hence achieving a similar quasi-square voltage waveform. Since fewer components are employed, the additional LC can be removed, reducing complexity in comparison to the typical Class Phi(2) (or Class EF2) converter. A mathematical model has been developed to illustrate the frequency response under the bifurcation status. A 6.78 MHz prototype system has been built to verify the correctness of the mathematical analysis. The experiment demonstrates a lower switch voltage stress similar to the typical Class Phi(2) converter but without using the additional LC. The system has a high efficiency of 90.5% for a megahertz low-power system and exhibits zero-voltage switching independency over the power output range from 3 W to rated 30 W.
漂浮物作为河道表观污染的重要源头,加强漂浮物检测是改善水环境生态质量的重要途径,也是积极落实"河长制"政策的技术手段.由于水面漂浮物具有场景复杂度高、形状不规则及多尺度形态变化等特点,采用传统的图像识别方法快速有效地检测目标具有较大的挑战性.因此,本文提出了一种基于深度学习的实时且稳健的水面漂浮物智能检测方法.首先,基于稀疏分解思想对低质量漂浮物图像进行降噪和增强处理,初步降低复杂水面环境对漂浮物图像质量的影响.其次,以轻量化MobileNetV2网络取代(single shot multibox detector,SSD)算法中的VGG16网络作为骨干网络,在预测层中将深度可分离卷积取代标准卷积,并采用动态特征金字塔网络提高多尺度漂浮物的检测精度,弥补SSD网络中强制不同层学习相同特征的不足.然后,将统一量化卷积神经网络(Quantized-CNN)框架应用于量化SSD检测器的检测误差,进一步加速卷积层计算和压缩全连接层的参数,降低SSD算法的计算复杂度和内存成本.本文在构建的水面漂浮物数据集上进行的实验结果表明:与现有的图像识别算法相比,改进后的SSD检测算法的平均精度(AP)和综合评价指数(F1)分别达到95.86%和94.74%,在硬件GPU下的检测速度达到64.23 FPS,检测算法的参数计算量减少到0.75×109,模型内存成本压缩到6.27 MB.改进SSD算法实现了水面漂浮物检测的高精度和高效率.
Despite advances in hydrological Deep Learning (DL) models using Single Task Learning (STL), the intricate relationships among multiple hydrological components and model inputs might not be comprehensively encapsulated. This study employed a Long Short-Term Memory (LSTM) neural network and the CAMELS dataset to develop a Multi-Task Learning (MTL) model, predicting streamflow and evapotranspiration across multiple basins. An optimal multi-task loss weight ratio was determined manually during the validation phase for all 591 selected basins with streamflow data-gaps under 5%. During test period, MTL showed median Nash-Sutcliffe Efficiency predictions for streamflow and evapotranspiration at 0.69 and 0.92, consistent with two STL models. The MTL’s strength appeared when predicting the non-target variable, surface soil moisture, using probes derived from LSTM cell states—representative of the internal DL model workings. This prediction showed a median correlation coefficient of 0.90, surpassing the 0.88 and 0.89 achieved by the streamflow and evapotranspiration STL models, respectively. This outcome suggests that MTL models could reveal additional rules aligned with hydrological processes through the inherent correlations among multiple hydrological variables, thereby enhancing their reliability. We termed this as “variable synergy,” where MTL can simultaneously predict varied targets with comparable STL performance, augmented by its robust internal representation. Harnessing this, MTL promises enhanced predictions for high-cost observational variables and a comprehensive hydrological model.
Advanced microfabrication on small and curved fiber surfaces remains a critical challenge and an urgent need to develop high-performance fiber-shaped electronics and advance the next generation of wearable electronics technology. In this study, we propose the preparation of 1D stretchable fiber-shaped electronics via inkjet printing technology for wearable applications. Utilizing self-built precision rotary inkjet printing equipment and a surface chemical modification process, we achieve high-precision and customizable microfabrication onto ultra-low diameter fiber surfaces (minimum printing line width of 133 mu m and a printable fiber diameter as low as 500 mu m with a large curvature of 4000 m-1). More importantly, this fabricating method is non-destructive and can prepare 1D stretchable conductors by printing conductive inks with stretchable structures and optimizing various synthetic fibers, which exhibit remarkable conductivity, mechanical stability, and strain-insensitive properties in practical applications. Furthermore, we demonstrate the performance of several 1D stretchable electronics applications, including a fiber-shaped electrothermal device, triboelectric strain sensor, and super-capacitor. Our work will greatly promote the development of 1D fiber-shaped electronics and smart textiles with wearability, high performance, functional diversification, and low cost.
The concentration of dissolved oxygen (DO), an important measure of water quality and river metabolism, varies tremendously in time and space. Riverine DO is commonly perceived as regulated by interacting and competing drivers (light, temperature and flow) that define rivers' climate. Its continental-scale drivers, however, have remained elusive, partly due to the scarcity and spatio-temporal inconsistency of water quality data. Here we show, via a deep learning model (long short-term memory) trained using data from 580 rivers, that temperature predominantly drives daily DO dynamics in the contiguous United States. Light comes a close second, whereas flow imparts minimal influence. This work showcases the promise of using deep learning models for data filling that enables large-scale systematic analysis of patterns and drivers. Results show fairly accurate prediction of DO by temperature alone, and declining DO in warming rivers, which has important implications for water security and ecosystem health in the future climate.
Integrating self-powered sensors or energy harvesters with everyday clothes brings a novel insight into wearable electronics and improves personal intelligence in the era of the Internet of Things. This work develops a customizable screen-printed textile triboelectric nanogenerator (SPT-TENG) for biomechanical energy harvesting and human-interactive applications. The as-fabricated textile TENG not only presents excellent wearing experiences such as lightweight, permeability, and washability, but also exhibits high electrical output performance to power sustainably some portable electronics such as a watch or calculator. The system-level wearable human-interactive applications, including a wireless keyboard and a smart home appliance control, are also demonstrated with the advantages of cyber security, easy operation, low cost, and wearability through screen-printing pattern-customized TENG arrays. Benefiting from these features, the SPT-TENG shows promising applications in wearable electronics, human-machine interfaces, and artificial intelligence.
Floating objects are important sources of apparent pollution in a river. Strengthening the detection of floating objects is an important step to improve the ecological quality of the water environment, and it is also a technical means to actively implement the “river chief system” policy. Because floating objects on the water have the characteristics of high scene complexity, irregular shapes, and multi-scale morphological changes, it is challenging to use traditional image recognition methods to detect targets quickly and effectively. In this paper we propose a real-time and robust intelligent detection method for floating objects on the water surface based on deep learning. First, the low-quality floating objects image is denoised and enhanced based on the sparse decomposition idea, which reduces the impact of the complex water surface environment on the image quality of the floating objects. Secondly, lightweight MobileNetV2 is selected as the backbone of a single shot multi-box detector (SSD), and standard convolution is replaced by depthwise separable convolution in the prediction layers. A dynamic feature pyramid network (DyFPN) is adopted at extra low cost to improve the detection precision of multi-scale objects and to make up for the deficiency of SSD to force different network layers to learn the same features. More significantly, the unified quantized convolutional neural network (Quantized-CNN) framework is applied to quantifying the error correction of the improved detector for further accelerating the computation of convolutional layers and compressing the parameters of fully connected layers to reduce the computational complexity and memory cost of the SSD algorithm. The experimental results conducted in this paper on the constructed water surface floating objects data set show that: Compared with the existing image recognition algorithm, the improved SSD detection algorithm has an average accuracy (AP) and comprehensive evaluation index (F1) score of 95.86% and 94.74%. The detection speed under the hardware GPU reaches 64.23 FPS. The parameter calculation of the detection algorithm is reduced to only 0.75×109, and the size of the model is compressed into 6.27 MB. The improved SSD algorithm achieves high accuracy and efficiency in the detection of floating objects on the water surface.