def _compute_type(self, proctype):
tendencies = {}<EOL>for varname in self.state:<EOL><INDENT>tendencies[varname] = <NUM_LIT:0.> * self.state[varname]<EOL><DEDENT>for proc in self.process_types[proctype]:<EOL><INDENT>step_ratio = int(proc.timestep / self.timestep)<EOL>if self.time['<STR_LIT>'] % step_ratio == <NUM_LIT:0>:<EOL><INDENT>proc.time['<STR_LIT>'] = True<EOL>tenddict = proc.compute()<EOL><DEDENT>else:<EOL><INDENT>proc.time['<STR_LIT>'] = False<EOL>tenddict = proc.tendencies<EOL><DEDENT>for name, tend in tenddict.items():<EOL><INDENT>tendencies[name] += tend<EOL><DEDENT>for diagname, value in proc.diagnostics.items():<EOL><INDENT>self.__setattr__(diagname, value)<EOL><DEDENT><DEDENT>return tendencies<EOL>
Computes tendencies due to all subprocesses of given type
        ``'proctype'``. Also pass all diagnostics up to parent process.