physical_models.py¶
-
lib.physical_models.
angles
(hour, reg_ind, Crd_all, res_desired, orient)¶ This function creates multiple matrices for the whole scope, that represent the incidence, hour angles, declination, elevation, tilt, azimuth and orientation angles of every pixel with the desired resolution.
- Parameters
hour (int) – Hour rank in a year (from 0 to 8759).
reg_ind (tuple of arrays) – indices of valid pixels within the spatial scope (pixels on land).
Crd_all (list) – Coordinates of the bounding box of the spatial scope.
res_desired (list) – Desired high resolution in degrees.
orient (int) – Azimuth orientation of the module in degrees.
- Return (phi, omega, delta, alpha, beta, azi, orientation)
Rasters of latitude, hour, declination, elevation, tilt, azimuth and orientation angles.
- Return type
tuple of arrays
-
lib.physical_models.
calc_CF_solar
(hour, reg_ind, param, merraData, rasterData, tech)¶ This function computes the hourly capacity factor for PV and CSP technologies for all valid pixels within the spatial scope for a given hour.
- Parameters
hour (integer) – Hour within the year (from 0 to 8759).
reg_ind (tuple of arrays) – indices of valid pixels within the spatial scope (pixels on land).
param (dict) – Dictionary including the desired resolution, the coordinates of the bounding box of the spatial scope, and technology parameters.
merraData (dict) – Dictionary of numpy arrays containing the weather data for every point in reg_ind.
rasterData (dict) – Dictionary of numpy arrays containing land use types, Ross coefficients, albedo coefficients, and wind speed correction for every point in reg_ind.
tech (str) – Name of the technology (
'PV'
or'CSP'
).
- Return (CF_pv, CF_csp)
the capacity factors for all the points during that hour for PV and CSP.
- Return type
tuple (numpy array, numpy array)
-
lib.physical_models.
calc_CF_windoff
(hour, reg_ind, turbine, m, n, merraData, rasterData)¶ This function computes the hourly capacity factor for onshore and offshore wind for all valid pixels within the spatial scope for a given hour.
- Parameters
hour (integer) – Hour within the year (from 0 to 8759).
reg_ind (tuple of arrays) – indices of valid pixels within the spatial scope (pixels on land for onshore wind, on sea for offshore wind).
turbine (dict) – Dictionary including the turbine parameters (cut-in, cut-off and rated wind speed).
m (int) – number of rows.
n (int) – number of columns.
merraData (dict) – Dictionary of numpy arrays containing the weather data for every point in reg_ind.
rasterData (dict) – Dictionary of numpy arrays containing the wind speed correction for every point in reg_ind.
- Return CF
Capacity factors for all the valid points during that hour.
- Return type
numpy array
-
lib.physical_models.
calc_CF_windon
(hours, turbine, merraData, rasterData)¶ This function computes the hourly capacity factor for onshore and offshore wind for all valid pixels within the spatial scope for a given hour.
- Parameters
hour (integer) – Hour within the year (from 0 to 8759).
reg_ind (tuple of arrays) – indices of valid pixels within the spatial scope (pixels on land for onshore wind, on sea for offshore wind).
turbine (dict) – Dictionary including the turbine parameters (cut-in, cut-off and rated wind speed).
m (int) – number of rows.
n (int) – number of columns.
merraData (dict) – Dictionary of numpy arrays containing the weather data for every point in reg_ind.
rasterData (dict) – Dictionary of numpy arrays containing the wind speed correction for every point in reg_ind.
- Return CF
Capacity factors for all the valid points during that hour.
- Return type
numpy array
-
lib.physical_models.
coefficients
(beta, ratio, R_b, A_i, f)¶ This function creates three weighting matrices for the spatial scope with the desired resolution, that correspond to the gains/losses caused by tilting to each component of the incident irradiance (direct, diffuse, and reflected).
- Parameters
beta (numpy array) – Raster of tilt angles.
ratio (numpy array) – Diffuse fraction of global horizontal solar radiation using the Erbs model.
R_b (numpy array) – Ratio of incident beam to horizontal beam in the HDKR model.
A_i (numpy array) – Anisotropy index for forward scattering circumsolar diffuse irradiance in the HDKR model.
f (numpy array) – Modulating factor for horizontal brightening correction.
- Return (F_direct, F_diffuse, F_reflected)
Rasters of direct, diffuse and reflected ratios of irradiance.
- Return type
tuple of arrays
-
lib.physical_models.
global2diff
(k_t, dims)¶ This function estimates the global-to-diffuse irradiance ratio using the Erb model.
- Parameters
k_t (numpy array) – Raster of clearness indices.
dims (tuple) – Dimensions of the output (similar to the dimension of the angles).
- Return A_ratio
Raster of global-to-diffuse irradiance ratios.
- Return type
numpy array
-
lib.physical_models.
loss
(G_tilt_h, TEMP, A_Ross, pv)¶ This function creates a temperature loss weighting matrix for the spatial scope.
- Parameters
G_tilt_h (numpy array) – Raster of incident irradiance on the tilted panel.
TEMP (numpy array) – Raster of ambient temperatures in °C
A_Ross (numpy array) – Raster of Ross coefficients for temperature sensitivity.
pv (dict) – Dictionary containing PV-specific parameters for loss coefficient and rated temperature.
- Return LOSS_TEMP
raster of weighting temperature loss.
- Return type
numpy array
-
lib.physical_models.
toa_hourly
(alpha, hour)¶ This function returns the top of the atmosphere normal irradiance based on the solar constant, hour rank, and incidence angle.
- Parameters
alpha (numpy array) – Raster of elevation angles.
hour (int) – Hour rank of the year (from 0 to 8759).
- Return TOA_h
Raster of the normal top of the atmosphere irradiance.
- Return type
numpy array
-
lib.physical_models.
tracking
(axis, A_phi, A_alpha, A_beta, A_azimuth)¶ This function computes the tilt angle and orientation based on the type of tracking, incidence, elevation tilt and azimuth angles.
- Parameters
axis (int) – Number of tracking axes (0, 1, 2). The value
0
means no tracking (fixed rack),1
means single-axis tracking in east-west dimension, and2
means double-axis tracking.A_phi (numpy array) – Raster of latitude angle.
A_alpha (numpy array) – Raster of elevation angle.
A_beta (numpy array) – Raster of tilt angle.
A_azimuth (numpy array) – Raster of azimuth angle.
- Return (A_orient, A_beta)
Tuple of rasters for orientationa and tilt angles for specified tracking type.
- Return type
tuple of arrays