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/WorldPlot.py
232 232
    #
233 233
    #  @param fname NetCDF file with input data.
234 234
    #  @param time_index Time slice to read.
235
    def ingest(self, fname, time_index):
235
    def ingest(self, fname, time_index, exclude=None):
236 236
        self.logger.debug("{0}.ingest(): reading {1}".format(self.__class__.__name__, fname))
237 237
        self.time_index_in_output = time_index
238 238
        with h5py.File(fname, 'r') as ref:
......
256 256
                if k not in grp.keys():
257 257
                    self.logger.debug("Variable name {0} requested but not available".format(k))
258 258
                    continue
259
                if exclude is not None and k in exclude:
260
                    self.logger.debug("Variable name {0} is excluded".format(k))
261
                    continue
262
                    
259 263
                self.variables_meta[k] = {}
260 264
                self.variables_meta[k]['noscanline'] = False
261 265
                var = grp[k]

Also available in: Unified diff