reV hybrids

Execute the hybrids step from a config file.

reV hybrids computes a “hybrid” wind and solar supply curve, where each supply curve point contains some wind and some solar capacity. Various ratio limits on wind-to-solar farm properties (e.g. wind-to-solar capacity) can be applied during the hybridization process. Hybrid generation profiles are also computed during this process.

The general structure for calling this CLI command is given below (add --help to print help info to the terminal).

Usage

reV hybrids [OPTIONS]

Options

-c, --config_file <config_file>

Required Path to the hybrids configuration file. Below is a sample template config

{
    "execution_control": {
        "option": "local",
        "allocation": "[REQUIRED IF ON HPC]",
        "walltime": "[REQUIRED IF ON HPC]",
        "qos": "normal",
        "memory": null,
        "queue": null,
        "feature": null,
        "conda_env": null,
        "module": null,
        "sh_script": null,
        "keep_sh": false,
        "num_test_nodes": null
    },
    "log_directory": "./logs",
    "log_level": "INFO",
    "solar_fpath": "[REQUIRED]",
    "wind_fpath": "[REQUIRED]",
    "allow_solar_only": false,
    "allow_wind_only": false,
    "fillna": null,
    "limits": null,
    "ratio_bounds": null,
    "ratio": "solar_capacity/wind_capacity",
    "save_hybrid_meta": true
}

Parameters

execution_controldict

Dictionary containing execution control arguments. Allowed arguments are:

option:

({‘local’, ‘kestrel’, ‘eagle’, ‘awspc’, ‘slurm’, ‘peregrine’}) Hardware run option. Determines the type of job scheduler to use as well as the base AU cost. The “slurm” option is a catchall for HPC systems that use the SLURM scheduler and should only be used if desired hardware is not listed above. If “local”, no other HPC-specific keys in are required in execution_control (they are ignored if provided).

allocation:

(str) HPC project (allocation) handle.

walltime:

(int) Node walltime request in hours.

qos:

(str, optional) Quality-of-service specifier. For Kestrel users: This should be one of {‘standby’, ‘normal’, ‘high’}. Note that ‘high’ priority doubles the AU cost. By default, "normal".

memory:

(int, optional) Node memory max limit (in GB). By default, None, which uses the scheduler’s default memory limit. For Kestrel users: If you would like to use the full node memory, leave this argument unspecified (or set to None) if you are running on standard nodes. However, if you would like to use the bigmem nodes, you must specify the full upper limit of memory you would like for your job, otherwise you will be limited to the standard node memory size (250GB).

queue:

(str, optional; PBS ONLY) HPC queue to submit job to. Examples include: ‘debug’, ‘short’, ‘batch’, ‘batch-h’, ‘long’, etc. By default, None, which uses “test_queue”.

feature:

(str, optional) Additional flags for SLURM job (e.g. “-p debug”). By default, None, which does not specify any additional flags.

conda_env:

(str, optional) Name of conda environment to activate. By default, None, which does not load any environments.

module:

(str, optional) Module to load. By default, None, which does not load any modules.

sh_script:

(str, optional) Extra shell script to run before command call. By default, None, which does not run any scripts.

keep_sh:

(bool, optional) Option to keep the HPC submission script on disk. Only has effect if executing on HPC. By default, False, which purges the submission scripts after each job is submitted.

num_test_nodes:

(str, optional) Number of nodes to submit before terminating the submission process. This can be used to test a new submission configuration without submitting all nodes (i.e. only running a handful to ensure the inputs are specified correctly and the outputs look reasonable). By default, None, which submits all node jobs.

Only the option key is required for local execution. For execution on the HPC, the allocation and walltime keys are also required. All other options are populated with default values, as seen above. For HPC runs, configured execution parameters are also exported to the job environment. Variable names are uppercase and prefixed with the CLI name; non-alphanumeric characters are replaced by underscores. For example, the walltime parameter for a CLI named reV is available as REV_WALLTIME. These variables can be used by sh_script or by the command running on the node. The submitted job name is also available as REV_JOB_NAME.

log_directorystr

Path to directory where logs should be written. Path can be relative and does not have to exist on disk (it will be created if missing). By default, "./logs".

log_level{“DEBUG”, “INFO”, “WARNING”, “ERROR”}

String representation of desired logger verbosity. Suitable options are DEBUG (most verbose), INFO (moderately verbose), WARNING (only log warnings and errors), and ERROR (only log errors). By default, "INFO".

solar_fpathstr

Filepath to rep profile output file to extract solar profiles and summaries from.

wind_fpathstr

Filepath to rep profile output file to extract wind profiles and summaries from.

allow_solar_onlybool, optional

Option to allow SC points with only solar capacity (no wind). By default, False.

allow_wind_onlybool, optional

Option to allow SC points with only wind capacity (no solar). By default, False.

fillnadict, optional

Dictionary containing column_name, fill_value pairs representing any fill values that should be applied after merging the wind and solar meta. Note that column names will likely have to be prefixed with solar or wind. By default None.

limitsdict, optional

Option to specify mapping (in the form of a dictionary) of {colum_name: max_value} representing the upper limit (maximum value) for the values of a column in the merged meta. For example, limits={'solar_capacity': 100} would limit all the values of the solar capacity in the merged meta to a maximum value of 100. This limit is applied BEFORE ratio calculations. The names of the columns should match the column names in the merged meta, so they are likely prefixed with solar or wind. By default, None (no limits applied).

ratio_boundstuple, optional

Option to set ratio bounds (in two-tuple form) on the columns of the ratio input. For example, ratio_bounds=(0.5, 1.5) would adjust the values of both of the ratio columns such that their ratio is always between half and double (e.g., no value would be more than double the other). To specify a single ratio value, use the same value as the upper and lower bound. For example, ratio_bounds=(1, 1) would adjust the values of both of the ratio columns such that their ratio is always equal. By default, None (no limit on the ratio).

ratiostr, optional

Option to specify the columns used to calculate the ratio that is limited by the ratio_bounds input. This input is a string in the form “{numerator_column}/{denominator_column}”. For example, ratio='solar_capacity/wind_capacity' would limit the ratio of the solar to wind capacities as specified by the ratio_bounds input. If ratio_bounds is None, this input does nothing. The names of the columns should be prefixed with one of the prefixes defined as class variables. By default 'solar_capacity/wind_capacity'.

save_hybrid_metabool, optional

Flag to save hybrid SC table to hybrid rep profile output. By default, True.

You may remove keys with a null value if you do not intend to update them yourself.

Configuration inheritance

JSON, JSON5, YAML, and TOML configurations may set inherit_from to the path of another configuration file. GAPs loads inheritance recursively and deep-merges dictionaries, with values in the current file taking precedence. Lists, scalar values, null, and values that change type replace the inherited value. Parent references and other relative paths are resolved from the file in which they are defined.

Set a key to the exact, case-sensitive string "DELETE" in an inheriting file to remove that key from the effective configuration. This works at any dictionary depth. For example:

inherit_from: base.yaml
logging:
    log_file: DELETE

The inherit_from key and deleted entries are removed before config validation and preprocessing. The value "DELETE" is therefore reserved in inheriting files. CSV batch configurations do not support inheritance.