Land surface models (LSMs) use the atmospheric grid as their basic spatial decomposition because their main objective is to provide the lower boundary conditions to the atmosphere. Lateral water flows at the surface on the other hand require a much higher spatial discretization as they are closely linked to topographic details. We propose here a methodology to automatically tile the atmospheric grid into hydrological coherent units which are connected through a graph. As water is transported on sub-grids of the LSM, land variables can easily be transferred to the routing network and advected if needed. This is demonstrated here for temperature. The quality of the river networks generated, as represented by the connected hydrological transfer units, are compared to the original data in order to quantify the degradation introduced by the discretization method. The conditions the sub-grid elements impose on the time step of the water transport scheme are evaluated, and a methodology is proposed to find an optimal value. Finally the scheme is applied in an off-line version of the ORCHIDEE (Organising Carbon and Hydrology In Dynamic Ecosystems) LSM over Europe to show that realistic river discharge and temperatures are predicted over the major catchments of the region. The simulated solutions are largely independent of the atmospheric grid used thanks to the proposed sub-grid approach.

Lateral water transport over continents plays an important role in the Earth system, but its implementation in models focusses on different objectives
depending on resolution. In global Earth system models (ESMs), tailored to address climate change issues, the main need is to transport the excess
water over land to the oceans so as to close the water cycle. Because of their coarse resolution the main focus will be on the largest
rivers. Regional ESMs, like those used for process studies and downscaling of climate projections, will usually attempt to reproduce more details in the
continental water cycle. Lateral water transports will thus also serve to predict levels of in-land waterbodies or inundations and the impact of
freshwater flows on coastal processes. Finally for kilometre-scale ESMs currently being developed to better represent rainfall and convective processes,
lateral flows allow moisture to be redistributed along hill slopes

Furthermore, rivers also transport energy and biogeochemical species

Land surface models, the components within ESMs dealing with continental processes, have implemented over the last 30 years a very uni-dimensional vision of the water and energy processes at the surface. The main driver of their development was to provide the lower boundary to the atmosphere. As a consequence they have also adopted the spatial discretization of the atmosphere so as not to introduce any discontinuity in this important coupling. Interpolating land surface fluxes and surface state variables on which they depend (surface temperature in particular) cannot preserve their consistency on two different grids because of the non-linearity involved. The lateral water transport cuts across this one-dimensional vision and also challenges the use of the atmospheric grid. Indeed, lateral water movements require often higher resolution than the atmosphere as topographic features are a stronger constraint for the flow of water on land than for the atmosphere. The hydrological community has been free of this constraint of the coupling to the atmosphere and could adopt appropriate spatial discretization, which is often at kilometre-scale, for the representation of rivers.

ESMs have adopted over the last decades two different and complementary approaches to try and deal with the lateral water transport on continents. The
first and most widespread approach is to abandon the atmospheric grid and interpolate the fields of water exiting the one-dimensional soil moisture
(generally surface runoff and deep drainage) towards the grid which will be used to simulate river flows

The second approach is to use directly the atmospheric grid for the lateral flows

Using the nomenclature proposed by

Preserving the link between the atmospheric resolution and the sub-grid hydrology facilitates the representation of all the processes which involve
exchanges between vertical and lateral water movements. It allows us to represent floodplains and their impact on evaporation

The proposed study explores the numerical properties of such a hybrid routing scheme and in particular how it handles different atmospheric grids. In the first part of the paper we will show how the graph of HTUs can be built and which properties of the hydrological network need to be preserved. Then we will present criteria which allow us to verify the fidelity of the HTU graph and in particular how many sub-grid elements are needed for different resolutions of the atmospheric grid to preserve the original hydrological information. Once water is transported, criteria are needed to select a time step which ensures that the numerical solution converges. Finally we will show with the ORCHIDEE (Organising Carbon and Hydrology In Dynamic Ecosystems) land surface model that the simplification of the digital elevation model introduced by the transport on a graph of HTUs is small compared to the uncertainty in the atmospheric forcing. The methodology will also be used to demonstrate the value of a simple implementation of stream temperature.

Before presenting the construction of the graph of HTUs, the equations used to transport water and heat along the network of rivers are presented. They give indications on the properties of the graph which need to be preserved.

The flow of water occurs on a directional graph towards the outflow point

As the graph is directional we can pose the following indexing convention.

For an HTU

Fluxes connecting two HTUs are denoted with half indices. The flux leaving HTU

Given the above notation, the prognostic equations for water transports are given by

Here

The flow is thus given by the reservoir's water mass divided by the residence time. This characteristic time of each reservoir is the product of a
geometric property (

The advection of heat content with lateral water transport is given by the advection of the aquifer temperatures and the interactions with the
surrounding landscape and the atmosphere. In order to implement these processes, an initial temperature has to be chosen for the water in the fast and
slow reservoirs. The assumption here is that they are determined by the temperature of the soils of the corresponding atmospheric grid. Our initial
assumption is

The atmospheric grids and land–sea masks for which HTU graphs were built to test the methodology.

Evaluating the stream temperature through the advection of heat has to deal with the singularity arising when the reservoir content goes to zero. A
relaxation towards the upper-soil temperature was chosen to deal with this indetermination. This allows us to write the following set of equations:

The numerical solution of these equations is discussed later (Sect.

This section presents the methodology for constructing hydrological transfer units (HTUs) and connecting them to build a hydrological network suitable
to simulate surface water transport. In contrast to the tiling of the atmospheric grid for vegetation

Samples over the lower Seine basin of the four atmospheric grids considered here (Table

For the present study, the methodology for tiling the atmospheric mesh into graphs of HTUs is exemplified on four grids covering the Euro-Mediterranean
region (Table

The methodology works on any atmospheric grid as long as the polygons constituting the mesh are provided, together with the land–sea mask.

The hydrological digital elevation models (HDEMs) used in this study to evaluate the building of the routing graph and the simulated river discharge.

To perform the HTU decomposition and compute their properties a hydrological digital elevation model (HDEM) is needed. The minimal information
required is elevation, flow direction, flow accumulation and distance to the ocean for each pixel. The elevation should be hydrologically consistent
in the sense that no flow should lead water to gain elevation. As we will show below (Sect.

The original HDEM used in IPSL's ESM is from

The HTUs are built from the supermesh

This process is performed using the

A sample case of a regular atmospheric grid cell decomposed into HTUs over the Rhone valley.

A first set of coarse HTUs is built by joining all polygons of the supermesh which flow out of the atmospheric grid cell to a neighbouring grid
cell. Their local upstream area is computed using the area of the overlapping HDEM pixels. This first set of HTUs is quite coarse but ensures that
all rivers and flow directions out of the atmospheric grid are preserved. The example in Fig.

An algorithm is needed to sub-divide the larger HTUs to better represent the river network within the atmospheric mesh. The objective is to divide the
HTU at important confluences. There are two types of confluences which need to be considered.

Two large rivers (large global upstream area) meet as illustrated in Fig.

A local river (large local upstream) joins a large river. This is for instance the case for HTU 8 in Fig.

The section is made at the confluence pixel between the main river and its tributary. This produces three new HTUs: (1) the part of the main river upstream of the confluence and with this pixel of the HDEM as it outflow location, (2) the downstream part of the main river which keeps the initial outflow pixel, and (3) the tributary which has as outflow pixel the one before the confluence. If the subdivision (1) or (2) is too small, the HTU is only divided into two parts: the HTU of the main river and the confluence. The tributary will now flow directly to the outflow point of the original HTU and thus potentially create a small topological error. The aim is to avoid generating HTUs on the main rivers that are too small.

This algorithm is iterated until one of two conditions is met:

the tributary has the fourth highest global flow accumulation

the local upstream area is less than 10 % of the grid cell area.

The residence time of water in the stream reservoirs is given by the topographic index (

For the fast and slow reservoirs, the topographic index

If other variables of the LSM, soil moisture for instance, are also simulated at the HTU level, then the hill-slope processes which govern the riparian
water exchanges could be parametrized. As suggested by

At this stage, the atmospheric grid cell can contain more HTUs than requested by the user with the

Merge all HTUs of an atmospheric grid cell which flow into the ocean.

Merge HTUs which flow to the same neighbouring grid cell by starting with the smallest. This reduces the border noise by merging the smallest HTUs which have been generated by the supermesh methodology.

Merge HTUs which belong to the same river and flow out of the mesh. As this is also performed for HTUs flowing out in different directions, it generates topological errors.

Merge HTUs which flow into a downstream HTU within the same atmospheric grid cell.

Finally a brute-force method is used to merge the smaller HTUs until

During the reaggregation step, the HTUs do not need to be connected when merged. This leads to situations like HTU 6 in
Fig.

As highlighted in the discussion above, in order to simulate a realistic river discharge the length and slope of the main rivers need to be well preserved in the HTU decomposition. It is clear that if the truncation steps have to be carried too far because of a poor choice by the user, a poor-quality graph will be obtained and a reliable simulation of the streamflow cannot be expected. Below we will present a methodology which allows us to verify the quality of the graph and estimate an optimal number of HTUs for a given atmospheric grid resolution.

Stream gauging stations are precious tools to validate the simulated water cycle of land system models at catchment scale. For this reason, it is important to be able to localize these stations in the HTU space. Obviously, depending on the fidelity of the river graph in the HTU space more or fewer stations can be reliably placed. The position of the stations will be made according to their geographic position and the error in the upstream area within the model. The user can choose the maximum error in distance and fraction of upstream area which can be tolerated.

After the construction of the HTU graph, the pre-processor will attempt to place each station within the tolerance selected by the user. The errors will then be minimized to select the HTU which will be considered representative of the given station. This information will then be archived with the HTU network so that the land surface model can monitor the flow out of the HTU corresponding to the station during the simulation. As the stations are placed in the HTU space, when the characteristics of the graph change, more or fewer stations can be positioned within the allowed errors.

A method is needed in order to statistically validate the quality of the HTU graph and identify the deviation from the original HDEM induced by the reduction in effective resolution operated by the algorithm described above. As HTU graph construction is designed to work without human supervision and at global scale, a visual inspection is not sufficient.

The validation method samples randomly a large number of river segments which are representative of the network. The length and elevation changes for
each of these segments are computed on the HDEM and on the HTU graph to evaluate the errors. The red lines in Fig.

The errors in segment properties can be decomposed into a cell and a topological error. Within each HTU we can compare the sub-segment's properties
computed with the HDEM to the one used for the HTU. This will be called the cellular error. In Fig.

This methodology is applied over the largest European rivers (Danube, Rhone, Rhine, Loire and Elbe) for the four atmospheric grids presented
above. The relative errors and their statistics are computed over a sample of 8000 segments. To ensure a good representativeness the length of the
segments is chosen between 100 and 1000

Figure provides the distribution of errors for the elevation change (d

Figure

Error decomposition for the segment's elevation changes and length for five rivers at three different atmospheric resolutions and two different HDEMs. The solid lines provide the total relative errors, while the dashed lines show the cellular contribution. Symbols on the lines indicate that the change relative to the next coarser truncation (lower value of nbmax) is significant.

Let us now analyse how the quality of the HTU graph depends on the resolution of the atmospheric grid and the maximum number of HTUs allowed per
grid (

Figure

For the MEDCORDEX grid at 20

Distribution of errors along the upstream area (or fetch) of the starting point of the segments for the Danube. The solid lines provide the total errors, while the dashed lines show the cellular errors.

The parameters used for the four atmospheric grids for which HTU graphs were built to validate the numerical method. If not specified otherwise, the MERIT HDEM is used. The HTU graph on the MEDCORDEX mesh using the HydroSHEDS HDEM is labelled MEDCORDEXHS.

To determine the main sources of errors in our samples, their distributions relative to the upstream area of the initial point are analysed for the
Danube as an example. Figure

It must be noted that for the EuroMED grid the error in

Concluding this section, we provide the optimal truncation for each grid used here (Table

For the constructed HTU graphs the constants

The water continuity (Eq.

The Courant–Friedrichs–Lewy (CFL) condition mandates that for a convergence of the numerical solution the time step needs to be smaller than or equal to
the residence time (

A practical solution for choosing the time step of the routing scheme is to select a position within the area-weighted distribution of residence times of all HTUs within the computational domain. It is proposed to select the time step corresponding to the 25 % quantile of this distribution. This means that 75 % of all HTU by area will not violate the CFL criteria, while for the others there is a risk that the solution will not be correct. As a consequence it needs to be verified that this compromise on the quality of the numerical solution on some HTUs will not affect the simulated discharge at the spatial scales of interest. We found that the time steps determined with this method are more dependent on the atmospheric resolution than the hydrological truncation. This is quite convenient, as with a refining of the atmospheric grid the time step of the processes which have the land surface scheme as a lower boundary will also decrease. Thus increasing the frequency at which the routing scheme will need to be called is not a strong constraint.

This section explores the convergence of the simulated discharge with the selected time step (

These simulations are evaluated at a limited number of gauging stations which cover a range of upstream areas and climates. From the over 3800
stations placed on the river graphs of the Euro-Mediterranean region only a few were selected with upstream areas ranging from 2500
to 8

The length of the time step is first tested on the graph produced with MERIT for the WFDEI grid using

At each station and for the range of time steps tested, the fraction of HTUs for which the flux limiter has been activated in the upstream catchment. The black line indicates the recommended time step for the WFDEI grid and MERIT HDEM.

As a first step, we examine the fraction of HTUs where the flux limiter has to be applied to streamflow. As this variable is quite constant
throughout the period analysed, only the mean is shown in Fig.

Comparing simulations on the WFDEI grid (with the MERIT HDEM and

Figure

The right column in Fig.

Convergence of simulated discharge with increasing time steps on the three different grids presented in Table

Figure

The same type of analysis can be performed to explore the impact of the number of HTUs used per grid cell on the time step. Using small values for

Simulations on the WFDEI grid (with the MERIT HDEM and

The

For all stations where a significant degradation of the simulation occurs, it takes place below

Based on the analysis of the graphs presented in Sect.

The impact of the atmospheric grid is evaluated by comparing the WFDEI simulation to the three other grids (E2OFD, EuroMED and MEDCORDEX) for the MERIT HDEM. The MEDCORDEXHS label indicates the MEDCORDEX grid using the HydroSHEDS HDEM (see Table

Figure

It is an important result that for the range of atmospheric grids tested here, an optimal truncation and time step can be selected according to the
criteria defined above which provide a converged solution. That is, the simulated streamflow and temperatures are relatively insensitive to higher
truncation or shorter time steps, thus optimizing the numerical cost of the model. This also removes the necessity to adjust the parameters

Nevertheless, some caveats have to be kept in mind. The numerical verifications presented above were performed using output from an ORCHIDEE
simulation forced by the WFDEI-GPCC forcing at 0.5

Once reliable kilometre-scale atmospheric forcings are available the numerical analysis presented here should be revisited with particular attention to flood events in small catchments. It will allow us to evaluate at which stage a smaller quantile in the residence time should be selected and how important this choice is for representing the extreme hydrological events we are interested in.

In order to appreciate the importance of the numerical choices presented above, the routing scheme is evaluated jointly with ORCHIDEE at two different
resolutions but only using the MERIT HDEM. WFDEI and E2OFD

Taylor diagrams comparing observed and simulated monthly discharge and daily stream temperature to observations available at the 35 stations listed in Table

Figure

For discharge these results are well in-line with previous validations of ORCHIDEE

More original for ORCHIDEE is to verify the quality of the simulated stream temperature. The Taylor diagram might give the reassuring impression that the relatively simplistic model used here for temperature is satisfactory. First and foremost we have to remember that stream temperature is less affected by water management than water levels. The temperature in streams is driven by the seasonal cycle of its values over land surfaces, and thus the temporal correlations can be expected to be high. On the ratio of standard deviation it can already be noted that the amplitude of the stream temperature is overestimated with the simple model proposed here. The stations of Porte du Scex and Diepoldsau (Stations 5 and 6, respectively) are outliers and will be considered in more detail in the next section.

Mean annual cycle of monthly mean river discharge and temperature at the Lobith station on the Rhine and Nagymaros on the Danube. For the observations the inter-annual variability in the monthly values is displayed as error bars. The two reference configurations (WFDEI and E2OFD) are drawn with plain colours, while the two sensitivity experiments carried out with WFDEI are given as dotted lines.

To better understand the qualities and limitations of the simple temperature scheme proposed here, let us examine two stations with a large upstream
area and an excellent observational record: Lobith on the Rhine and Nagymaros on the Danube (Stations 31 and 32, respectively). These stations were
also used as validation points by models which attempt to incorporate a much wider set of processes governing stream temperature

Seasonal biases at 25 stations where stream temperature is available for the two reference simulations (blue plus symbols for WFDEI and red dots for E2OFD) and for both sensitivity experiments (green downward triangles for the pure advection of both temperatures and purple upward triangles for top temperature advection).

Figure

Given that our approach is relatively simple, it is feasible to better understand the origin of these biases in the simulated annual cycle of stream temperature.

Stream temperature is determined by two fundamental drivers.

First is the temperature at which the water leaves the ground and is often referred to as headwater temperature. For instance,

Second is the energy gained by the stream through interaction with the atmosphere and the landscape as it flows to the ocean. These processes are represented with great detail in some models like HEAT-LINK and VIC. Here they are simplified to a very basic relaxation towards top ground temperature and thus a variable closely related to LST.

Separating these two factors in the deficiencies of the models is key to future developments of the scheme so that errors in the assumptions for the boundary conditions are not compensated for by biases in the interactions of the river with the landscape and atmosphere.

To determine the largest source of error in the simulated stream temperature, two sensitivity experiments are carried out with the WFDEI configuration
in which the interaction with the atmosphere and landscape are suppressed by setting

Runoff and drainage have the temperatures as defined in Sect.

Both water fluxes leaving the soil moisture scheme have the temperature of the topsoil layers (0–0.3

The fact that the interaction with the atmosphere and landscape is suppressed in both these experiments leads to a strong underestimation of the
summer stream temperature (Fig.

More interesting for the model development is the dependence of the winter temperature bias on the assumption made for the headwater
values. Figure

It is expected that in winter the interaction with the landscape and the atmosphere will cool streams, as they are warmer than their environment. This
is also what is found here when comparing WFDEI and WFDEI_Adv. Thus, in order to have simultaneously the correct interaction with the atmosphere and
correct headwater temperature, the drainage temperature should be warmer than the 3–17

In the Alpine region, winter stream temperatures have been shown to warm more slowly than in other seasons

This paper proposes a methodology to decompose any atmospheric grid into a graph of hydrological transfer units (HTUs) based on a digital elevation
model which includes flow directions (HDEM). This network allows us to perform a hybrid routing which combines a vector-based with a grid-based approach

The algorithm introduces a truncation parameter which determines the maximum number of HTUs as chosen by the user. This allows for applications which do not require all the hydrological details of river flows to reduce the memory consumption of their land surface model by specifying a lower number of sub-grid elements. With a statistical sampling of random river segments the error introduced by the aggregation of the HDEM information at the HTU level is quantified. We recommend using a truncation which reduces the total average error in the segments to the cell level error. This ensures that the graphs are correctly connected and minimizes the topological error. The optimal truncation will depend on the resolution of the atmospheric grid and the HDEM used.

The graphs of HTUs would be useless if the water continuity equation could not be solved with a reasonable time step. We propose to use the 25 % quantile of the area-weighted residence time as an optimal time step for the routing scheme. This ensures that 75 % of the HTUs by area are numerically stable. It yields a time step which is compatible with the one of the land surface model. We find that the time step varies more with the spatial resolution of the atmospheric grid than the truncation of the graph. For the four resolutions tested it is equal to or larger than the one typically used for ORCHIDEE when coupled to the atmosphere. The time step can probably be increased if the continuity equation on the sub-grid part of the graph is solved implicitly. This would increase the computational efficiency of the routing scheme, as it could be called less frequently by the land surface scheme.

Any routing scheme will have adjustable parameters in order to determine the residence time in the aquifers and surface reservoirs. ORCHIDEE has one parameter per reservoir represented in the transport scheme. We find that changing the resolution of the atmospheric grid or the truncation does not require these parameters to be readjusted. The simulated discharge is not affected in any significant way by the resolution changes. Tests comparing two kilometre-scale HDEMs also show that the parameters were largely independent of the hydrological information used to build the HTU graph. This is a very important result, as it means that the routing scheme can be used over a large range of configurations of the ESM without having to be adjusted. Thus expertise can be transferred from one resolution to the other. Our hypothesis is that the repartition between surface runoff and drainage of excess water in the soil moisture reservoir is the main driver for the optimal values of the parameters. Thus as the representation of the unsaturated soils evolves in ORCHIDEE the parameters of the routing scheme will have to be verified.

To demonstrate the value of the hybrid routing scheme on a graph of HTU a simple temperature transport scheme is implemented. It is remarkable that it produces results comparable to much more elaborated schemes. We attribute this to the fact that in summer the energy balance over open water is relatively close to the one simulated by ORCHIDEE, and thus a simple relaxation is a good first approximation. More importantly, the simplicity of the scheme allows us to reveal the reason for the poor performance in winter which is also found in more complex models. During this season the bias is caused by the boundary condition of the temperature scheme. The water appears not to stay long or deep enough in the ground in order to reach the streams with a sufficiently high temperature. It points to a limitation of the groundwater representation in the current formulation of the routing scheme rather than the temperature scheme.

This demonstration of the numerical robustness of the hybrid routing scheme of ORCHIDEE is an excellent starting point for future
developments.

Lakes, artificial reservoirs or dams can be placed onto the HDEM. During the construction phase of the HTUs this information can then be transferred
and aggregated to the level of the hybrid routing scheme. It can then be used to predict water volumes and functioning of these hydrological
elements. This can then be combined with the lake energy balance model

The HTU graph can be enhanced with adduction networks. They link demand points like irrigated areas, power plants (for hydro power generation or
cooling of other plants) or domestic needs to the most appropriate river. Should the demands not be satisfied locally, they can be propagated upstream
on the adjoint HTU graph so that water is released by the appropriate dam

The representation of deeper groundwater will need more attention in the future developments of ORCHIDEE as recommended by the
community

Stations used for the evaluation of the numerical stability and quality of the simulated discharge and stream temperature.

The code version and data used for this study are available at

JP developed the code and designed and executed the numerical evaluations, AS contributed to the code development and evaluation, ED and OB contributed the temperature advection development, LR and JS evaluated the scheme during its development, XZ contributed to the code development and provided the MERIT HDEM, and all co-authors discussed the methodology and contributed to the manuscript.

The contact author has declared that none of the authors has any competing interests.

Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

GRDC and WCRP are thanked for collecting and distributing the discharge and stream temperature data. We are grateful to Dai Yamazaki for providing the MERIT hydrological digital elevation model. Without UKCEH's hospitality the lead author of this study would not have found the time to perform the work. IPSL's Mesocentre is thanked for the computer time. ECOS-Sud has funded the exchanges with the CIMA in Argentina. IPSL-Climate Graduate School-EUR (ANR-11-IDEX-0004-17-EURE-0006) is thanked for their support to the model development presented here.

ECOS-Sud has funded the exchanges between IPSL in Paris and CIMA in Argentina through contract ECOS-A18D04.

This paper was edited by Wolfgang Kurtz and reviewed by three anonymous referees.