Resource Planning Model (RPM)
The reV to RPM pipeline can be run from the command line using the reV-RPM
command line interface (CLI), or using the rpm sub-package.
reV-RPM CLI
The reV-RPM
command line tools can be used to run the reV to RPM pipeline
using the default clustering and representative profile options.
There are 3 steps to the reV to RPM pipeline:
Clustering of the capacity factor (CF) profiles within each RPM region
Applying geo-spatial exclusions to the CF profiles (optional)
Extracting representative profiles from each region
The entire pipeline can be run using the following CLI call:
reV-RPM --name="Job_name" --cf-profile="../cf_profiles.h5" --out-dir="../output_directory" -p cluster --rpm_meta="../rpm_meta.csv" and_profiles --exclusions="../exclusions.tiff" --techmap="../techmap.h5" --techmap_dset="wtk_conus"
This will cluster the RPM profiles using the regions and number of clusters
given in rpm_meta.csv
and then return a representative profile for each
region. NOTE: that the and_profiles options are all optional. If they are not
given than exclusions will not be applied. Also NOTE that -p is an optional
flag to run the clustering and profiles in parallel.
If you only want to create the clusters you can drop the and_profiles part of the command:
reV-RPM --name="Job_name" --cf-profile="../cf_profiles.h5" --out-dir="../output_directory" -p cluster --rpm_meta="../rpm_meta.csv"
This will write a .csv with the cluster results to out_dir
If representative profiles are desired for an existing set of clusters
(rpm_clusters.csv
) the rep-profies
sub-command can be used:
reV-RPM --name="Job_name" --cf-profile="../cf_profiles.h5" --out-dir="../output_directory" -p and_profiles --rpm-clusters="../rpm_clusters.csv" --exclusions="../exclusions.tiff" --techmap="../techmap.h5" --techmap_dset="wtk_conus"
Again –exclusions, –techmap, and –techmap-dset are optional if exclusions should be applied.
If additional representative profiles are desired use the following call:
reV-RPM --name="Job_name" --cf-profile="../cf_profiles.h5" --out-dir="../output_directory" -p and_profiles --rpm-clusters="../rpm_clusters.csv" extra_profiles --profiles="5"
This will extract 5 additional profiles. NOTE: extra-profiles
can only be
run after rep-profiles`
.
RPM sub-package
The reV-RPM pipeline can also be run using the rpm sub-package of reVX. The
two main classes are
RPMClusterManager
and RPMOutput
.
RPMClusterManager
manages the clustering of RPM regions and if desired can
run RPMOutput
to extract representative profiles.
Extracting clusters:
RPMClusterManager.run_clusters(cf_fpath, rpm_meta, out_dir, job_tag=name,
rpm_region_col=region_col, parallel=parallel)
Extracting clusters and profiles:
RPMClusterManager.run_clusters_and_profiles(cf_fpath, rpm_meta, exclusions,
techmap, techmap_dset, out_dir,
job_tag=name, rpm_region_col=region_col,
parallel=parallel)
RPMOutput
handles the application of exclusions and extraction of
representative profiles from an existing set of clusters.
Apply exclusions and extract profiles:
RPMOutput.process_outputs(rpm_clusters, cf_fpath, exclusions,
techmap, techmap_dset, out_dir,
job_tag=name, parallel=parallel)
As above NOTE that exclusions
, techmap
, and techmap_dset
can be
set to None
if representative profiles without exclusions are desired.
Extra profiles can be extracted with:
RPMOutput.extract_profiles(rpm_clusters, cf_fpath, out_dir,
n_profiles=profiles, job_tag=name,
parallel=parallel)
Again extra_profiles
can only be run after process_outputs
has been
run.