Read all columns of ReachLoop.dat or HRULoop.dat created by J2000 and save them in a NetCDF file (with TNET format)
Usage
TNET_readJ2K(path_J2Kfile, path_Export = NULL, date_start = NULL, date_end = NULL, on.reach = FALSE, path_J2Kpar = NULL)
Arguments
- path_J2Kfile
character Path to the ReachLoop.dat or HRULoop.dat file to open
- path_Export
character Path to export the NetCDF result file. If NULL, data will be saved in the same folder as path_J2Kfile
- date_start
character (see
TooffR::text_toDate()
) or POSICxt. Starting date to read the file.- date_end
character (see
TooffR::text_toDate()
) or POSICxt. Ending date to read the file.- on.reach
logical IGNORED IF REACHLOOP FILE. If TRUE, all data will be saved on reaches by summing all data of HRU's going to corresponding reaches.
- path_J2Kpar
character IGNORED IF
on.reach=FALSE
. Path to the hru.par file. ifNULL
, hru.par file will be read in path_J2Kfile folder.
Examples
TNET_readJ2K(path_J2Kfile = path/to/ReachLoop.dat)
#> Error: object 'to' not found
############################################################
## Using this function with TNET_initializeSim() function ##
############################################################
infoSimu <- TNET_initializeSim(...)
#> Error: '...' used in an incorrect context
#To read ReachLoop.dat file
TNET_readJ2K(path_J2Kfile = file.path(infoSimu$path_J2KOutput,'ReachLoop.dat'),
path_Export= infoSimu$path_Export_tmp,
date_start = infoSimu$startSimu,
date_end = infoSimu$endSimu)
#> Error: object 'infoSimu' not found
#To read HRULoop file
TNET_readJ2K(path_J2Kfile = file.path(infoSimu$path_J2KOutput,'HRULoop.dat'),
path_Export= infoSimu$path_Export_tmp,
date_start = infoSimu$startSimu,
date_end = infoSimu$endSimu,
on.reach = TRUE,
path_J2Kpar = infoSimu$path_J2Kparameter)
#> Error: object 'infoSimu' not found