Compute water flow on Topage segments network using J2000 calculations
Source:R/TNET_computeQ.R
TNET_computeQ.Rd
Extrapolate water flow calculated on J2000 network on river segments of the Topage network using specific flow hypothesis.
Arguments
- path_data
Path to the folder containing all files created by
TNET_readJ2K()
- path_export
Path where NetCDF file will be exported
- shapefile
Path to the shapefile with all info on segments. It must contain the following columns:
\(gid\_new\) ID of the Topage segment \(J2000\) ID of the J2000 reference segment \(RppAr\_v\) The fraction of the area drained downstream of the Topage segment relative to the J2000 reference segment (see details section).
Details
Before using this function, all Topage segments must have been linked to a J2000 segment. Furthermore, each segment must have the fraction of the flow to use from the J2000 segment. This fraction can be calculated based on the drained area.
Water flow on each Topage segment will be calculated using the following formulas:
Calculate Downstream flow (\(Q_{\text{aval}}\))
$$Q_{\text{aval}} = Q_{\text{J2000}} \cdot RppAr\_v$$
where: \(RppAr\_v = \frac{\text{Area drain downstream of Topage segment}}{\text{Area drain downstream of J2000 reference segment}}\)
\(RppAr\_v\) can be calculate with the function TNETshape_computeCoefQcalc()
Examples
TNET_computeQ(path_data = "path/to/data",
path_export = "path/export/folder",
shapefile = "path/to/shapefile.shp")
#> Error: Cannot open "path/to/shapefile.shp"; The file doesn't seem to exist.
############################################################
## Using this function with TNET_initializeSim() function ##
############################################################
infoSimu <- TNET_initializeSim(...)
#> Error: '...' used in an incorrect context
TNET_readJ2K(...) #Read ReachLoop.dat file
#> Error: '...' used in an incorrect context
TNET_computeQ(path_data = infoSimu$path_Export_tmp,
path_export = infoSimu$hydroPath,
shapefile = infoSimu$TOPAGE_shape)
#> Error: object 'infoSimu' not found