![]() |
METHOD ARTICLE | SHORT ![]() |
This method article presents a local refinement for a national-scale, machine-learning–based groundwater model that predicts typical summer and winter water table depth at 10 × 10 m resolution at the national scale for Denmark. While the existing baseline model provides high-resolution national coverage and is suitable for screening purposes, its accuracy may remain insufficient for local groundwater management applications. The presented method integrates new groundwater observations into the existing training data set and retrains the baseline model to enhance local fidelity while preserving large-scale consistency. The approach is demonstrated for a 212 km² case study area using 96 synthetic groundwater observations. Cross-validation results show consistent improvements in mean error, mean absolute error, and root mean squared error compared to the baseline model, particularly when increased weights are assigned to new observations. The refined models possess higher precision in areas with new observations while maintaining baseline behaviour elsewhere. Thus, combining national data sets with local monitoring networks in this way is suitable for improved decision support in climate adaptation, nature conservation and other applications.
| Geographical coverage | Denmark |
| Temporal coverage | 1991–2025 |
| Subject(s) covered | Hydrology, computational geoscience, informatics and remote sensing |
| Method type | A method to integrate new observations into a national-scale machine-learning–based groundwater model for Denmark at 10 × 10 m resolution. The method generates local refinements of typical summer and winter water table depth, including uncertainties. |
| Method name | RefineWTD10m |
| Instruments and equipment used | Groundwater observations Sufficient computing environment Python 3.12 including the following packages: numpy, pandas, pyarrow, lightgbm, scikit-learn, gdal, geopandas, pyproj, shapely and fiona, and downstream dependencies in these packages. |
| Related publications | Adapted from Koch et al. (2021) and Troldborg et al. (2026) |
| Potential application(s) for this method | The method can be used to integrate new groundwater observations into the national-scale machine-learning model which is distributed via the Hydrological Prognosis and Information system (HIP, https://hipdata.dk/). In particular, the method can locally refine the 10 × 10 m models of typical summer and winter conditions. The method can support decision makers, such as municipalities, water utilities or other practitioners, in their planning work or to carry out risk assessments related to groundwater extremes. |
Citation: Koch et al. 2026: GEUS Bulletin 62. 8438. https://doi.org/10.34194/a5crnf05
Copyright: GEUS Bulletin (eISSN: 2597-2154) is an open access, peer-reviewed journal published by the Geological Survey of Denmark and Greenland (GEUS). This article is distributed under a CC-BY 4.0 licence, permitting free redistribution, and reproduction for any purpose, even commercial, provided proper citation of the original work. Author(s) retain copyright.
Received: 21 May 2026
Revised: 05 Aug 2026
Accepted: 30 Sep 2026
Published: 27 Nov 2026
Competing interests and funding: This study was carried out in connection with GEUS’ ongoing activities on the Hydrological Information and Prognosis system (HIP, https://hipdata.dk/)
Julian Koch is a scientific editor for GEUS Bulletin. The authors declare no other competing interests.
*Correspondence: juko@geus.dk
Keywords: groundwater modelling, machine learning, climate adaptation, groundwater management
Abbreviations:
DK-model: National Hydrological Model of Denmark
EPA: Environmental Protection Agency
HIP: Hydrological Information and Prognosis system
MAE: mean absolute error
ME: mean error
RMSE: root mean squared error
Edited by: Rasmus Bødker Madsen (GEUS, Denmark)
Reviewed by: Troels Norvin Vilhelmsen (NIRAS, Denmark) and three anonymous reviewers.
This method builds upon the national-scale machine-learning–based groundwater model developed by Koch et al. (2021), which predicts typical summer and winter water table depth at 10 × 10 m resolution across Denmark for the period 1991–2025. The model uses a gradient boosting with decision trees algorithm and is based on 24 054 in-situ labels representing groundwater wells, 31 093 support labels representing rivers, lakes and coastline, as well as 22 covariate maps. The covariates contain a broad variety of high-resolution geoinformation covering topography, surface hydrology, lithology, land use or land cover and hydrogeology. Given the limited availability of long observational time series, the model predicts static maps representing long-term median winter and summer groundwater conditions. The model targets the uppermost groundwater table, defined as the first unconfined phreatic surface encountered below the land surface, and outputs are distributed through the Hydrological Information and Prognosis system (HIP; https://hipdata.dk/; Klimadatastyrelsen n.d.). The 10 m maps provide a valuable screening resource for Danish municipalities, water utilities and other decision makers for planning climate adaptation measures, particularly in relation to flood risk. The data sets are, for example, highlighted by the Danish Environmental Protection Agency (EPA) in their climate adaptation implementation (Danish EPA 2025). Despite the high spatial resolution and overall improved precision compared to the process-based National Hydrological Model of Denmark (DK-model; Henriksen et al. 2022), which operates at 100 m resolution, the 10 m models still lack sufficient accuracy to support local groundwater management decisions. The mean absolute error (MAE) of the 10 m national baseline model is approximately 1 m, which may limit its applicability for local decision-making. Applications include screening for risk areas exposed to flooding due to shallow groundwater and for the planning of climate adaptation measures.
With increasing awareness of shallow groundwater challenges, together with the availability of cost-effective groundwater monitoring systems, many decision makers have invested in networks to monitor local groundwater. However, the integration of these point observations into spatial groundwater modelling workflows remains challenging and requires specialised technical expertise. This method aims to address this gap by incorporating local groundwater observations into a state-of-the-art machine-learning modelling framework. The method enables the generation of high-resolution maps of groundwater dynamics by combining national-scale databases with local groundwater observations. Despite the method being straightforward to replicate with basic programming and data management skills, sufficient groundwater domain knowledge is required to understand the limitations of the results arising from assumptions in model formulation and data treatment.
Within the geosciences, similar geospatial modelling approaches are implemented across many environmental variables, and therefore we believe that the local refinement method presented here is a valuable contribution, also beyond the groundwater domain.
The user requirements are as follows:
The required resources are as follows:
New groundwater observations are the core input driving the local refinement. The method requires a CSV file containing ETRS89 / UTM 32N coordinates (EPSG: 25832) together with median summer and winter water-table depths. Users are responsible for curating these medians given uncertainties in the underlying data, including short time series and well-screen placement, as the model assumes that the well screen represents the uppermost groundwater table. Shallow wells can be identified through a combination of depth criteria based on lithology or the homogeneity of the lithostratigraphy of the well. Both summer and winter groundwater levels must be provided, and if only one seasonal estimate is available, users are encouraged to estimate the seasonal amplitude to derive the missing season. The seasonal amplitude may be derived from the seasonal groundwater statistics simulated by the DK-model, which are available through HIP. Further details regarding preprocessing are provided in Koch et al. (2021) and Troldborg et al. (2026). The training data for the baseline model (df_train.parquet) contains observations from the period 1991–2025 and includes the location-specific values of the 22 covariate maps used for modelling. Users are encouraged to explore which groundwater observations are already included in the national data set using the available coordinates or the provided shapefile of the training data location.
A detailed workflow diagram of the local refinement is presented in the GitLab repository (Koch 2026b). First, covariate data are extracted for the newly provided groundwater observations using their coordinates. The computational efficiency of this step depends on the size of the user-defined prediction domain. The model incorporates 22 covariates, which are further specified in Koch et al. (2026a). After extraction, the covariate data are concatenated with the existing training data set (df_train.parquet). Subsequently, the summer and winter models, including their associated uncertainty models (P10 and P90), are retrained using the predefined hyperparameters, resulting in a total of six models. This step entails a complete retraining of the model rather than a fine-tuning of a baseline model. Keeping the hyperparameters constant across the baseline and the refined models ensures that the two remain consistent, so that any differences between them reflect solely the added local observations. Existing training observations may also be removed if they are considered unreliable or uncertain by the user. This can be done by deleting specific rows from the training data set (df_train.parquet). We advise users to explore the training data through the provided shapefile, where the wells can be linked to the training data set using the WELLID column.
The newly added observations can be assigned additional influence during model training in two different ways, which are controlled by the parameters ‘repeat_local’ and ‘weight_local’ in the main script (main.py). The motivation is to force the machine-learning model towards improved local accuracy while still retaining the large-scale relationships learned from the national data set. The first option is data augmentation, where local observations are duplicated multiple times in the training data set. Duplicating a row in the training data set increases the number of times that label is available to be drawn into the training subsample used to build the decision trees in the boosting algorithm. The second option is weight assignment, where local observations are assigned higher weights. In the national baseline model, support labels are assigned a weight of 1, while groundwater wells are assigned a weight of 2. The weight assigned to an observation determines its contribution to the overall loss function during model training. Specifically, the weights are multiplied by the individual residuals of each observation before aggregation into the overall loss. The initial weighting scheme, which differentiates between support labels and well labels, was determined based on previous testing to ensure that the model is predominantly guided by in situ well observations rather than by the support labels (rivers, lakes and coastline). The sensitivity of the two parameters will depend on the amount of the new groundwater observations, the user’s confidence in the quality of the observations and how they agree with the baseline training data. Therefore, we cannot provide a clear recommendation and instead encourage users to explore the sensitivity from case to case.
In the provided scripts, the local refinement is evaluated using four-fold cross-validation. Validation focuses exclusively on the newly provided groundwater observations. First, a baseline model is trained on the pre-existing national-scale training data alone. Subsequently, four refined models are trained including the new observations. The cross-validation scheme ensures that, for each model, 25% of the new observations are used for testing while 75% are used for training. In this way, each local observation is used exactly once for validation. By default, mean error (ME), MAE, and root mean squared error (RMSE) are calculated, and their mean value is calculated across the four validation folds. Validation is carried out separately for the summer and winter models. Users must be aware that the implemented four-fold cross-validation is based on random splitting, and since groundwater observations are commonly correlated in space, the random splitting may present an overly optimistic testing performance. Data augmentation (repeat_local) is not advised to be used during cross-validation, since duplicated copies of the same local observation can be split across the training and validation folds, allowing the model to be validated on data it has effectively already seen and thereby inflating the performance metrics.
In total, six models are trained for the local predictions, each generating a 10 × 10 m water-table depth map. Once a model is trained, predictions are made for every 10 × 10 m grid cell for the local prediction domain specified by the user. The water-table depth for each grid cell is thus a direct model output based on its own local covariates. Hyperparameters remain fixed during refinement, ensuring that model changes are driven solely by the inclusion of the new groundwater observations. The outputs include predictions of typical summer and winter water-table depth, together with two uncertainty bounds for each model: the 10th percentile (P10), representing the shallow bound, and the 90th percentile (P90), representing the deep bound. Together, these approximate an 80% prediction interval. All prediction maps are exported as GeoTIFF files and represent water-table depth in cm below ground level.
In addition to the six prediction maps, several auxiliary outputs are generated. The 22 covariate raster layers are clipped to the local prediction domain and exported as GeoTIFFs. Furthermore, the training data are exported as a point shapefile covering the prediction domain. User-provided groundwater observations are labelled with ‘user’ in the attributes TYPE and WELLID.
The presented method is demonstrated for an area surrounding the city of Sunds on the Danish peninsula of Jylland, with a simulation domain of approximately 212 km² (location in Fig. 1). A total of 96 synthetic groundwater observations were generated by adding spatially correlated noise to the DK-model’s seasonal groundwater table maps (30-year summer and winter medians). Noise was generated via ordinary kriging of 25 randomly placed anchor points using an exponential variogram (10 km correlation length, sill = 1, nugget = 0.05), rescaled to a mean of 0 m and a standard deviation of 5 m, and added to the DK-model summer and winter predictions at 96 randomly sampled locations more than 50 m from rivers and lakes. Resulting values were truncated at 0 m to avoid negative water-table depths. Figure 1a illustrates the baseline training labels representing the national-scale training data set also used in HIP. This data set includes both in situ groundwater observations at wells and support labels representing expert-generated groundwater conditions along rivers, groundwater-connected lakes and the coastline. These support labels cover groundwater conditions that are not naturally represented by the well data set and therefore provide an important addition to guide the model training towards realistic behaviour. In addition, the 96 synthetic local observations used for refinement are shown in Fig. 1b. Spatial clustering and spatially correlated values of groundwater depth are evident, reflecting the characteristics typically found in real-world monitoring data sets.

Fig. 1 Observations of water-table depth under typical winter conditions used as training labels for (a) the national-scale baseline model shown as circles and (b) the local model refinement shown as triangles. The training data set also includes support labels representing rivers and lakes (c) overview figure showing the location and extent of the 212 km2 large case study area in yellow.
Results from the four-fold cross-validation using the 96 synthetic groundwater observations are presented in Table 1. Compared with the national-scale baseline model, the three performance metrics indicate improved model performance following local refinement. For both MAE and RMSE, model precision further improved when increasing the weight assigned to the new groundwater observations from 2 to 5. This indicates that stronger weighting of local observations can enhance local model performance. To investigate the model’s sensitivity to the quantity and quality of the new groundwater observations, we carried out two additional experiments. First, the number of training observations was reduced by 25 and 50%. Second, an additional random-noise term with a standard deviation of 1 and 2 m was added to the water-table depth values. Both experiments were repeated 10 times within the four-fold cross-validation framework, thereby being validated on the same 25% of synthetic groundwater observations as in Table 1. For quantity sensitivity, the model’s MAE deteriorated to 3.09 and 3.29 m for the winter model when reducing the number of observations by 25 and 50%, respectively. For quality sensitivity, adding 1 and 2 m of noise increased the winter MAE to 3.00 and 3.15 m, respectively. It should be noted that the validation labels are synthetic, and therefore the practical implications of the reported performance metrics should not be overinterpreted. The comparison to the baseline model’s testing performance against in situ wells, which is around 1 m, should also be disregarded. Nevertheless, the relative differences between the evaluated modelling scenarios clearly demonstrate the usability and functionality of the refinement method presented here.
Maps of typical winter conditions from the baseline model and from the locally refined model are presented in Fig. 2. The local refinement differs from the baseline model in accordance with the synthetic groundwater observations added during training. For example, a cluster of deep groundwater observations has a pronounced influence in the northwestern part of the prediction domain, resulting in deeper predicted groundwater levels. Similarly, the shallow groundwater observations introduced in the north-eastern part of the domain lead to overall wetter predicted conditions. It is also noteworthy that areas without additional observations, or areas where the added observations are consistent with the baseline model, remain largely unchanged after local refinement. This indicates that the refinement primarily affects locations supported by new observations while preserving the large-scale spatial patterns of the baseline model.

Fig. 2 Predicted water-table depth maps. (a) The baseline model derived from the existing national-scale training data set. Data are identical to those distributed via HIP (Danish Agency for Climate Data n.d.). (b) The local refinement model obtained from a retrained model incorporating 96 synthetic groundwater observations.
This is further exemplified in Fig. 3, where the differences between the baseline model and the refined model are shown. The spatial patterns of positive and negative differences in Fig. 3a correspond well with the distribution of newly added shallow and deep observations, respectively, as illustrated in Fig. 1b. This further illustrates the functionality of our method. Uncertainties, expressed as the width of the confidence interval (P90–P10), are compared between the baseline and refined models in Fig. 3b. Uncertainties are generally higher in areas where the refined model predicts a deeper groundwater table, since the negative areas in Fig. 3a and b are largely collocated. This is less evident for areas where the refined model predicts a shallower groundwater table. This indicates that uncertainty scales with groundwater depth. However, further investigations using real observations are required to draw robust conclusions. Theoretically, a higher density and improved quality of local observations should lead to an overall reduction in uncertainty.

Fig. 3 Changes due to local refinement. (a) Spatial distribution of differences between the baseline model and the locally refined model (baseline – refinement). (b) Comparison of uncertainty between the baseline and refined model (baseline – refinement), expressed as the width of the 80% prediction interval (P90–P10). The 96 synthetic labels used in the refinement are shown in both panels.
The authors wish to thank the reviewers, Troels Norvin Vilhelmsen and three anonymous reviewers, for their comments, which improved the manuscript.
JK: Conceptualisation, Methodology, Formal analysis, Writing – Original Draft, Visualisation. JL: Writing – Review & Editing, Validation. LT: Writing – Review & Editing, Conceptualisation, Project administration
The scripts and most of the required data as well as a workflow diagram are available via the following GitLab repository: https://geusgitlab.geus.dk/hydrology-public/RefineWTD10m
The prediction data set (df_predict.parquet) and a shapefile with the training labels are available via: https://doi.org/10.22008/FK2/DUU3WM
All data and code are publicly available with this manuscript via the links provided.