Reading meteorological data from SAFRAN NetCDF files
Source:R/TnetSAFRAN.R
TnetSAFRAN_readfilesNetCDF.RdThis 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.
- date_start
character (see
TooffR::text_toDate()) or POSICxt or numeric. Starting date (or starting year) to read the file.- date_end
character (see
TooffR::text_toDate()) or POSICxt or numeric. Ending date (or ending year) to read the file.
Value
NetCDF files containing all needed meteorological data for T-NET, one file is created for each exported variables
Examples
## Run directly the function providing all info
TnetSAFRAN_readfilesNetCDF(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 in TnetSAFRAN_readfilesNetCDF(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"): unused arguments (start = "2002-08-01 00:00:00", end = "2017-07-31 23:00:00")