File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1616
1717from xcdat import bounds # noqa: F401
1818from xcdat ._logger import _setup_custom_logger
19- from xcdat .axis import get_dim_coords
19+ from xcdat .axis import center_times , get_dim_coords
2020from xcdat .dataset import _get_data_var
2121
2222logger = _setup_custom_logger (__name__ )
@@ -819,6 +819,10 @@ def _averager(
819819 ds = ds .drop_dims (self .dim )
820820 ds [dv_avg .name ] = dv_avg
821821
822+ if self ._mode == "group_average" :
823+ ds = ds .bounds .add_missing_bounds (axes = "T" )
824+ ds = center_times (ds )
825+
822826 if keep_weights :
823827 ds = self ._keep_weights (ds )
824828
@@ -1614,6 +1618,8 @@ def _convert_df_to_dt(self, df: pd.DataFrame) -> np.ndarray:
16141618 """
16151619 df_new = df .copy ()
16161620
1621+ # TODO: This is where the result should be in the middle, not the
1622+ # beginning.
16171623 dt_components_defaults = {"year" : 1 , "month" : 1 , "day" : 1 , "hour" : 0 }
16181624 for component , default_val in dt_components_defaults .items ():
16191625 if component not in df_new .columns :
You can’t perform that action at this time.
0 commit comments