Skip to contents

Estimate the underground water temperature as the mean of the air temperature in the 365 days before. This function use igraph::running_mean() to calculate running mean.

Usage

TnetEROS_computeTg(path_data, path_export = NULL, shapefile)

Arguments

path_data

Path to the folder containing air temperature "Tair.nc" created by tnet_safran_readfiles()

path_export

Path to the folder to export the file "Tg.nc". If NULL, path_export = path_data.

shapefile

Path to the shapefile with all info on segments. See tnet_safran_getInfoFromShape() for all mandatory columns.

Value

All daily underground water temperature in a file Tg.nc in the folder path_data.

Details

The underground temperature of each river segment is set as the underground temperature of the sub watershed in witch there are. The data of the underground temperature of each sub-watershed is provided in a text file and read by the TnetEROS_readfiles() function.

Examples


TnetEROS_computeTg(path_data = path/to/data,
                   path_export = path/to/export/folder,
                   shapefile = path/to/shapefile.shp)
#> Error: object 'to' not found
              
              
############################################################
## Using this function with TNET_initializeSim() function ##
############################################################
infoSimu <- TNET_initializeSim(...)
#> Error: '...' used in an incorrect context

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

TnetEROS_computeTg(path_data = infoSimu$safranPath,
                   path_export = infoSimu$hydroPath,
                   shapefile = infoSimu$TOPAGE_shape)
#> Error: object 'infoSimu' not found