sup3r.utilities.utilities.daily_temporal_coarsening
- daily_temporal_coarsening(data, temporal_axis=3)[source]
Temporal coarsening for daily average climate change data.
This method takes the sum of the data in the temporal dimension and divides by 24 (for 24 hours per day). Even if there are only 8-12 daylight obs in the temporal axis, we want to divide by 24 to give the equivalent of a daily average.
- Parameters:
data (np.ndarray) – Array of data with a temporal axis as determined by the temporal_axis input. Example 4D or 5D input shapes: (spatial_1, spatial_2, temporal, features) (observations, spatial_1, spatial_2, temporal, features)
temporal_axis (int) – Axis index of the temporal axis to be averaged. Default is axis=3 for the 5D tensor that is fed to the ST-GAN.
- Returns:
coarse_data (np.ndarray) – Array with same dimensions as data with new coarse resolution, temporal dimension is size 1