Class: PerezSky

PD. PerezSky

Manages the calculation of Perez sky coefficients.


new PerezSky()

Create a new Perez sky calculator.

Members


:number

angleSunToZenithRadians

The angle of the Sun from the zenith of the sky, in radians.

Type
  • number

:number

atmosphericPrecipitableWaterContent

The precipitable water content of the atmosphere (cm).

Type
  • number

:number

cloudCover

The fractional amount of cloud cover in the sky (0 - 1).

Type
  • number

:number

dayOfTheYear

The index of the day in the year used for eccentricity (0-364).

Type
  • number

:number

diffuseHorIlluminance

The diffuse horizontal illuminance of the sky (Lux).

Type
  • number

:number

diffuseHorIrradiance

The diffuse horizontal irradiance of the sky (W/m^2).

Type
  • number

:number

directBeamIlluminance

The direct beam illuminance of the Sun (Lux).

Type
  • number

:number

directBeamIrradiance

The direct beam irradiance of the Sun (W/m^2).

Type
  • number

:number

horizontalIrradiance

The total diffuse and direct on a horizontal surface (W/m^2).

Type
  • number

:boolean

includeDirect

Whether or not to include the direct component as well as diffuse.

Type
  • boolean

:boolean

outputIlluminance

Whether or not to show calculated illuminance rather than irradiance.

Type
  • boolean

:number

skyBrightness

The calculated sky brightness.

Type
  • number

:number

skyClearness

The calculated sky clearness ratio.

Type
  • number

:Array

skyCoefficients

The five Perez All-Weather Sky coefficients.

Type
  • Array

:number

surfaceDewPointTemperature

The 3-hourly surface dew point temperature (deg.C).

Type
  • number

:number

timeOffset

When in each hour the measured value is taken (0 to 1).

A value of 0 means at the start of each hour, 0.5 means in the middle of each hour and 1 means at the end of each hour. This is required in order to accurately match interpolated sub-hourly values with those displayed in charts and graphs.

Type
  • number

Methods


calcSkyCoeffsFromIlluminance(solar, direct_beam_illum, diffuse_hor_illum)

Calculate Perez sky coefficients from instantaneous illuminance values.

Parameters:
Name Type Description
solar PD.SolarPosition

The current solar position.

direct_beam_illum number

The instantaneous direct beam illuminance from the sky (Lux).

diffuse_hor_illum number

The instantaneous diffuse horizontal illuminance from the sky (Lux).

Returns:

Returns an array of 5 Perez sky coefficients.

Type
Array

calcSkyCoeffsFromIrradiance(solar, direct_beam_irrad, diffuse_hor_irrad)

Calculates the sky distribution from instantaneous solar irradiances.

Parameters:
Name Type Description
solar PD.SolarPosition

The current solar position.

direct_beam_irrad number

The instantaneous direct beam irradiance from the sky (W/m_2).

diffuse_hor_irrad number

The instantaneous diffuse horizontal irradiance from the sky (W/m_2).

Returns:

Returns an array of 5 Perez sky coefficients.

Type
Array

calcSkyCoeffsFromSkyType(solar, sky_type)

Sets Perez sky coefficients based on a given CIE Standard General Sky type.

Parameters:
Name Type Description
solar PD.SolarPosition

The current solar position.

sky_type number

The CIE Standard General Sky type (1 to 16).

Returns:

Returns an array of 5 Perez sky coefficients.

Type
Array

calcSkyCoeffsFromWeatherData(solar, weather)

Calculates the sky distribution from solar irradiances in annual hourly weather data.

Parameters:
Name Type Description
solar PD.SolarPosition

The current solar position.

weather PD.WeatherData

The annual hourly weather data.

Returns:

Returns an array of 5 Perez sky coefficients.

Type
Array

calcSkyCoeffsFromWeatherData_NoInterpolation(solar, weather [, stepped])

Calculates the sky distribution from solar irradiances in annual hourly weather data.

Parameters:
Name Type Argument Description
solar PD.SolarPosition

The current solar position.

weather PD.WeatherData

The annual hourly weather data.

stepped boolean <optional>

WHen true, sub-hourly sampling/interpolation is NOT used.

Returns:

Returns an array of 5 Perez sky coefficients.

Type
Array

setDirectDiffuseToMatchSkyType(sky_type, altitude)

Sets the diffuse horizontal and direct beam illuminances based on the current sky type.

This is used internally when there is no weather data available.

Parameters:
Name Type Description
sky_type number

The CIE Standard General Sky type (1 to 16).

altitude number

An optional solar altitude to deal with sunrise/sunset, in degrees.

Returns:

Returns this sky model instance to support method chaining.

Type
PD.PerezSky