예제 #1
0
 def extend_cache(self, filenames):
     cached_files = glob.glob('%s/*.nc' % self.temporal_path)
     not_cached = filter(lambda f: self.get_cached_file(f)
                         not in cached_files,
                         filenames)
     if not_cached:
         loader = Loader(not_cached)
         new_files = pmap(self.get_cached_file, not_cached)
         with nc.loader(new_files, dimensions=DIMS) as cache:
             self.algorithm.update_temporalcache(loader, cache)
         loader.dump()
예제 #2
0
 def __init__(self, algorithm):
     super(OutputCache, self).__init__(algorithm)
     self.output = Loader(pmap(self.get_output_file, self.filenames))
     self.root = self.output.root
     with nc.loader(self.filenames, dimensions=DIMS) as images:
         map(algorithm.create_1px_dimensions, self.root.roots)
         self.root.getvar('time', source=images.getvar('time'))
         self.root.getvar('cloudindex',
                          'f4', source=images.getvar('data'))
         self.root.getvar('globalradiation',
                          'f4', source=images.getvar('data'))
예제 #3
0
 def __init__(self, algorithm):
     super(TemporalCache, self).__init__(algorithm)
     self.update_cache(self.filenames)
     self.cache = Loader(pmap(self.get_cached_file, self.filenames))
     self.root = self.cache.root
예제 #4
0
def run(**config):
        loader = Loader(config['data'])
        algorithm = Heliosat2(config, geo.strategy)
        algorithm.run_with(loader)
        loader.dump()