Skip to content

Commit

Permalink
Merge pull request #187 from NREL/gb/cs_ghi_bug
Browse files Browse the repository at this point in the history
cs ghi bug fix
  • Loading branch information
grantbuster authored Feb 16, 2024
2 parents d799491 + 6bf19bb commit 4797fe6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sup3r/preprocessing/data_handling/nc_data_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,14 +692,15 @@ def get_clearsky_ghi(self):
if cs_ghi.shape[-1] < len(self.time_index):
n = int(np.ceil(len(self.time_index) / cs_ghi.shape[-1]))
cs_ghi = np.repeat(cs_ghi, n, axis=2)
cs_ghi = cs_ghi[..., :len(self.time_index)]

cs_ghi = cs_ghi[..., :len(self.time_index)]

logger.info(
'Reshaped clearsky_ghi data to final shape {} to '
'correspond with CC daily average data over source '
'temporal_slice {} with (lat, lon) grid shape of {}'.format(
cs_ghi.shape, self.temporal_slice, self.grid_shape))
msg = ('nsrdb clearsky GHI time dimension {}'
msg = ('nsrdb clearsky GHI time dimension {} '
'does not match the GCM time dimension {}'
.format(cs_ghi.shape[2], len(self.time_index)))
assert cs_ghi.shape[2] == len(self.time_index), msg
Expand Down

0 comments on commit 4797fe6

Please sign in to comment.