code: def remove_diagnostic(self, name):
          
          #_ = self.diagnostics.pop(name)
          #delattr(type(self), name)
          try:
              delattr(self, name)
              self._diag_vars.remove(name)
          except:
              print('No diagnostic named {} was found.'.format(name))
docs: Removes a diagnostic from the ``process.diagnostic`` dictionary
          and also delete the associated process attribute.
  
          :param str name:    name of diagnostic quantity to be removed
  
          :Example:
  
              Remove diagnostic variable 'icelat' from energy balance model::
  
                  >>> import climlab
                  >>> model = climlab.EBM()
  
                  >>> # display all diagnostic variables
                  >>> model.diagnostics.keys()
                  ['ASR', 'OLR', 'net_radiation', 'albedo', 'icelat']
  
                  >>> model.remove_diagnostic('icelat')
                  >>> model.diagnostics.keys()
                  ['ASR', 'OLR', 'net_radiation', 'albedo']
  
                  >>> # Watch out for subprocesses that may still want
                  >>>  # to access the diagnostic 'icelat' variable !!!