credit.solar#
Attributes#
Functions#
|
A TsiDataProvider that returns ERA5 compatible TSI data. From [Graphcast](google-deepmind/graphcast). |
|
Returns TSI values for the given timestamps. |
|
Calculate top of atmosphere solar irradiance |
|
Calculate total solar irradiance at a single location over a range of times. Solar irradiance is integrated |
|
Module Contents#
- credit.solar.era5_tsi_data() xarray.DataArray#
A TsiDataProvider that returns ERA5 compatible TSI data. From [Graphcast](google-deepmind/graphcast).
- credit.solar.tsi_data#
- credit.solar.get_tsi(timestamps: collections.abc.Sequence, tsi_data: xarray.DataArray) numpy.array#
Returns TSI values for the given timestamps.
TSI values are interpolated from the provided yearly TSI data.
- Parameters:
timestamps – Timestamps for which to compute TSI values.
tsi_data – A DataArray with a single dimension time that has coordinates in
of (units of years since 0000-1-1. E.g. 2023.5 corresponds to the middle)
2023. (the year)
- Returns:
An Array containing interpolated TSI data.
- credit.solar.get_toa_radiation(start_date: str, end_date: str, step_freq: str = '1h', sub_freq: str = '10Min')#
Calculate top of atmosphere solar irradiance
- Parameters:
start_date (str) – Start date of time series
end_date (str) – End date of time series (inclusive).
step_freq (str) – How much time between steps in pandas time string format (e.g., 1h, 10Min)
sub_freq (str) – How much time between substeps that are integrated forward (e.g., 10Min)
- Returns:
top of atmosphere radiation in W m**-2.
- credit.solar.get_solar_radiation_loc(toa_radiation: pandas.Series, lon: float, lat: float, altitude: float, start_date: str, end_date: str, step_freq: str = '1h', sub_freq: str = '10Min', solar_var: str = 'tsi') xarray.Dataset#
Calculate total solar irradiance at a single location over a range of times. Solar irradiance is integrated over the step frequency at specified substeps.
- Parameters:
toa_radiation (pd.Series) – Top of atmosphere solar radiation in W m**-2.
lon (float) – longitude.
lat (float) – latitude.
altitude (float) – altitude in meters.
start_date (str) – date str for the beginning of the period (inclusive).
end_date (str) – date str for the end of the period (inclusive).
step_freq (str) – period over which irradiance is integrated. Defaults to “1h”.
sub_freq (str) – sub step frequency over the step period. Defaults to “5Min”.
- Returns:
total solar irradiance and cosine of solar zenith angle time series with metadata.
- Return type:
xarray.Dataset
- credit.solar.get_solar_index(curr_date, ref_date='2000-01-01')#
- credit.solar.lons#