reV.supply_curve.aggregation.AggFileHandler

class AggFileHandler(excl_fpath, h5_fpath, excl_dict=None, area_filter_kernel='queen', min_area=None, h5_handler=None)[source]

Bases: AbstractAggFileHandler

Framework to handle aggregation file context manager: - exclusions .h5 file - h5 file to be aggregated

Parameters:
  • excl_fpath (str | list | tuple) – Filepath to exclusions h5 with techmap dataset (can be one or more filepaths).

  • h5_fpath (str) – Filepath to .h5 file to be aggregated

  • excl_dict (dict | None) – Dictionary of exclusion keyword arugments of the format {layer_dset_name: {kwarg: value}} where layer_dset_name is a dataset in the exclusion h5 file and kwarg is a keyword argument to the reV.supply_curve.exclusions.LayerMask class. by default None

  • area_filter_kernel (str, optional) – Contiguous area filter method to use on final exclusions mask, by default ‘queen’

  • min_area (float, optional) – Minimum required contiguous area filter in sq-km, by default None

  • h5_handler (rex.Resource | None) – Optional special handler similar to the rex.Resource handler which is default.

Methods

close()

Close all file handlers.

Attributes

exclusions

Get the exclusions file handler object.

h5

Get the h5 file handler object.

DEFAULT_H5_HANDLER

alias of Resource

property h5

Get the h5 file handler object.

Returns:

_h5 (Outputs) – reV h5 outputs handler object.

close()[source]

Close all file handlers.

property exclusions

Get the exclusions file handler object.

Returns:

_excl (ExclusionMask) – Exclusions h5 handler object.