From 6bf19bbcd444244e96d9b9e9f7cfb78e54de186c Mon Sep 17 00:00:00 2001 From: grantbuster Date: Fri, 16 Feb 2024 12:21:42 -0700 Subject: [PATCH] cs ghi bug fix --- sup3r/preprocessing/data_handling/nc_data_handling.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sup3r/preprocessing/data_handling/nc_data_handling.py b/sup3r/preprocessing/data_handling/nc_data_handling.py index 5b2ab91f4..629a40760 100644 --- a/sup3r/preprocessing/data_handling/nc_data_handling.py +++ b/sup3r/preprocessing/data_handling/nc_data_handling.py @@ -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