diff --git a/sup3r/bias/base.py b/sup3r/bias/base.py index d84d36a45c..8dcf8ba03f 100644 --- a/sup3r/bias/base.py +++ b/sup3r/bias/base.py @@ -42,8 +42,7 @@ def __init__( base_handler_kwargs=None, bias_handler_kwargs=None, decimals=None, - match_zero_rate=False, - pre_load=True, + match_zero_rate=False ): """ Parameters @@ -101,10 +100,6 @@ class is used, all data will be loaded in this class' will not be mean-centered. This helps resolve the issue where global climate models produce too many days with small precipitation totals e.g., the "drizzle problem" [Polade2014]_. - pre_load : bool - Flag to preload all data needed for bias correction. This is - currently recommended to improve performance with the new sup3r - data handler access patterns References ---------- @@ -182,29 +177,11 @@ class is used, all data will be loaded in this class' distance_upper_bound=self.distance_upper_bound, ) - if pre_load: - self.pre_load() - self.out = None self._init_out() logger.info('Finished initializing DataRetrievalBase.') - def pre_load(self): - """Preload all data needed for bias correction. This is currently - recommended to improve performance with the new sup3r data handler - access patterns""" - - if hasattr(self.base_dh, 'compute'): - logger.info('Pre loading baseline unbiased data into memory...') - self.base_dh.data.compute() - logger.info('Finished pre loading baseline unbiased data.') - - if hasattr(self.bias_dh, 'compute'): - logger.info('Pre loading historical biased data into memory...') - self.bias_dh.data.compute() - logger.info('Finished pre loading historical biased data.') - @abstractmethod def _init_out(self): """Initialize output arrays""" diff --git a/sup3r/bias/qdm.py b/sup3r/bias/qdm.py index b53b215050..af47c93f8c 100644 --- a/sup3r/bias/qdm.py +++ b/sup3r/bias/qdm.py @@ -67,8 +67,7 @@ def __init__(self, sampling='linear', log_base=10, n_time_steps=24, - window_size=120, - pre_load=True, + window_size=120 ): """ Parameters @@ -156,10 +155,6 @@ class to be retrieved from the rex/sup3r library. If a Total time window period in days to be considered for each time QDM is calculated. For instance, `window_size=30` with `n_time_steps=12` would result in approximately monthly estimates. - pre_load : bool - Flag to preload all data needed for bias correction. This is - currently recommended to improve performance with the new sup3r - data handler access patterns See Also -------- @@ -211,8 +206,7 @@ class to be retrieved from the rex/sup3r library. If a base_handler_kwargs=base_handler_kwargs, bias_handler_kwargs=bias_handler_kwargs, decimals=decimals, - match_zero_rate=match_zero_rate, - pre_load=False, + match_zero_rate=match_zero_rate ) self.bias_fut_fps = bias_fut_fps @@ -224,19 +218,6 @@ class to be retrieved from the rex/sup3r library. If a shape=self.shape, **self.bias_handler_kwargs) - if pre_load: - self.pre_load() - - def pre_load(self): - """Preload all data needed for bias correction. This is currently - recommended to improve performance with the new sup3r data handler - access patterns""" - super().pre_load() - if hasattr(self.bias_fut_dh, 'compute'): - logger.info('Pre loading future biased data into memory...') - self.bias_fut_dh.data.compute() - logger.info('Finished pre loading future biased data.') - def _init_out(self): """Initialize output arrays `self.out`