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
string Path to the folder containing all files created by
TNET_readJ2K()
- path_export
string Path where NetCDF file will be exported
- shapefile
string Path to the shapefile with all info on segments. All needed columns are in details section.
- hydro_model
string Hydrological model used for the computation. can be
J2000
orEROS
Details
Before using this function, all Topage segments must have been linked to a J2000 segment. Furthermore, TNETshape_computeCoefQcalc()
must be
execute before in order to have the rignt ratios in order to dispatch discharge data on Topage network
Water flow on each Topage segment will be calculated using the following formulas:
In both exemple, \(RppAr\_v\) and \(air\_strNFS\) can be calculate with the function TNETshape_computeCoefQcalc()
If hydro_model = 'J2000'
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}}\)
Columns needed in shapefile
\(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). |
If hydro_model = 'EROS'
Calculate Downstream flow (\(Q_{\text{aval}}\))
$$Q_{\text{aval}} = Q_{\text{contributif}} \cdot \text{air_strNFS} + \sum_{BV_{\text{amont}}}(Q_{\text{cum}})$$
where: \(air\_strNFS = \frac{\text{Length of all upstream segments in the sub-watershed} + \text{Length of the segment}}{\text{Sum of all segments length in the sub-Watershed}}\)
Columns needed in the shapefile
\(OBJECTID\_1\) | ID of the Topage segment |
\(BV\) | ID of the EROS watershed of the segment |
\(air\_strNFS\) | The fraction of the downstream of the segment to dispatch BV contributif discharge (see deails section). |
\(bv\_amont1\) | EROS watershed n°1 uptstream of the segments. |
\(bv\_amont2\) | EROS watershed n°2 uptstream of the segments. |
\(bv\_amont3\) | EROS watershed n°3 uptstream of the segments. |
\(bv\_amont4\) | EROS watershed n°4 uptstream of the segments. |
\(bv\_amont5\) | EROS watershed n°5 uptstream of the segments. |
\(bv\_amont6\) | EROS watershed n°6 uptstream of the segments. |
\(bv\_amont7\) | EROS watershed n°7 uptstream of the segments. |
\(bv\_amont8\) | EROS watershed n°8 uptstream of the segments. |
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