2.1. Study Area and Data
The PCJ River Basins (Piracicaba, Capivari, and Jundiaí) cover approximately 15,300 km2 across the states of São Paulo and Minas Gerais, Brazil, encompassing 76 municipalities. The region plays a strategic role in urban, industrial, and agricultural water supply, including contributions to the Campinas and São Paulo Metropolitan Regions via the Cantareira Water Supply System.
Operational hydrometeorological forecasting is conducted through the PCJ Hydrometeorological Forecasting System (SPHM-PCJ), which provides meteorological forecasts for municipalities and streamflow forecasts at three control stations: Atibaia River at Atibaia (62669900, 3E-063T) (Atibaia-Atibaia), Atibaia River at Valinhos intake (62678150, 3D-007T) (Atibaia- Valinhos Intake), and Jaguari River at Buenópolis (62605000, 3D-009T) (Jaguari-Buenópolis).
The forecasting system was developed by SIMEPAR to provide operational hydrometeorological forecasts that support River Basin Committees in real-time reservoir operation and strategic water supply management. It also enables the estimation of the probability that forecasted streamflow will fall below the minimum thresholds established by Joint Resolutions ANA/DAEE No. 925 and 926/2017 [
34]. The hydrometric control stations are located downstream of the Cantareira reservoir system [
35]. For modeling purposes, three incremental sub-basins contributing to these control points were delineated based on topographic drainage divides (
Figure 1).
Four datasets were analyzed: two observational references and two forecast products. The observational and forecast datasets have different periods of record. However, to ensure a consistent evaluation, all analyses presented in this study were performed using only the common overlapping period from 7 September 2019 to 20 March 2024. The temporal coverage reported below refers to the full availability of each dataset. For the purposes of this study, all datasets were referenced to the same local time (UTC-3) and processed to a common daily temporal resolution, ensuring temporal consistency throughout the analyses.
The first observational dataset consists of rain gauge stations operated by SPHM-PCJ, with records available from 10 August 2018 (OBS-STN; hereafter). The stations provide precipitation observations at sub-daily temporal resolutions. For this study, the observations were aggregated to daily precipitation totals after applying basic quality-control procedures, including the removal of negative values and physically unrealistic precipitation amounts. The quality-controlled daily precipitation was then averaged within each basin to obtain basin-mean precipitation. However, gauge density is limited, with one basin containing up to four stations and the remaining basins containing only two stations.
To complement these point-based measurements and account for the spatial heterogeneity of precipitation—particularly during localized convective events—the Brazilian Daily Weather Gridded Data (BR-DWGD; hereafter OBS-GRD) was integrated into the analysis. This product provides daily gridded meteorological variables at 0.1° × 0.1° spatial resolution from 1 January 1961 to 20 March 2024 [
36]. Basin-averaged precipitation was obtained by extracting the grid cells intersecting each basin and calculating the arithmetic mean of the corresponding precipitation values.
While OBS-GRD enhances the representation of spatial patterns, its utility is restricted to the historical period ending in March 2024. Consequently, OBS-STN serves as the critical reference for assessing operational consistency and real-time forecast applicability through 2026. This dual-reference approach ensures that the performance of the forecasting systems is evaluated against both the high-precision local gauge data and the broader spatial context provided by the gridded product.
The forecast datasets used in this study consist of two products. The first is the operational forecast produced by the SIMEPAR (hereafter FCST-SIM), an operational high-resolution regional forecast developed by SIMEPAR. This system utilizes the Weather Research and Forecasting (WRF) model configured with a 5 km horizontal grid version 4.1.2 [
37], providing daily accumulated precipitation for lead times up to seven days. The study period for this dataset spans January 2019 to the present.
SIMEPAR (Technology and Environmental Monitoring System of Paraná) is a non-profit organization dedicated to promoting sustainable socio-economic development through weather forecasting and the operation of an integrated hydrometeorological monitoring network. In addition, SIMEPAR develops hydrological modeling and geointelligence solutions to support decision-making in sectors such as energy, sanitation, and civil defense. SIMEPAR products are available upon request and can also be accessed through SIMEPAR’s official website
https://www.simepar.br/ (accessed on 6 September 2026).
The second dataset comprises forecasts from the European Centre for Medium-Range Weather Forecasts Integrated Forecasting System (IFS), specifically its ensemble prediction system (FCST-ENS), consisting of 51 ensemble members. The forecasts correspond to operational ECMWF products and were retrieved in real time as released. The data were obtained on regular grids with spatial resolutions of 0.4°, 0.2°, and 0.1° (approximately 44 km, 22 km, and 11 km), spanning September 2019 to the present.
All datasets (OBS-STN, OBS-GRD, FCST-SIM, and FCST-ENS) were spatially averaged over each basin. After removing missing values, a total of 1648 daily observations were retained for analysis. Of these, 1318 daily observations comprised the training dataset, covering the period from 7 September 2019 to 21 April 2023, while the remaining 330 observations comprised the testing dataset, covering the period from 22 April 2023 to 20 March 2024.
2.2. Bias Correction Procedure
Bias correction of precipitation amounts was performed using QDM for both the FCST-SIM and Ensemble Prediction System (ENS) forecasts across the seven lead times, using both observational references for calibration. The FCST-ENS consists of 51 individual ensemble members; therefore, QDM was applied independently to each member. Following correction, the median of the 51 corrected ensemble members was used as the deterministic predictor for the test dataset, as it provides a robust estimate of the ensemble central tendency while reducing the influence of individual members with anomalous values. The rationale for selecting the ensemble median as the deterministic predictor is presented in
Section 2.2.1. The resulting forecasts were then evaluated against the two observational references.
Ideally, bias correction procedures should be calibrated and evaluated using independent training, validation, and testing subsets (e.g., 60–20–20%). However, due to the relatively limited sample size, the dataset was divided into two subsets: 80% for training and 20% for testing. The correction parameters were estimated using the training data and evaluated on the testing subset to ensure independent performance assessment while maintaining sufficient data for robust parameter estimation.
For the wet/dry occurrence analysis, a range of correction models with increasing levels of complexity were evaluated within both frequentist and Bayesian frameworks. For the ENS forecasts, the ensemble median was used as the deterministic predictor representing the 51 individual ensemble members in the occurrence-correction analysis. The occurrence-correction models were evaluated on the test dataset for all three basins, four forecast–observation pairings (FCST-SIM/OBS-STN, FCST-SIM/OBS-GRD, FCST-ENS/OBS-STN, and FCST-ENS/OBS-GRD), and seven forecast lead times. Performance was assessed using the categorical verification metrics described in
Section 3.2, allowing comparison of the consistency and effectiveness of the correction approaches across basins, forecast–observation pairings, and lead times. All the occurrence-correction model parameters, classification thresholds, and monthly wet-day probabilities were derived strictly from the training data to avoid data leakage.
2.2.1. Selecting the Ensemble Predictor
In some cases, it is more appropriate to use a representative ensemble statistic rather than all ensemble members individually, as ensemble summary predictors provide a more compact representation of the forecast distribution [
24].
Before selecting a deterministic predictor from the ECMWF ensemble, four ensemble summary statistics (mean, median, 25th percentile, and 75th percentile) were evaluated across the three basins, two observational references, and seven forecast lead times using Bias, RMSE, and the Kolmogorov–Smirnov (KS) statistic. For each metric, the four predictors were ranked from the smallest to the largest value, assigning rank 1 to the best-performing predictor and rank 4 to the worst-performing predictor. The Total Rank for each predictor was then calculated as the sum of its ranks across the three evaluation metrics. To obtain a generalized assessment of predictor performance, the Total Rank values were averaged across the three basins, two observational references, and seven forecast lead times. The ensemble predictors were subsequently ordered according to the average Total Rank, with lower values indicating better overall performance.
As shown in
Table 1, the ensemble median achieved the lowest average overall rank (4.57), indicating the best overall performance among the evaluated predictors. Although the 25th percentile showed slightly better performance in terms of RMSE and KS, the ensemble median exhibited substantially lower bias, resulting in the best overall ranking. Therefore, the ensemble median was selected as the deterministic predictor for the subsequent occurrence-correction analyses and for evaluating forecast performance after magnitude correction.
2.2.2. Quantile Delta Mapping QDM
The correction was implemented using the Quantile Delta Mapping (QDM) method, a distribution-based extension of classical Quantile Mapping (QM). In standard QM, simulated values are adjusted by aligning their cumulative distribution function (CDF) with that of the observations over a reference period, thereby correcting systematic biases in the modeled distribution.
Quantile Delta Mapping (QDM) extends the Quantile Mapping (QM) framework by preserving changes in quantiles, rather than correcting absolute values, thereby maintaining the model-simulated change signal while correcting systematic biases relative to observations. In climate applications, this corresponds to preserving projected changes in quantiles while adjusting the modeled distribution to match observed conditions. QDM has been shown to perform well in preserving distributional characteristics and extremes [
13,
38].
The algorithm of QDM starts by extracting the non-exceedance probability of the model value at time
t and
pFCST,test from the empirical CDF of the projected (here, the test) series
xFCST,test:
The relative change in quantiles between the projected (test) and historical (train) is given by the following:
The bias-corrected precipitation
xQDM,test is derived using the inverse CDF estimated from observed values
F−1OBS,train , which is then scaled by multiplying by the relative change factor:
QDM was implemented using the QDM() function from the R package MBC, following the quantile delta mapping algorithm of Cannon et al. (2015) [
38]. Correction was applied univariately and separately for each lead time; no seasonal stratification was performed. For each lead time, the empirical distributions of observed and raw modeled values were estimated non-parametrically from the training sample using Type-7 plotting positions, with no parametric distribution fitted and no subsampling (all training values used as empirical quantiles). Because precipitation is a ratio quantity, correction was multiplicative (ratio = TRUE); the package default trace threshold of 0.05 mm/day was used, below which values were treated as exact zeros, with the near-zero correction factor separately bounded (ratio.max.trace = 0.5). The multiplicative correction factor for wet-day values was capped at 2× (ratio.max = 2) to prevent unbounded extrapolation for extreme quantiles. Tied values were resolved by rank order of occurrence (ties = ‘first’), with no jittering applied. Calibration used the first 80% of the chronologically ordered dataset per lead time (training period), and correction was applied strictly out-of-sample to the subsequent, non-overlapping 20% (test period).
To preserve full chronology and strictly avoid the use of future information, the operational application of the method transforms the static train and test periods for each lead time into a dynamic rolling window. To illustrate this dynamic approach, consider a 6-day lead time (L6) forecast with a target date of 7 January, which is generated and issued on January 1st. For this specific lead time, we construct a 360-day rolling window of past forecasts ending on the target date (7 January). This window contains the L6 forecast targeting 7 January, the L6 forecast targeting 6 January, 5 January, and so forth, rolling backward. Because this is treated as an independent L6 series, the forecast targeting 7 January was issued on 1 January, and the forecast targeting 6 January was issued on 31 December. Therefore, at the exact moment of issuance (1 January), every single forecast value within that 360-day test window has already been generated. No forecast in this calculation utilizes an issue date after 1 January. Furthermore, the remaining historical period used to construct the baseline CDFs (both historical observations and forecasts) entirely precedes this 360-day window. By anchoring the rolling window to the target date of an independent lead-time series, the latest issue date inside the calculation window is always exactly the current issue date, ensuring the mathematical chronology remains strictly out-of-sample.
2.2.3. Frequentist and Bayesian Approaches for Dry/Wet Occurrence Correction
To address systematic errors in the timing of predicted dry and wet weather patterns, several statistical post-processing approaches have been proposed, among which logistic regression remains one of the most widely implemented. In this context, the model is calibrated using a binary response variable where dry conditions are represented by 0 and wet conditions by 1, based on a predefined precipitation threshold (e.g., precipitation > 0.1 mm being classified as a wet day). Days with precipitation less than or equal to 0.1 mm are classified as dry days. The contingency table was constructed using this threshold, with dry days considered the target event.
After model calibration, the probability of precipitation occurrence is estimated for each day and subsequently converted into categorical dry/wet forecasts through the application of a probability threshold. This methodology is commonly applied within the frequentist statistical framework, where model parameters are treated as fixed but unknown values. However, uncertainty in parameter estimation can also be represented explicitly through a Bayesian framework, in which prior information is combined with observed data to obtain posterior distributions of the model parameters. This approach facilitates uncertainty quantification and enables probabilistic inference while maintaining the same underlying logistic regression structure [
24].
Because predictor selection and preprocessing can substantially influence model performance [
39], several model configurations with progressively increasing complexity were evaluated. This strategy was adopted to investigate how different predictor combinations and model structures affect dry/wet occurrence prediction.
The analysis spans multiple dimensions: three basins, four forecast–observation configurations, seven lead times, two statistical approaches (frequentist and Bayesian), and four model structures. In addition, the original ensemble forecasts consist of 51 members, introducing a further dimension for predictor selection. Given this scope, an initial simplification was necessary to preserve model interpretability and enable comparison across configurations. Based on a prior evaluation of ensemble summary statistics, reported in
Section 2.2.1 (
Table 1), the ensemble median was selected as a single representative predictor of the ensemble forecast.
The first level of model complexity incorporated seasonal variability through a monthly wet-day probability predictor. This predictor was estimated exclusively from the training dataset to prevent information leakage from the validation period. It represents the climatological likelihood of rainfall occurrence for each month and was included to improve discrimination between dry and wet events under different seasonal precipitation regimes.
For the frequentist framework, the forecast predictor, either the ensemble median or FCST-SIM, was standardized to improve numerical stability and ensure a consistent predictor scale. A binary dry/wet representation of the forecast (Di) was also included to provide information on the forecast occurrence state. These modifications resulted in the Logistic Regression Seasonal model (LR-Seasonal).
The Bayesian implementation was performed using Markov Chain Monte Carlo (MCMC) sampling through JAGS within the R environment. For each fit, 5000 iterations were discarded as burn-in, followed by 20,000 sampling iterations per chain, with no thinning, resulting in 60,000 post-burn-in draws per parameter. The corresponding hierarchical Bayesian logistic regression model (HBLR-Seasonal) used the same forecast predictors and binary dry/wet representation as the LR-Seasonal model. The model additionally incorporated month-specific intercepts within a hierarchical structure, allowing the monthly intercepts to vary while sharing information through a common hierarchical prior and thereby providing partial pooling across months.
The HBLR-Seasonal model is defined as follows:
where
Xi is the standardized precipitation forecast, and α
m[i] is the intercept associated with month
m corresponding to observation
i.
The monthly intercepts were modeled hierarchically according to Equation (3):
where
represents the variance component (the inverse of the precision parameter), and the hyperparameter µm corresponds to the historical log-odds of rainfall occurrence for month m, as explained in Equation (7):
Here, πm represents the historical monthly wet-day probability estimated strictly from the training dataset.
The regression coefficients (
βj) were assigned truncated normal priors restricted to positive values to maintain consistency with the positive effects identified in the preliminary frequentist analyses, as shown in Equation (8):
The precision parameter controlling the variability among monthly intercepts was assigned a Gamma prior, confirming Equation (9):
This hierarchical formulation enables partial pooling across months, allowing information sharing across seasons while preserving month-specific variability in precipitation occurrence [
40].
As a final stage of model development, the complexity of both statistical frameworks was further increased by incorporating a first-order autoregressive predictor, AR(1). In the present retrospective analysis, the AR(1) predictor was defined as the actual precipitation observation from the day immediately preceding the target day. Because the study was conducted using a fixed historical time series, these observations were available for evaluating the theoretical contribution of the AR(1) predictor across all lead times.
However, this formulation cannot be directly applied in a strict real-time operational forecasting system for longer lead times, because the observation from the day immediately preceding the target day may not yet be available at the forecast issuance time. Therefore, an operational implementation would require the lagged predictor to be constructed sequentially. For lead times for which the previous day’s observation is physically available at the time of forecast issuance, the actual observation can be used as the AR(1) predictor. For subsequent lead times, the unavailable observation should be replaced by the corrected forecast from the preceding lead time. For example, the predictor for L2 would use the corrected forecast obtained for L1. This sequential approach preserves strict temporal chronology and ensures that only information available at the time of forecast issuance is used.
The inclusion of the AR(1) term accounts for the temporal dependence commonly observed in daily precipitation occurrence, where the weather state of a given day is strongly influenced by the atmospheric conditions of the preceding day. Incorporating this term into both the frequentist (LR-AR1) and hierarchical Bayesian (HBLR-AR1) frameworks aimed at capturing the natural persistence characteristics associated with extended wet and dry spells.
Together, these progressive methodological choices resulted in four distinct model configurations with increasing complexity. Their main structural characteristics are summarized in
Table 2.
The probability threshold used to classify predicted probabilities into dry and wet events was determined through Receiver Operating Characteristic (ROC) curve optimization [
24]. The optimal threshold was estimated independently for each model, allowing the classification criterion to adapt to the probabilistic characteristics of each model configuration.
2.3. Assessment Metrics
The evaluation of the forecasting models was conducted in two stages. First, the raw forecasts were evaluated using categorical verification metrics to assess their ability to predict the occurrence of dry (zero-rainfall) and wet (non-zero-rainfall) days. In this study, dry days were defined as the target event because of the particular interest in accurately identifying dry conditions in the study area. Accordingly, the contingency table (
Table 3) was defined in terms of hits (H), false alarms (FA), misses (M), and correct negatives (CN), where H represents days correctly classified as dry, FA represents days forecast as dry but observed as wet, M represents days forecast as wet but observed as dry, and CN represents days correctly classified as wet [
24].
Based on these components, several verification metrics were computed. The Probability of Detection (POD) corresponds to the fraction of observed zero-rainfall days that were correctly forecasted. Accuracy (ACC) represents the fraction of correctly forecasted days, considering both zero-rain and non-zero-rain events. The Critical Success Index (CSI) measures the overall skill of the model in predicting zero-rainfall days. Finally, the False Alarm Ratio (FAR) represents the fraction of predicted zero-rainfall days that did not actually occur [
24].
These metrics quantify the ability of the raw models to correctly capture dry and wet weather events. The equations defining each metric are presented in
Table 4.
These categorical metrics were used to evaluate the performance of both the raw forecasts and the dry/wet occurrence correction methods. To assess the impact of the occurrence correction on categorical verification metrics, the differences between the corrected and raw forecasts were evaluated. For POD, CSI, and ACC, the difference was calculated as the corrected value minus the raw value. For FAR, the contrast was reversed (raw minus corrected) so that a positive difference consistently represented an improvement in forecast performance across all metrics. Thus, for each basin, forecast–observation pairing, and correction method, seven paired metric differences corresponding to the seven forecast lead times were obtained.
A one-sided exact paired permutation test was applied to the seven paired differences to assess whether the correction produced a systematic improvement across forecast lead times. The null hypothesis was that the paired differences were centered at zero, whereas the alternative hypothesis was that the differences were positive. Bootstrap 95% confidence intervals were also calculated for the paired differences to quantify their uncertainty. Because four correction methods were evaluated for each combination of basin, forecast–observation pairing, and metric, the resulting p-values were adjusted for multiple comparisons using the Holm procedure, with the four correction methods considered as the comparison family within each basin, forecast–observation pairing, and metric.
To complement the analysis of changes in aggregated verification metrics, the effect of occurrence correction on the individual paired classification outcomes was assessed using an exact McNemar test. The test was applied separately for each basin, forecast–observation pairing, correction method, and forecast lead time. It evaluates whether the number of cases in which an incorrect raw classification was changed to a correct classification differs from the number of cases in which a correct raw classification became incorrect after correction. The corresponding odds ratio (OR) was calculated as (OR = b/c), where (b) denotes cases incorrectly classified by the raw forecast but correctly classified after correction, and (c) denotes cases correctly classified by the raw forecast but incorrectly classified after correction. Thus, (OR > 1) indicates more corrected errors than newly introduced errors, whereas (OR < 1) indicates the opposite. Exact 95% confidence intervals were calculated for the OR. Because seven lead times were evaluated for each basin, forecast–observation pairing, and correction method, the resulting McNemar p-values were adjusted using the Holm procedure across the seven lead times.
Finally, to provide a more descriptive evaluation of the relative performance of the correction methods and identify the “best” performing method, a descriptive multi-metric ranking procedure was applied. This approach considered the four categorical verification metrics jointly and was used to identify the method providing the most balanced overall performance across POD, CSI, ACC, and FAR.
For this purpose, the values of POD, CSI, ACC, and FAR obtained for each correction method were first averaged across the seven forecast lead times for each basin and forecast–observation pairing. The four correction methods were then compared based on these seven-lead-time averages. For each metric, the four methods were ranked from best to worst, with rank 1 assigned to the best-performing method and rank 4 to the worst-performing method. Higher values were considered better for POD, CSI, and ACC, whereas lower values were considered better for FAR. For example, if the four methods produced mean CSI values of 0.42, 0.45, 0.39, and 0.44, their corresponding ranks would be 3, 1, 4, and 2, respectively. The same ranking procedure was applied independently to POD, ACC, and FAR. An overall rank was then calculated for each correction method as the mean of its four metric-specific ranks.
Because rank 1 represents the best performance for each metric, lower overall ranks indicate better and more balanced performance across the four categorical verification metrics. The correction method with the lowest overall rank was therefore identified as the best-performing method according to the multi-metric evaluation.
Table 5 summarizes the methodological assessments used to evaluate the occurrence-correction methods, including the purpose of each assessment, the unit of analysis, the statistical or descriptive approach applied, and its interpretation.
In the second step, the performance of the bias-correction methods was evaluated using continuous metrics that measure the difference between forecasts and observations. The primary metric used was the Kling-Gupta Efficiency (KGE), which provides a generalized measure of model performance by combining correlation, bias, and variability into a single index. This allows a comprehensive assessment of how well the corrected forecasts reproduce the observed values [
41].
The KGE is defined in Equation (10):
where
r = correlation between forecast and observation (temporal agreement)
α = σf/σo = variability ratio between forecast and observed standard deviations
β = μf/μo = bias ratio between forecast and observed means
Values of α and β equal to 1 indicate agreement between the forecast and observations in terms of relative variability and mean, respectively, while (r = 1) indicates perfect linear association.
The KGE components were evaluated for the raw and bias-corrected forecasts for each basin, forecast–observation pairing, and forecast lead time. Changes in each component were calculated to identify the specific aspects of forecast performance affected by bias correction. An improvement in (r) indicates stronger temporal association with the observations, whereas values of β and α closer to 1 indicate improved agreement in the mean and relative variability, respectively. This decomposition was used to determine whether changes in KGE resulted primarily from improvements in correlation, mean bias, or variability, and to identify potential trade-offs among these components.
The effectiveness of the bias-correction methods was evaluated using the change in KGE, as shown in Equation (11):
where KGE
Cor represents the relationship between the corrected forecast and the observations, and KGE
Raw represents the relationship between the raw forecast and the observations.
To express the magnitude of forecast errors in physical units (mm day
−1), the Root Mean Square Error (RMSE) was also calculated. Additionally, the RMSE skill score [
24] was used to quantify the improvement introduced by the bias-correction methods relative to the raw forecasts, as shown in Equation (12):
where
RMSECor corresponds to the RMSE of the corrected forecasts and
RMSERaw corresponds to the RMSE of the raw forecasts.
Values of the skill score close to 1 indicate a strong improvement relative to the raw forecasts. Values close to 0 indicate little or no improvement, while negative values indicate that the correction method degraded the forecast performance.