Project

General

Profile

Revision 835:d623d705abd3

IDd623d705abd3
Parent 834:d989df597b80
Child 836:9e8a3379a845

Added by Maarten Sneep about 2 years ago

Same as before, but not for ZonalPlot as well

View differences:

src/pycama/ZonalPlot.py
189 189
    #
190 190
    #  @param fname NetCDF file with input data.
191 191
    #  @param time_index Time slice to read.
192
    def ingest(self, fname, time_index):
192
    def ingest(self, fname, time_index, exclude=None):
193 193
        self.logger.debug("{0}.ingest(): reading {1}".format(self.__class__.__name__, fname))
194 194
        self.time_index_in_output = time_index
195 195
        with h5py.File(fname, 'r') as ref:
......
208 208
                if k not in grp.keys():
209 209
                    self.logger.debug("Variable name {0} requested but not available".format(k))
210 210
                    continue
211
                if exclude is not None and k in exclude:
212
                    self.logger.debug("Variable name {0} is excluded".format(k))
213
                    continue
211 214
                for kk in (k, k+'_land', k+'_sea'):
212 215
                    self.logger.debug("{0}.ingest(): processing {1}".format(self.__class__.__name__, kk))
213 216
                    var = grp[kk]

Also available in: Unified diff