def _get_local_case_data(self, root):
        params = root.params
        unknowns = root.unknowns
        resids = root.resids
        params = {p: params[p] for p in self._vars_to_record['pnames']}
        unknowns = {u: unknowns[u] for u in self._vars_to_record['unames']}
        resids = {r: resids[r] for r in self._vars_to_record['rnames']}

        return params, unknowns, resids
get names and values of all locally owned variables.
dataset/ETHPy150Open OpenMDAO/OpenMDAO/openmdao/recorders/recording_manager.py/RecordingManager._get_local_case_data