def _generate_runtime_datasets(dataset):
    """Create xarray Dataset objects that will be used during runtime of one
    simulation.

    Return a 2-length tuple where the 1st item is a Dataset used
    at the initialize stage and the 2st item is a DatasetGroupBy for
    iteration through run steps.

    Runtime data is added to those datasets.

    """
    mclock_dim = dataset.xsimlab.master_clock_dim
    mclock_coord = dataset[mclock_dim].reset_coords(drop=True)
    init_data_vars = {'_sim_start': mclock_coord[0], '_nsteps': dataset.
        xsimlab.nsteps, '_sim_end': mclock_coord[-1]}
    ds_init = dataset.assign(init_data_vars).drop_dims(mclock_dim)
    step_data_vars = {'_clock_start': mclock_coord, '_clock_end':
        mclock_coord.shift({mclock_dim: 1}), '_clock_diff': mclock_coord.
        diff(mclock_dim, label='lower')}
    ds_all_steps = dataset.drop(list(ds_init.variables), errors='ignore').isel(
        {mclock_dim: slice(0, -1)}).assign(step_data_vars)
    ds_gby_steps = ds_all_steps.groupby(mclock_dim)
    return ds_init, ds_gby_steps
