solarPOT/Hourly_PV_public/Geographic_potential/Tilted_radiation77b53dfb47edmaster
Tilted_radiation
README.md
Tilted radiation computation
The scripts provided here can be used to compute the tilted radiation (also referred to as irradiance) on a set of roof surfaces, for a given number of time stamps. Python's *pvlib* library is used to compute the direct, diffuse and reflected plane-of-array (POA) radiation components. Snow cover may be considered by providing an albedo input file (with daily data).
In addition to direct, diffuse and global horizontal radiation, as well as roof tilt and azimuth, the extraterrestrial radiation and the relative airmass are needed for the *Perez* model of diffuse radiation. The code may be adapted for use with another model of diffuse radiation, which would not require this information.
The files contained are:
- tilted_irradiance.py: This python script executes the computation of the POA radiation components and saves the results in a netCDF file with two dimensions, namely the rooftop ID ("DF_UID") and the timestamp
- exec_tilted_irrad.sh: The bash script handles the parallel batch computation of the tilted radiation (a maximum size of 100k roofs is recommended per batch)
- merge_tilted_irrad.ipynb: This post-processing script is used to combine the individual batch files to a single netCDF file and to remove any outliers (which may arise from the computation of the direct normal radiation in early morning/late evening hours)
Output file
The output file of the data processing steps here is a netCDF file, by default called "tilted_irradiance.nc", with the following metadata:
- The coordinate "DF_UID" indicates the unique ID of each roof surface in the dataset
- The coordinate "timestamp" gives the unique time steps for which the POA radiation is computed
- The variable "poa_direct" gives the tilted beam radiation, which will later be multiplied with the roof shading (in Technical_potential)
- The variable "poa_sky_diffuse" gives the tilted diffuse radiation (Perez), which is later multiplied with the SVF (in Technical_potential)
- The variable "poa_ground_diffuse" gives the ground reflected radiation, which accounts for the surface albedo
Prerequesites
Functions
In addition to the python packages listed in the general overview, the following two files in the *libs*-folder are required to run the codes provided here:
- util.py provides several utility functions, in particular used for file conversions
- rooftop_handling.py performs the linking between pixels of the meteorological data and the individual roof surfaces
Files
Three input files are required, with the following attributes/variables:
Rooftop file: Csv file with the following columns:
- DF_UID: unique identifier
- XCOORD, YCOORD: coordinates of the centroid of the rooftop
- FLAECHE: tilted area of the rooftop
- panel_tilt: tilt angle of the PANEL (= roof tilt for tilted roofs, and = 30° for flat roofs)
- panel_direction: the aspect angle of the roof (convention: clockwise from north), 180° (south) for flat roofs
Solar radiation file: NetCDF files with the following coordinates:
- x, y: coordiates of the pixel centroids
- timestamp: time identifyier in datetime format, for each hour
and the following variables:
- SIS: global horizontal radiation
- SISDIR: direct horizontal radiation
- DNI: direct normal radiation
- DHI: diffuse horizontal radiation
- DNI_extra: extraterrestrial radiation
- rel_airmass: relative airmass
- apparent_zenith: apparent zenith angle of the sun
- azimuth: apparent azimuth angle of the sun
Albedo file: NetCDF files with the following coordinates:
- x, y: coordiates of the pixel centroids (identical to the solar radiation file)
- month: integer value from 1-12
and the following variable:
- ALB: surface albedo