diff --git a/examples/Fragmentation/Fragmentation_Movie.py b/examples/Fragmentation/Fragmentation_Movie.py index f216fc242..8f0d7d22b 100644 --- a/examples/Fragmentation/Fragmentation_Movie.py +++ b/examples/Fragmentation/Fragmentation_Movie.py @@ -125,6 +125,10 @@ def encounter_combiner(sim): # The following will combine the two datasets along the time dimension, sort the time dimension, and then fill in any time gaps with interpolation ds = xr.combine_nested([data,enc],concat_dim='time').sortby("time").interpolate_na(dim="time") + + # Interpolate in time to make a smooth, constant time step dataset + smooth_time = np.linspace(start=tgood.isel(time=0), stop=tgood.isel(time=-1), num=2400) + ds = ds.interp(time=smooth_time) return ds