Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def tasks_monthly_sarah(xs, ys, yearmonths, prepare_func, era5_func, template_sis, template_sid, meta_attrs):
resolution = meta_attrs.get('resolution', None)
return [dict(prepare_func=prepare_func,
era5_func=era5_func,
template_sis=template_sis, template_sid=template_sid,
xs=xs, ys=ys, year=year, month=month,
resolution=resolution)
for year, month in yearmonths]
weather_data_config = {
'_': dict(tasks_func=tasks_monthly_sarah,
prepare_func=prepare_month_sarah,
era5_func=prepare_for_sarah,
template_sid=os.path.join(sarah_dir, 'sid', 'SIDin{year}{month:02}*.nc'),
template_sis=os.path.join(sarah_dir, 'sis', 'SISin{year}{month:02}*.nc'))
}
meta_data_config = dict(prepare_func=prepare_meta_sarah,
template_sid=weather_data_config['_']['template_sid'],
template_sis=weather_data_config['_']['template_sis'])
def tasks_monthly_sarah(xs, ys, yearmonths, prepare_func, era5_func, template_sis, template_sid, meta_attrs):
resolution = meta_attrs.get('resolution', None)
return [dict(prepare_func=prepare_func,
era5_func=era5_func,
template_sis=template_sis, template_sid=template_sid,
xs=xs, ys=ys, year=year, month=month,
resolution=resolution)
for year, month in yearmonths]
weather_data_config = {
'_': dict(tasks_func=tasks_monthly_sarah,
prepare_func=prepare_month_sarah,
era5_func=prepare_for_sarah,
template_sid=os.path.join(sarah_dir, 'sid', 'SIDin{year}{month:02}*.nc'),
template_sis=os.path.join(sarah_dir, 'sis', 'SISin{year}{month:02}*.nc'))
}
meta_data_config = dict(prepare_func=prepare_meta_sarah,
template_sid=weather_data_config['_']['template_sid'],
template_sis=weather_data_config['_']['template_sis'])