Figure 1: Schematic overview of the main steps for creating the freshwater variables and the GRASS GIS14 functions used.
From: Near-global freshwater-specific environmental variables for biodiversity analyses in 1 km resolution

First the vectorised HydroSHEDS12 stream network was transformed into grids and the stream order computed, and this layer was used to recondition the Digital Elevation Model12 (DEM). The corrected DEM was then used to calculate the flow direction and to delineate the upstream sub-catchment for each cell along the stream network. Various metrics (min, max, range, average, sum, weighted average and weighted sum) were extracted as text-files from existing climate6, topography12, land cover8, surface geology20, and soil21 data sets, where each text-file contained the different metrics of a given variable. Once all catchments were processed, the text-files were merged and reclassified into a spatial grid, representing continuous upstream variables. Finally, lakes and reservoirs were extracted from the 1 km gridded Global Lakes and Wetlands Database13 and the variables were averaged across each single lake and reservoir entity that intersected with the stream network.