code: def walk_processes(top, topname='top', topdown=True, ignoreFlag=False):
      
      if not ignoreFlag:
          flag = topdown
      else:
          flag = True
      proc = top
      level = 0
      if flag:
          yield topname, proc, level
      if len(proc.subprocess) > 0:  # there are sub-processes
          level += 1
          for name, subproc in proc.subprocess.items():
              for name2, subproc2, level2 in walk_processes(subproc,
                                                            topname=name,
                                                            topdown=subproc.topdown,
                                                            ignoreFlag=ignoreFlag):
                  yield name2, subproc2, level+level2
      if not flag:
          yield topname, proc, level
docs: Generator for recursive tree of climlab processes
  
      Starts walking from climlab process ``top`` and generates a complete
      list of all processes and sub-processes that are managed from ``top`` process.
      ``level`` indicades the rank of specific process in the process hierarchy:
  
      .. note::
  
          * level 0: ``top`` process
              * level 1: sub-processes of ``top`` process
                  * level 2: sub-sub-processes of ``top`` process (=subprocesses of level 1 processes)
  
  
  
      The method is based on os.walk().
  
  
  
      :param top:             top process from where walking should start
      :type top:              :class:`~climlab.process.process.Process`
      :param str topname:     name of top process [default: 'top']
      :param bool topdown:    whether geneterate *process_types* in regular or
                              in reverse order [default: True]
      :param bool ignoreFlag: whether ``topdown`` flag should be ignored or not
                              [default: False]
      :returns: name (str), proc (process), level (int)
  
  
      :Example:
  
          ::
  
              >>> import climlab
              >>> from climlab.utils import walk
  
              >>> model = climlab.EBM()
  
              >>> for name, proc, top_proc in walk.walk_processes(model):
              ...     print name
              ...
              top
              diffusion
              LW
              iceline
              cold_albedo
              warm_albedo
              albedo
              insolation