Skip to contents

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)

Usage

TnetSAFRAN_readfilesNetCDF(folder_data, folder_export, shapefile, start, end)

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.

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")
#> ⠙ Reading SAFRAN Data: Preparing computation
#> Error: Cannot open "path/to/shapefile.shp"; The file doesn't seem to exist.
#>  Reading SAFRAN Data: Preparing computation [7ms]
#>