def summary_global_quantities(ods, update=True):
    """
    Calculates global quantities for each time slice and stores them in the summary ods:
     - Greenwald Fraction
     - Energy confinement time estimated from the IPB98(y,2) scaling
     - Integrate power densities to the totals
     - Generate summary.global_quantities from global_quantities of other IDSs

    :param ods: input ods

    :param update: operate in place

    :return: updated ods
    """
    ods_n = ods.physics_summary_greenwald(update=update)
    ods_n.physics_summary_taue(update=True)
    ods_n.physics_summary_heating_power(update=True)
    ods_n.physics_summary_consistent_global_quantities(update=True)
    return ods_n