File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -319,7 +319,7 @@ def _generate_stacked_data(self, data: xr.Dataset) -> np.ndarray:
319319 np .mean (~ np .isnan (var_to_clean_values ), axis = 0 ) > var_to_clean_threshold
320320 )[0 ]
321321 self .logger .warning (
322- f"Using { len (not_nan_positions )} out of { var_to_clean_values .shape [1 ]} available variables"
322+ f"Using { len (not_nan_positions )} out of { var_to_clean_values .shape [1 ]} available variables \n "
323323 "If this is originated by using few times, please check 'nan_threshold_to_drop' parameter in fit method"
324324 )
325325 var_value_to_replace_nans = self .value_to_replace_nans .get (
Original file line number Diff line number Diff line change @@ -37,10 +37,7 @@ def get_dynamic_estela_predictor(
3737 time - t, where t is specified in the estela dataset.
3838
3939 Parameters
40- ----------ltimes = estela.where(estela.F >= 0, np.nan).traveltime.astype(int)
41- estela_max_traveltime = estela_traveltimes.max().values
42- for traveltime in range(estela_max_traveltime):
43- data = data.w
40+ ----------
4441 data : xr.Dataset
4542 The input dataset with dimensions longitude, latitude, and time.
4643 estela : xr.Dataset
@@ -82,9 +79,11 @@ def get_dynamic_estela_predictor(
8279 if "longitude" not in estela .dims or "latitude" not in estela .dims :
8380 raise ValueError ("Estela must have longitude and latitude dimensions." )
8481 estela = estela .interp_like (data ) # TODO: Check NaNs interpolation
82+
8583 data = data .chunk ({"time" : 365 }).where (estela .F >= 0.0 , np .nan )
8684 estela_traveltimes = estela .where (estela .F >= 0 , np .nan ).traveltime .astype (int )
8785 estela_max_traveltime = estela_traveltimes .max ().values
86+
8887 for traveltime in range (estela_max_traveltime ):
8988 data = data .where (estela_traveltimes != traveltime , data .shift (time = traveltime ))
9089
You can’t perform that action at this time.
0 commit comments