Project

General

Profile

Revision 834:d989df597b80

IDd989df597b80
Parent 833:354ddca04053
Child 835:d623d705abd3

Added by Maarten Sneep about 2 years ago

Use the exclude parameter when ingesting existing files

View differences:

src/pycama/AnalysisAndPlot.py
58 58
    #
59 59
    #  @Note Either `reader_data` or both `filename` and `time_index` must be supplied.
60 60
    #
61
    def __init__(self, reader_data=None, filename=None, time_index=None, **kwargs):
61
    def __init__(self, reader_data=None, filename=None, time_index=None, exclude=None, **kwargs):
62 62
        ## logging.Logger instance for messaging
63 63
        self.logger = logging.getLogger('PyCAMA')
64 64
        self.product = None
......
94 94
        else:
95 95
            self.time_index_in_output = None
96 96
            if filename is not None and time_index is not None:
97
                self.success = self.ingest(filename, time_index)
97
                self.success = self.ingest(filename, time_index, exclude=exclude)
98 98
                self.product, self.processing_mode = read_product_and_mode_from_file(filename)
99 99
                if not self.success:
100 100
                    self.logger.warning("Ingestion not successful for class %s", self.__class__.__name__)
......
165 165
    #
166 166
    #  Expected to be overridden in subclasses.
167 167
    #
168
    def ingest(self, fname, time_index):
168
    def ingest(self, fname, time_index, exclude=None):
169 169
        raise NotImplementedError("Method must be overridden in a subclass.")
170 170

  
171 171
    ## Write processed data to output netcdf file.

Also available in: Unified diff