How to use the atlite.config.sarah_dir function in atlite

To help you get started, we’ve selected a few atlite examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github PyPSA / atlite / atlite / datasets / sarah.py View on Github external
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'])
github PyPSA / atlite / atlite / datasets / sarah.py View on Github external
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'])