Skip to contents

Calculate the underground flow divided by the wet riverbed area on each Topage segments using J2000 calculations.

Usage

TNET_computeQlatSout(
  path_data,
  path_export,
  shapefile,
  path_J2K_reachpar,
  Export.Qb = FALSE
)

Arguments

path_data

Path to the folder containing all files created by TNET_readJ2K()

path_export

Path where NetCDF file will be exported (must be identical of TNET_computeHydraulic())

shapefile

Path to the shapefile with all info on segments. It must contain the following columns:

\(gid\_new\)ID of the Topage segment
\(ID\_ND\_INI\)ID of the initial node of the segment.
\(ID\_ND\_FIN\)ID of the final node of the segment.
\(J2000\)ID of the J2000 reference segment.
\(P\_J2000\)1 if the Topage ID is the most downstream of the J2000 reference segment, 0 if not.
\(RppA\_BV\)The fraction of the subwatershed area drained by the Topage segment relative to the subwatershed area of the J2000 reference segment (see details section).
\(Longueur\_m\)Length of the river segment (in meters).
path_J2K_reachpar

Path to J2000 result to read reach.par file

Export.Qlat

If TRUE, \(Qlat\) will also be exported (see details)

Value

The underground flow divided by the wet riverbed area (\(Q_{\text{lat\_ms}}\)) as a NetCDF file (Qlat_ms.nc). If Export.Qlat = TRUE, The underground flow (\(Q_{\text{lat}}\)) as a NetCDF file (Qlat.nc) is exported as well. All files are exported in export_path

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 underground lateral flow to use from the J2000 segment. This fraction can be calculated based on the drained area (see \(RppA\_BV\) calculation).
The underground flow divided by the wet riverbed area on each Topage will be calculated using the following formulas:

Step 1 - Calculate underground lateral flow (\(Q_{\text{lat}}\))
$$Q_{\text{lat}} = Q_{\text{lat_J2000}} \cdot RppA\_BV$$

Step 2 - Divide by wet riverbed area
$$Q_{\text{lat_ms}} = \frac{Q_{\text{lat}}}{\left(Longueur\_m \cdot (Bm + 2H)\right)}$$

where:

  • \(Bm\) : Width of the river segment (calculated by TNET_computeHydraulic())

  • \(H\) : Depth of the river segment (calculated by TNET_computeHydraulic())

  • \(RppA\_BV = \frac{\text{Area of the subwatershed of Topage segment}}{\text{Area of the subwatershed of J2000 reference segment}}\)

\(RppA\_BV\) can be calculate with the function TNETshape_computeCoefQcalc()

Examples


TNET_computeQlatSout(path_data = path/to/data,
                     shapefile = path/to/shapefile.shp,
                     path_J2K = path/to/J2KOutput)
#> Error: object 'to' not found
         
              
              
############################################################
## 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_readJ2K(...) #Read HRULoop.dat file
#> Error: '...' used in an incorrect context

TNET_computeQ(...)
#> Error: '...' used in an incorrect context

TNET_computeHydraulic(...)
#> Error: '...' used in an incorrect context

TNET_computeQlatSout(path_data = infoSimu$path_Export_tmp,
                     path_export = infoSimu$hydroPath,
                     shapefile = infoSimu$TOPAGE_shape,
                     path_J2K_reachpar = infoSimu$path_J2Kparameter)
#> Error: object 'infoSimu' not found