README.md

assimReservoirs

The aim of this package is the assimilation of reservoir extents in Ceará, northeast Brazil. With the use of meteorological observations, the reservoir extent shall be modeled in order to complement the reservoir extent estimations based on remote sensing jmigueldelgado/buhayra.

Examples

library(assimReservoirs)

#####################################################################################+
# Data preprocessing ####

# Routing of strategic and non-strategic reservoirs
res_max <- Routing_strat()

res_max <- Routing_non_strat()

# Estimate runoff contributing areas for all reservoirs
res_max <- runoff_contributing_area()

#####################################################################################+
# Download and interpolate rain data for a specific catchment ####

catch <- contributing_basins_shape(shape = res_max[res_max$id_jrc == 25283,])
catch <- contributing_basins_res(ID = 25283)
plot_contributing_basins(catch, shape = res_max[res_max$id_jrc == 25283,])

gauges_catch <- rain_gauges_catch(catch)
plot_gauges_catch(catch, gauges_catch, distGauges = 30)

api <- request_api_gauges(requestDate = as.Date("2018-03-15") , Ndays = 5, gauges_catch)
list_api_rain <- api_rain_raster(catch, gauges_catch, api, distGauges = 30, ID = 25283)
plot_api_rain(list_api_rain)
api_rain <- apiRain(catch, api, date = as.Date("2018-03-15"))


files_world <- get_trmm_world(YEAR = 2019, MONTH = 04, DAY = 12)
trmm_means <- trmmRain(shape = st_transform(catch, "+proj=latlong  +datum=WGS84 +no_defs"), files_world)
plotTRMM(trmm_means)

#####################################################################################+
# Run the model ####
reservoir_model <- reservoir_model(ID = 25283, start = as.Date("2004-01-25"), end = as.Date("2004-02-05"), distGauges = 50)

reservoir_model <- reservoir_model(ID = 31440, start = as.Date("2004-01-24"), end = as.Date("2004-01-30"), distGauges = 30)

Available funcions

Data preprocessing

Download and interpolate rain data for a specific catchment

Model water volume of the reservoirs and flow through the reservoir network

Included data

Outputs

catch output of contributing_basins_shape or contributing_basins_res, the catchment contributing to a reservoir or sf object

gauges_catch output of rain_gauges_catch, a geospatial dataframe with the rain gauges within catch_buffer

api output of request_api_gauges, a dataframe with the precipitation available for the requested dates and gauges

list_api_rain output of api_rain_raster, a list with 2 elements:

files_world output of get_trmm_world, contains the names of the available trmm files

trmm_means output of trmmRain, a geospatial dataframe with the mean TRMM precipitation for each subbasin

reservoir_model a dataframe showing for each timestep reservoir volumes at the beginning (vol_0) and end (vol_1), inflow (Qin_m3) and outflow (Qout_m3)



SophiaDobko/assimReservoirs documentation built on June 4, 2020, 3:58 p.m.