TnetRUI is a R package to prepare all needed data in order to run T-NET.
Installation
The package can be installed using the following way:
remotes::install_gitlab(repo = 'guillaume.hevin/tnet_rui', host = 'forgemia.inra.fr')
It can be loaded using library(TnetRUI)
as any other package.
Dependances
TnetRUI will use the following packages:
data.table
for data.frame computationqs
andncdf4
for file export and importlubridate
for all date manipulationstringr
for string manipulationsrlist
for list manipulationsf
for shapefile manipulationraster
for raster manipulationwhitebox
for drain area computation
Whitebox specification
whitebox
is used in the function TNETshape_computeAreaDrain()
and need some external installation to work.
-
Download the whitebox binary
- The binary can be download on the whitebox website
-
Link the binary to the whitebox package
- The binary needs to be linked to the package using the following sentence
wbt_init(exe_path='/home/user/path/to/whitebox_tools')
Package specification
TnetRUI is divided in 2 differents set of functions: TNET
and TNETshape
. Each function in the package will start by one of these to sentences.
TNETshape
All Tnetshape
function can be use to prepare the river network used for TNET computation.
Clean the TOPAGE river network to be usable by TNET (NOT IMPLEMENTED YET)
Cut or merge river segments depending on what’s needed
Compute drain area of each segments
Compute coeficients to dispacth discharge data on the Topage river network
Get SAFRAN ID to be use on each segments.
Compute segment position for shadow factor computation.
All function can be run using TNETshape_prepare()
function.
More info on TNETshape functions can be found here
TNET
All TNET
function will be used to create all inputs data needed for TNET:
Compute discharge data using J2000 or EROS modelisation.
Compute hydraulic data using EstimKart formulas.
Compute meteological data using SAFRAN modelisation
Put every files in NetCDF format readable by TNET.
More info on TNET functions can be found here