def integrate_years(self, years=<NUM_LIT:1.0>, verbose=True):
days = years * const.days_per_year<EOL>numsteps = int(self.time['<STR_LIT>'] * years)<EOL>if verbose:<EOL><INDENT>print("<STR_LIT>" + str(numsteps) + "<STR_LIT>"<EOL>+ str(days) + "<STR_LIT>" + str(years) + "<STR_LIT>")<EOL><DEDENT>for count in range(numsteps):<EOL><INDENT>self.step_forward()<EOL>if count == <NUM_LIT:0>:<EOL><INDENT>self.timeave = self.state.copy()<EOL>self.timeave.update(self.diagnostics)<EOL>for varname, value in self.timeave.items():<EOL><INDENT>if value is None:<EOL><INDENT>continue<EOL><DEDENT>self.timeave[varname] = <NUM_LIT:0>*value<EOL><DEDENT><DEDENT>for varname in list(self.timeave.keys()):<EOL><INDENT>try:<EOL><INDENT>self.timeave[varname] += self.state[varname]<EOL><DEDENT>except:<EOL><INDENT>try:<EOL><INDENT>self.timeave[varname] += self.diagnostics[varname]<EOL><DEDENT>except: pass<EOL><DEDENT><DEDENT><DEDENT>for varname, value in self.timeave.items():<EOL><INDENT>if value is None:<EOL><INDENT>continue<EOL><DEDENT>self.timeave[varname] /= numsteps<EOL><DEDENT>if verbose:<EOL><INDENT>print("<STR_LIT>"<EOL>% str(self.time['<STR_LIT>']/const.days_per_year))<EOL><DEDENT>
Integrates the model by a given number of years.

        :param float years:     integration time for the model in years
                                [default: 1.0]
        :param bool verbose:    information whether model time details
                                should be printed [default: True]

        It calls :func:`step_forward` repetitively and calculates a time
        averaged value over the integrated period for every model state and all
        diagnostics processes.

        :Example:

            ::

                >>> import climlab
                >>> model = climlab.EBM()

                >>> model.global_mean_temperature()
                Field(11.997968598413685)

                >>> model.integrate_years(2.)
                Integrating for 180 steps, 730.4844 days, or 2.0 years.
                Total elapsed time is 2.0 years.

                >>> model.global_mean_temperature()
                Field(13.531055349437258)