|
10 | 10 | import xarray as xr |
11 | 11 |
|
12 | 12 | import nowcasting_dataset.time as nd_time |
| 13 | +from nowcasting_dataset.consts import SAT_VARIABLE_NAMES |
13 | 14 | from nowcasting_dataset.data_sources.data_source import ZarrDataSource |
14 | 15 | from nowcasting_dataset.data_sources.satellite.satellite_model import Satellite |
15 | 16 | from nowcasting_dataset.dataset.xr_utils import join_list_data_array_to_batch_dataset |
16 | 17 |
|
17 | 18 | _LOG = logging.getLogger("nowcasting_dataset") |
18 | 19 |
|
19 | 20 |
|
20 | | -from nowcasting_dataset.consts import SAT_VARIABLE_NAMES |
21 | | - |
22 | | - |
23 | 21 | @dataclass |
24 | 22 | class SatelliteDataSource(ZarrDataSource): |
25 | 23 | """ |
@@ -139,6 +137,43 @@ def datetime_index(self, remove_night: bool = True) -> pd.DatetimeIndex: |
139 | 137 |
|
140 | 138 | Args: |
141 | 139 | remove_night: If True then remove datetimes at night. |
| 140 | + We're interested in forecasting solar power generation, so we |
| 141 | + don't care about nighttime data :) |
| 142 | +
|
| 143 | + In the UK in summer, the sun rises first in the north east, and |
| 144 | + sets last in the north west [1]. In summer, the north gets more |
| 145 | + hours of sunshine per day. |
| 146 | +
|
| 147 | + In the UK in winter, the sun rises first in the south east, and |
| 148 | + sets last in the south west [2]. In winter, the south gets more |
| 149 | + hours of sunshine per day. |
| 150 | +
|
| 151 | + | | Summer | Winter | |
| 152 | + | ---: | :---: | :---: | |
| 153 | + | Sun rises first in | N.E. | S.E. | |
| 154 | + | Sun sets last in | N.W. | S.W. | |
| 155 | + | Most hours of sunlight | North | South | |
| 156 | +
|
| 157 | + Before training, we select timesteps which have at least some |
| 158 | + sunlight. We do this by computing the clearsky global horizontal |
| 159 | + irradiance (GHI) for the four corners of the satellite imagery, |
| 160 | + and for all the timesteps in the dataset. We only use timesteps |
| 161 | + where the maximum global horizontal irradiance across all four |
| 162 | + corners is above some threshold. |
| 163 | +
|
| 164 | + The 'clearsky solar irradiance' is the amount of sunlight we'd |
| 165 | + expect on a clear day at a specific time and location. The SI unit |
| 166 | + of irradiance is watt per square meter. The 'global horizontal |
| 167 | + irradiance' (GHI) is the total sunlight that would hit a |
| 168 | + horizontal surface on the surface of the Earth. The GHI is the |
| 169 | + sum of the direct irradiance (sunlight which takes a direct path |
| 170 | + from the Sun to the Earth's surface) and the diffuse horizontal |
| 171 | + irradiance (the sunlight scattered from the atmosphere). For more |
| 172 | + info, see: https://en.wikipedia.org/wiki/Solar_irradiance |
| 173 | +
|
| 174 | + References: |
| 175 | + 1. [Video of June 2019](https://www.youtube.com/watch?v=IOp-tj-IJpk) |
| 176 | + 2. [Video of Jan 2019](https://www.youtube.com/watch?v=CJ4prUVa2nQ) |
142 | 177 | """ |
143 | 178 | if self._data is None: |
144 | 179 | sat_data = self._open_data() |
|
0 commit comments