def process()

in sdap/processors/callncra.py [0:0]


    def process(self, in_path):
        target_datetime = self.get_datetime_from_dataset(in_path)
        target_yearmonth = target_datetime.strftime('%Y%m')

        output_filename = target_datetime.strftime(self.output_filename_pattern)
        output_path = os.path.join(os.path.dirname(in_path), output_filename)

        datasets = glob.glob(os.path.join(os.path.dirname(in_path), self.glob_pattern))

        datasets_to_average = [dataset_path for dataset_path in datasets if
                               self.get_datetime_from_dataset(dataset_path).strftime('%Y%m') == target_yearmonth]

        command = ['ncra', '-O']
        command.extend(datasets_to_average)
        command.append(output_path)
        call(command)

        yield output_path