reV.handlers.multi_year.my_collect_groups

my_collect_groups(out_fpath, groups, clobber=True)[source]

Collect all groups into a single multi-year HDF5 file.

reV multi-year combines reV generation data from multiple years (typically stored in separate files) into a single multi-year file. Each dataset in the multi-year file is labeled with the corresponding years, and multi-year averages of the yearly datasets are also computed.

Parameters:
  • out_fpath (str) – Path to multi-year HDF5 file to use for multi-year collection.

  • groups (dict) – Dictionary of collection groups and their parameters. This should be a dictionary mapping group names (keys) to a set of key word arguments (values) that can be used to initialize MultiYearGroup (excluding the required name and out_dir inputs, which are populated automatically). For example:

    groups = {
        "none": {
            "dsets": [
                "cf_profile",
                "cf_mean",
                "ghi_mean",
                "lcoe_fcr",
            ],
            "source_dir": "./",
            "source_prefix": "",
            "pass_through_dsets": [
                "capital_cost",
                "fixed_operating_cost",
                "system_capacity",
                "fixed_charge_rate",
                "variable_operating_cost",
            ]
        },
        "solar_group": {
            "source_files": "PIPELINE",
            "dsets": [
                "cf_profile_ac",
                "cf_mean_ac",
                "ac",
                "dc",
                "clipped_power"
            ],
            "pass_through_dsets": [
                "system_capacity_ac",
                "dc_ac_ratio"
            ]
        },
        ...
    }
    

    The group names will be used as the HDF5 file group name under which the collected data will be stored. You can have exactly one group with the name "none" for a “no group” collection (this is typically what you want and all you need to specify).

  • clobber (bool, optional) – Flag to purge the multi-year output file prior to running the multi-year collection step if the file already exists on disk. This ensures the data is always freshly collected from the single-year files. If False, then datasets in the existing file will not be overwritten with (potentially new/updated) data from the single-year files. By default, True.