Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
else:
logger.warning('module not given in meta file of cutout, assuming it is NCEP')
cutoutparams['module'] = 'ncep'
if {"xs", "ys", "years", "months"}.intersection(cutoutparams):
# Assuming the user is interested in a subview into
# the data, update meta in place for the time
# dimension and save the xs, ys slices, separately
self.meta = meta = self.get_meta_view(**cutoutparams)
logger.info("Assuming a view into the prepared cutout: %s", self)
else:
logger.info("Cutout %s not found in directory %s, building new one", name, cutout_dir)
if 'module' not in cutoutparams:
d = config.weather_dataset.copy()
d.update(cutoutparams)
cutoutparams = d
self.dataset_module = sys.modules['atlite.datasets.' + cutoutparams['module']]
if not self.prepared:
if {"xs", "ys", "years"}.difference(cutoutparams):
raise TypeError("Arguments `xs`, `ys` and `years` need to be specified")
self.meta = self.get_meta(**cutoutparams)