RasHdf

class rashdf.RasHdf(name: str, **kwargs)

Bases: File

Base class for reading RAS HDF files.

__init__(name: str, **kwargs)

Open a HEC-RAS HDF file.

Parameters:
namestr

The path to the RAS HDF file.

kwargsdict

Additional keyword arguments to pass to h5py.File

classmethod open_uri(uri: str, fsspec_kwargs: dict = {}, h5py_kwargs: dict = {}) RasHdf

Open a HEC-RAS HDF file from a URI.

Parameters:
uristr

The URI of the RAS HDF file. Note this should be a path recognized by fsspec, such as an S3 path or a Google Cloud Storage path. See https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.open

fsspec_kwargsdict

Additional keyword arguments to pass to fsspec.open

h5py_kwargsdict

Additional keyword arguments to pass to h5py.File

Returns:
RasHdf

The RAS HDF file opened from the URI.

Examples

>>> results_hdf = RasHdf.open_uri("s3://my-bucket/results.hdf")