This study developed an algorithm to predict algal blooms in river systems by integrating the two-dimensional CE-QUAL-W2 water quality
model with optimization techniques. The study area was the Nakdong River system in South Korea, and the model was constructed for
eight multipurpose weir sections. Sensitivity analysis was used to identify key parameters influencing algal concentrations, and an optimization
algorithm was developed using the bagging ensemble method. The algorithm aimed to minimize the relative error (%Difference) between
simulated and observed chlorophyll-a concentrations, which served as the target variable. The model achieved a “Very Good” rating in the
overall efficiency assessment across all target weir sections. Furthermore, a separate evaluation of temporal algal trends was conducted, which
showed that while some sections received a 'Poor' rating during low-concentration periods, most sections achieved a 'Good' or higher rating
overall. In addition, the model effectively captured temporal patterns and spatial heterogeneity, demonstrating its adaptability to complex
hydrodynamic conditions. By integrating machine learning techniques into the physically-based modeling framework, the proposed algorithm
is expected to enhance model reliability and improve optimization efficiency. These improvements are applicable to water quality prediction
and management systems.