Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Gets an area of interest around dams (upstream, downstream and around reservoirs) to measure comparative impacts over time

License

NotificationsYou must be signed in to change notification settings

chrislittleboy/damaoi

Repository files navigation

The “damAOI” application

The “damAOI” application allows researchers to create AOIs which are atthe same time locally nuanced and consistent across contexts. We usedata sources on elevation, river flow, water bodies and dam constructionsites to allow researchers to programmatically define their AOIs. Theapplication was written in statistical softwareR and is designed tohelp standardize the way we consider the impacts of dams.

Data preprocessing

Reproject and align

The functions in damAOI use the following input data:

Input data can come in many different projections. Thepreprocessingfunction reprojects all spatial data to the Universal TransverseMercator (UTM) zone where a reservoir is located, and crops it to apre-specified distance away from the reservoir defined by theriverdistance parameter.

Here we show how to use the preprocessing function for the package dataon Tehri Dam in Uttarakhand, India.

# load package datafac_tehri<- rast("./inst/extdata/fac_tehri.tif")dem_tehri<- rast("./inst/extdata/dem_tehri.tif")wb_tehri<- rast("./inst/extdata/wb_tehri.tif")# preprocess datapreprocessed<- preprocessing(reservoir=tehri,dem=dem_tehri,fac=fac_tehri,water_bodies=wb_tehri,basins=basins_tehri,river_distance=30000)tehri_utm<-preprocessed[[1]]tehri_dem_utm<-preprocessed[[2]]tehri_fac_utm<-preprocessed[[3]]basins_tehri_utm<-preprocessed[[4]]tehri_wb_utm<-preprocessed[[5]]espg<-preprocessed[[7]]

Reservoir polygon corrections

Polygons of dam reservoirs are usually obtained from globalgeoreferenced datasets. Some polygons in these datasets are inconsistentwith true water extent of reservoirs, largely because of inconsistenciesin the time of year that reservoir extents are measured or when toconsider a wide river as part of the reservoir. Theadjustreservoirpolygon function in our application allows users tomatch water cover of a background source of water extent. We suggest theCCI Global Water Bodies dataset: for larger dams the 300m2resolution is sufficient, and the globally consistent algorithm fordetermining surface water extent is key.

# adjust original polygon using flow accumulation and water bodies data.tehri_adjusted<- adjustreservoirpolygon(reservoir=tehri_utm,water_bodies=tehri_wb_utm,dem=tehri_dem_utm)# create a data frame for water body data for plottingwbdf<- as.data.frame(crop(tehri_wb_utm,tehri_adjusted),xy=T)ggplot()+   geom_sf(data=tehri_adjusted,col='#228833',fill=NA,lwd=1)+# adjusted polygon  geom_sf(data=tehri_utm,col='#EE6677',fill=NA,lwd=1)+# original polygon  geom_tile(data=wbdf, aes(x=x,y=y),fill='#4477AA',alpha=0.5)+# CCI water bodies  theme_void()

Here the green outline shows the adjusted polygon, the red outline showsthe original polygon, and the background blue shows the water bodiesdata from the CCI.

Pour points

Pour points are the locations where rivers pour into and out ofreservoirs. For many reservoirs, pour points can be found automatically.The pour in point(s) – where the upstream river(s) join reservoirs –typically experience the largest difference in accumulated flow, whichcan be computed directly from FAC hydrology data. The pour out point –the dam location – is often known. This can also be derived using themaximum FAC value of the reservoir. For other reservoirs, pour pointsneed to be determined by users and in our package we have developed aShiny app which lets users select pour points using a leaflet map. Thisis for reservoirs with irregular shapes or when many rivers feed into asingle reservoir.

# automatically get pour points using reservoir and flow accumulation datapourpoints<- autogetpourpoints(reservoir=tehri_adjusted,fac=tehri_fac_utm)st_crs(pourpoints)<- st_crs(tehri_adjusted)# convert flow accumulation data to a data frame for plottingfacdf<- as.data.frame(tehri_fac_utm,xy=T)ggplot()+  geom_tile(data=facdf, aes(x=x,y=y))+  geom_sf(data=tehri_adjusted)+  geom_sf(data=pourpoints, aes(col= as.factor(direction)))+  scale_color_manual(values= c('#228833','#EE6677'),labels= c("Pour in","Pour out"))+  theme_void()+  labs(col="")

Build river lines

To map river paths digitally, we built an algorithm using DigitalElevation Model (DEM) data and Flow ACumulation data (FAC). We recommendusing HydroSHEDS 15s data as input data for the algorithm. The DEMcontains the average elevation in each grid cell in meters. FAC valuesare unitless, and simply measure the aggregated number of cells (in thiscase ~450m grid cells) that have accumulated to form the river at eachcell. If a river was 200 cells long, and was joined by another 300 cellslong, the flow accumulation one cell downstream of the confluence wouldbe 501.

For the downstream river line the algorithm begins at the point in thereservoir with the highest accumulation. It searches nearby grid cellsin the FAC data which are ‘water’ and selects the nearest point with ahigher accumulation and a lower elevation. This is an iterative process,and continues for as far downstream as the user wishes to consider. Forus, the default is 100km downstream.

For the upstream river line the algorithm begins at the point in thereservoir with the lowest accumulation. It searches nearby points whichhave water of a similar accumulation (to eliminate the river beingdiverted to insignificant upstream springs). Of these cells, it selectsthe nearest point with a lower accumulation and a higher elevation. Thisprocess is again repeated iteratively up to a set distance away from thereservoir.

riverpoints<- lapply(X=1:2,# for each of the two pourpointsFUN=getriverpoints,# run the getriverpoints functionreservoir=tehri_adjusted,pourpoints=pourpoints,river_distance=30000,ac_tolerance=50,e_tolerance=10,nn=20,fac=tehri_fac_utm,dem=tehri_dem_utm)# converts each list of points into an sf LINESTRINGriverlines<- pointstolines(riverpoints,espg=espg)ggplot(tehri_adjusted)+  geom_sf()+  geom_sf(data=riverlines[[1]],col='#EE6677')+  geom_sf(data=riverlines[[2]],col='#4477AA')+  theme_void()

This is done with theriverpoints function. Theriver_distanceparameter sets how far upstream and downstream to follow the river. Thenn parameter sets the number of nearest neighbours (water bodies) toassess for these conditions. Theac_tolerance parameter sets athreshold for the point-to-point flow accumulation increase. This is sothat at major confluences the algorithm will stop finding pointsdownstream. Thee_tolerance parameter sets a threshold for theacceptable elevation increase if there are no points downstream(upstream) which have a lower (higher) elevation. This is important asdownstream points can erroneously have a slightly higher elevation valuein steep gorges because DEM values are an average across an area whichcan be larger than the width of rivers.

Thepointstolines function converts the points and associatedinformation generated byriverpoints to an sf linestring.

Build AOI polygons

# creates buffers around river lines and reservoir buffers.bnb<- basinandbuffers(reservoir=tehri_adjusted,upstream=riverlines[[1]],downstream=riverlines[[2]],basins=basins_tehri_utm,streambuffersize=1500,reservoirbuffersize=3000)ggplot(bnb[[1]] %>% mutate(area= c("res","down","up")))+  geom_sf(aes(fill= as.factor(area)),alpha=0.3)+  geom_sf(data=bnb[[2]] %>% mutate(area= c("res","down","up")),          aes(fill= as.factor(area)))+  geom_sf(data=tehri_adjusted,fill="grey")+  theme_void()

Thebasinsandbuffers function extracts buffers for the lines andreservoir first. Thestreambuffersize parameter defines the size ofthe buffer around river lines. Thereservoirbuffersize parameterdefines the size of buffer around the reservoir. Once buffers have beencalculated, the function clips these areas by the river basins, so thatareas beyond topographical barriers to water are not considered. Hereshows the overlay of clipped polygons and the buffers themselves.

Dam systems

Some rivers have many connected dams and reservoirs. In such instances,combining Areas of Interest for multiple dams is needed. Themakesystems function does this using the AOIs for all dams which forma system on the same river. Reservoirs for each dam are combined into ansf MULTIPOLYGON of all reservoirs. Areas around reservoirs are combined,ensuring that they exclude any areas which are reservoirs of other damson the system. Upstream areas are defined as the upstream area of thereservoir in the system with the highest elevation. Downstream areas aredefined as the downstream area of the reservoir in the system with thelowest elevation. And “between” areas include any rivers which flowbetween reservoirs, which are not captured in the areas aroundreservoirs.

# gets names of reservoirs to be combined into the same systemnames<- unique(system$name)# gets the dem of the dam system, to automatically determine the highest and lowest reservoirs in the systemdem_system<- rast("./inst/extdata/dem_system.tif")# Combines AOIs in a dam systemsystem_corrected<- makesystem(names=names,aois=system,dem_system)ggplot()+  geom_sf(data=system_corrected, aes(fill=area))+  scale_fill_brewer(palette="Set2")+  theme_void()+  labs(fill="")

About

Gets an area of interest around dams (upstream, downstream and around reservoirs) to measure comparative impacts over time

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp