reVeal.cli.downscale.run#
- run(grid, grid_priority, grid_baseline_load, baseline_year, grid_capacity, projection_resolution, load_projections, load_value, load_year, out_dir, regions=None, region_names=None, load_regions=None, region_weights=None, max_site_addition_per_year=None, site_saturation_limit=1, priority_power=1, n_bootstraps=10000, random_seed=0, max_workers=None, reduce_output=False, _local=True)[source]#
Downscale load projections to grid based on priority values.
Outputs a new GeoPackage containing the input grid with added attributes for downscaled load by year.
- Parameters:
grid (str) – Path to vector dataset for which attribute scoring will be performed. Must be an existing vector dataset in a format that can be opened by
pyogrio. Does not strictly need to be a grid, or even a polygon dataset, but must be a vector dataset.grid_priority (str) – Name of attribute column in
griddataset to use for prioritizing load downscaling.grid_baseline_load (str) – Name of attribute column in
griddataset containing values for baseline (i.e., starting) load in each grid cell in the correspondingbaseline_year.baseline_year (int) – Year corresponding to the baseline load values in the
grid_baseline_loadcolumn.grid_capacity (str) – Name of attribute column in
griddataset indicating the developable capacity of load within each site.projection_resolution (str) – Resolution of
load_projectionsdataset. Refer toreVeal.config.downscale.ProjectionResolutionEnum.load_projections (str) – Path to
load_projectionsdataset. Expected to be a CSV file.load_value (str) – Name of column containing load values in
load_projectionsdataset to disaggregate.Important
The projected values of load found in this column are expected to be and will be treated as incremental additions of load in each year, NOT cumulative values.
Note
This value will be used as the name the columns containing downscaled load values in the output grid GeoPackage.
load_year (str) – Name of column in
load_projectionsdataset containing year values.out_dir (str) – Output parent directory. Results will be saved to a file named “grid_load_projections.gpkg”.
regions (str, optional) – Path to vector dataset containing regions to use in disaggregation. Required if
projections_resolution == "regional".region_names (str, optional) – Name of attribute column containing the name or identifier of regions in the
regionsdataset.load_regions (str, optional) – Name of column in
load_projectionsdataset containing region names, if applicable. Specify this option when the inputload_projectionsare resolved to the regional level. Values in this column should match values in theregion_namescolumn of theregionsdataset.Note
If
projection_resolution == "regional", either this option orregion_weights, but not both, must be specified.region_weights (dict, optional) – Dictionary indicating weights to use for apportioning load to regions before disaggregating. Keys should match values in the
region_namescolumn of theregionsdataset. Values should indicate the proportion of aggregate load to apportion to the corresponding region. Values must sum to 1.Note
If
projection_resolution == "regional", either this option orload_regions, but not both, must be specified.max_site_addition_per_year (float, optional) – Value indicating the maximum allowable increment of load that can be added in a given year to an individual site. The default value is None, which will not apply a cap. This value can be used to ensure that the rate of expansion of large load capacity in localized areas is not unrealistically rapid. Using this parameter can also have the effect of achieving greater geographic dispersion of load: since there is a limit to the pace at which individual sites can build out load, more sites are typically required for the same amount of project load.
site_saturation_limit (float, optional) – Adjustment factor limit the developable capacity of load within each site. This value is used to scale the values in the
grid_capacity. For example, to limit the maximum deployed load in each site to half of the actual developable load, usesite_saturation_limit=0.5. The lower this value is set, the greater the degree of dispersion of load across sites will be. The dfault is 1, which leaves the values in thegrid_capacityunmodified.priority_power (int, optional) – This factor can be used to exaggerate the influence of the values in
grid_priority, such that higher values have an increased likelihood of load deployment and lower values have a decreased likelihood. This effect is implemented by raising the values ingrid_priorityto the specifiedpriority_power. As a result, if the input values ingrid_priorityare < 1, settingpriority_powerto high values can result in completely eliminating lower priority sites from consideration. The default value is 1, which leaves the values ingrid_priorityunmodified. To achieve less dispersion and greater clustering of downscaled load in higher priority sites, increase this value.n_bootstraps (int, optional) – Number of bootstraps to simulate in each projection year. Default is 10,000. In general, larger values will produce more stable results, with less chance for lower priority sites to receive large amounts of deployed load. However, larger values will also cause longer run times.
random_seed (int, optional) – Random seed to use for reproducible bootstrapping. Default is 0. In general, this value does not need to be modified. The exception is if you are interested in testing sensitivities and/or producing multiple realizations or scenarios of deployment for a given set of values in
load_priority.max_workers ([int, NoneType], optional) – Maximum number of workers to use for multiprocessing when running downscaling. By default None, will use all available workers.
reduce_output (bool, optional) – Flag indicating whether to reduce the output to only include centroids of grid cells and the downscaled load attributes. Default is False.
_local (bool) – Flag indicating whether the code is being run locally or via HPC job submissions. NOTE: This is not a user provided parameter - it is determined dynamically by based on whether config[“execution_control”][“option”] == “local” (defaults to True if not specified).