This function will read all necessary hourly meteological data from SAFRAN netCDF files in a directory.
The variables readed from the SAFRAN netCDF files are the following:
Tair : Air temperature, transformed from °K to °C
Qair : Air humidity
Wind : Wind velocity
LWdown : Long wave radiation
SWdown : Shortwave radiation (direct + indirect)
Arguments
- folder_data
Path to the folder containing all netCDF SAFRAN files
- folder_export
Path to the folder where export files will be written
- shapefile
Shapefile where all SAFRAN grid IDs are writen for T-NET. Can be .shp of .gpkg file.
- start
Starting year to read the SAFRAN data.
- end
Ending year to read SAFRAN data.
Details
This function will read all files in the 'folder_data' path,
check if the date in the data in the file is after 'start' and before 'end', read
all IDs in the 'shapefile' and store the results in 'folder_export' path.
All info can came from the result of the TNET_initializeSim()
function using 'TNET_readSAFRAN(infoSimu)'
Examples
## Run directly the function providing all info
TNET_readSAFRAN(folder_data = "path/to/SAFRANfolder",
folder_export = "path/to/ExportFolder",
shapefile = "path/to/shapefile.shp",
start = "2002-08-01 00:00:00",
end = "2017-07-31 23:00:00")
#> Error: Cannot open "path/to/shapefile.shp"; The file doesn't seem to exist.