def _preproc_streams(self):
        """
        It is assumed that the standard JSBACH postprocessing scripts have been applied.
        Thus monthly mean data is available for each stream and code tables still need to be applied.

        This routine does the following:
        1) merge all times from individual (monthly mean) output files
        2) assign codetables to work with proper variable names
        3) aggregate data from tiles to gridbox values
        """

        print 'Preprocessing JSBACH raw data streams (may take a while) ...'

        cdo = Cdo()

        # jsbach stream
        print '   JSBACH stream ...'
        outfile = get_temporary_directory() + self.experiment + '_jsbach_mm_full.nc'
        if os.path.exists(outfile):
            pass
        else:
            codetable = self.data_dir + 'log/' + self.experiment + '_jsbach.codes'
            tmp = tempfile.mktemp(suffix='.nc', prefix=self.experiment + '_jsbach_', dir=get_temporary_directory())  # temporary file
            #~ print self.data_dir
            #~ print self.raw_outdata
            #~ print 'Files: ', self._get_filenames_jsbach_stream()
            #~ stop
            if len(glob.glob(self._get_filenames_jsbach_stream())) > 0:  # check if input files existing at all
                print 'Mering the following files:', self._get_filenames_jsbach_stream()
                cdo.mergetime(options='-f nc', output=tmp, input=self._get_filenames_jsbach_stream())
                if os.path.exists(codetable):
                    cdo.monmean(options='-f nc', output=outfile, input='-setpartab,' + codetable + ' ' + tmp)  # monmean needed here, as otherwise interface does not work
                else:
                    cdo.monmean(options='-f nc', output=outfile, input=tmp)  # monmean needed here, as otherwise interface does not work
                print 'Outfile: ', outfile
                #~ os.remove(tmp)

                print 'Temporary name: ', tmp

        self.files.update({'jsbach': outfile})

        # veg stream
        print '   VEG stream ...'
        outfile = get_temporary_directory() + self.experiment + '_jsbach_veg_mm_full.nc'
        if os.path.exists(outfile):
            pass
        else:
            codetable = self.data_dir + 'log/' + self.experiment + '_jsbach_veg.codes'
            tmp = tempfile.mktemp(suffix='.nc', prefix=self.experiment + '_jsbach_veg_', dir=get_temporary_directory())  # temporary file
            if len(glob.glob(self._get_filenames_veg_stream())) > 0:  # check if input files existing at all
                cdo.mergetime(options='-f nc', output=tmp, input=self._get_filenames_veg_stream())
                if os.path.exists(codetable):
                    cdo.monmean(options='-f nc', output=outfile, input='-setpartab,' + codetable + ' ' + tmp)  # monmean needed here, as otherwise interface does not work
                else:
                    cdo.monmean(options='-f nc', output=outfile, input=tmp)  # monmean needed here, as otherwise interface does not work
                os.remove(tmp)
        self.files.update({'veg': outfile})

        # veg land
        print '   LAND stream ...'
        outfile = get_temporary_directory() + self.experiment + '_jsbach_land_mm_full.nc'
        if os.path.exists(outfile):
            pass
        else:
            codetable = self.data_dir + 'log/' + self.experiment + '_jsbach_land.codes'
            tmp = tempfile.mktemp(suffix='.nc', prefix=self.experiment + '_jsbach_land_', dir=get_temporary_directory())  # temporary file
            if len(glob.glob(self._get_filenames_land_stream())) > 0:  # check if input files existing at all
                cdo.mergetime(options='-f nc', output=tmp, input=self._get_filenames_land_stream())
                if os.path.exists(codetable):
                    cdo.monmean(options='-f nc', output=outfile, input='-setpartab,' + codetable + ' ' + tmp)  # monmean needed here, as otherwise interface does not work
                else:
                    cdo.monmean(options='-f nc', output=outfile, input=tmp)  # monmean needed here, as otherwise interface does not work
                os.remove(tmp)
        self.files.update({'land': outfile})

        # surf stream
        print '   SURF stream ...'
        outfile = get_temporary_directory() + self.experiment + '_jsbach_surf_mm_full.nc'
        if os.path.exists(outfile):
            pass
        else:
            codetable = self.data_dir + 'log/' + self.experiment + '_jsbach_surf.codes'
            tmp = tempfile.mktemp(suffix='.nc', prefix=self.experiment + '_jsbach_surf_', dir=get_temporary_directory())  # temporary file
            if len(glob.glob(self._get_filenames_surf_stream())) > 0:  # check if input files existing at all
                print glob.glob(self._get_filenames_surf_stream())
                cdo.mergetime(options='-f nc', output=tmp, input=self._get_filenames_surf_stream())
                if os.path.exists(codetable):
                    cdo.monmean(options='-f nc', output=outfile, input='-setpartab,' + codetable + ' ' + tmp)  # monmean needed here, as otherwise interface does not work
                else:
                    cdo.monmean(options='-f nc', output=outfile, input=tmp)  # monmean needed here, as otherwise interface does not work
                os.remove(tmp)

        self.files.update({'surf': outfile})

        # ECHAM BOT stream
        print '   BOT stream ...'
        outfile = get_temporary_directory() + self.experiment + '_echam6_echam_mm_full.nc'
        if os.path.exists(outfile):
            pass
        else:
            codetable = self.data_dir + 'log/' + self.experiment + '_echam6_echam.codes'
            tmp = tempfile.mktemp(suffix='.nc', prefix=self.experiment + '_echam6_echam_', dir=get_temporary_directory())  # temporary file
            if len(glob.glob(self._get_filenames_echam_BOT())) > 0:  # check if input files existing at all
                cdo.mergetime(options='-f nc', output=tmp, input=self._get_filenames_echam_BOT())
                if os.path.exists(codetable):
                    cdo.monmean(options='-f nc', output=outfile, input='-setpartab,' + codetable + ' ' + tmp)  # monmean needed here, as otherwise interface does not work
                else:
                    cdo.monmean(options='-f nc', output=outfile, input=tmp)  # monmean needed here, as otherwise interface does not work
                os.remove(tmp)
        self.files.update({'echam': outfile})

        # ALBEDO file
        # albedo files as preprocessed by a script of Thomas
        print '   ALBEDO VIS stream ...'
        outfile = get_temporary_directory() + self.experiment + '_jsbach_VIS_albedo_mm_full.nc'
        if os.path.exists(outfile):
            pass
        else:
            if len(glob.glob(self._get_filenames_albedo_VIS())) > 0:  # check if input files existing at all
                cdo.mergetime(options='-f nc', output=outfile, input=self._get_filenames_albedo_VIS())
        self.files.update({'albedo_vis': outfile})

        print '   ALBEDO NIR stream ...'
        outfile = get_temporary_directory() + self.experiment + '_jsbach_NIR_albedo_mm_full.nc'
        if os.path.exists(outfile):
            pass
        else:
            if len(glob.glob(self._get_filenames_albedo_NIR())) > 0:  # check if input files existing at all
                cdo.mergetime(options='-f nc', output=outfile, input=self._get_filenames_albedo_NIR())
        self.files.update({'albedo_nir': outfile})