farms.disc module

Created on Wed Jun 25 13:26:21 2014

@author: alopez, aweekley

These are functions adapted from PVL_Python. There were four main changes from the original code

  1. functions were vectorized

  2. pvl_ephemeris expects UTC time

  3. removed unused result calculations

  4. Water and Pressure were changed to vectors from scalers

farms.disc.disc(ghi, sza, doy, pressure=1013.25, sza_lim=87)[source]

Estimate DNI from GHI using the DISC model.

*Warning: should only be used for cloudy FARMS data.

The DISC algorithm converts global horizontal irradiance to direct normal irradiance through empirical relationships between the global and direct clearness indices.

Parameters:
  • ghi (np.ndarray) – Global horizontal irradiance in W/m2.

  • sza (np.ndarray) – Solar zenith angle in degrees.

  • doy (np.ndarray) – Day of year (array of integers).

  • pressure (np.ndarray) – Pressure in mbar (same as hPa).

  • sza_lim (float | int) – Upper limit for solar zenith angle in degrees. SZA values greater than this will be truncated at this value. 87 deg chosen to simulate the FORTRAN code in use by SRRL (from Perez).

Returns:

DNI (np.ndarray) – Estimated direct normal irradiance in W/m2.