hydrotools.nwm_client.NWMClientDefaults module¶
NWM Client Defaults¶
Manages default options to build National Water Model clients.
Classes¶
NWMClientDefaults
- class hydrotools.nwm_client.NWMClientDefaults.MeasurementUnitSystem(value)¶
Bases:
Enum
A system of units to define measurements. Options are SI or US.
- SI = 'SI'¶
- US = 'US'¶
- class hydrotools.nwm_client.NWMClientDefaults.NWMClientDefaults(STORE: ~hydrotools.nwm_client.ParquetStore.ParquetStore = <factory>, CATALOG: ~hydrotools.nwm_client.NWMFileCatalog.NWMFileCatalog = <factory>, SSL_CONTEXT: ~ssl.SSLContext = <factory>, ROUTELINK_URL: str = 'https://www.hydroshare.org/resource/e9fe66730d184bdfbaea19639bd7cb55/data/contents/RouteLink.h5', VARIABLES: ~typing.List[str] = <factory>, NWM_TO_SI_UNIT_MAPPING: ~typing.Dict[str, str] = <factory>, SI_TO_US_UNIT_MAPPING: ~typing.Dict[str, str] = <factory>, DOWNLOAD_DIRECTORY: ~pathlib.Path = PosixPath('hydrotools_data/NWMFileClient_NetCDF_files'), UNIT_SYSTEM: ~hydrotools.nwm_client.NWMClientDefaults.MeasurementUnitSystem = <factory>)¶
Bases:
object
Stores application default options.
STORE: Configured ParquetStore instance. Default is class level object, not instance object. CATALOG: Concrete NWM data source instance. SSL_CONTEXT: ssl context instance. Default is class level object, not instance object. ROUTELINK_URL: URL string path that points at an HDF5 file containing a
pandas.DataFrame with NWM crosswalk data.
VARIABLES: default list of variables to retrieve from channel_rt files. NWM_TO_SI_UNIT_MAPPING: mapping from NWM units to pint compatible metric unit symbols SI_TO_US_UNIT_MAPPING: mapping from SI units to default US standard conversion units CROSSWALK: A property that generates a pandas.DataFrame that maps between
point feature data source identifiers (i.e. USGS gage id -> NWM feature ID).
NWM_TO_US_UNIT_CONVERSION: Propertying mapping NWM units to US standard units and conversion factors DOWNLOAD_DIRECTORY: Local path to save downloaded NWM files. Default is class level object, not instance object. UNIT_SYSTEM: Default system of measurements.
- CATALOG: NWMFileCatalog¶
- property CROSSWALK: DataFrame¶
Retrieve and store a default crosswalk for use by a NWM client.
- DOWNLOAD_DIRECTORY: Path = PosixPath('hydrotools_data/NWMFileClient_NetCDF_files')¶
- NWM_TO_SI_UNIT_MAPPING: Dict[str, str]¶
- property NWM_TO_US_UNIT_CONVERSION: Dict[str, Dict[str, float]]¶
Mapping from NWM units to US standard units and respective conversion factors.
- ROUTELINK_URL: str = 'https://www.hydroshare.org/resource/e9fe66730d184bdfbaea19639bd7cb55/data/contents/RouteLink.h5'¶
- SI_TO_US_UNIT_MAPPING: Dict[str, str]¶
- SSL_CONTEXT: SSLContext¶
- STORE: ParquetStore¶
- UNIT_SYSTEM: MeasurementUnitSystem¶
- VARIABLES: List[str]¶
- _download_and_read_routelink_file() DataFrame ¶
Retrieve NWM RouteLink data from URL and return a dask.dataframe.DataFrame.
- Returns:
df – DataFrame containing associated location metadata.
- Return type:
dask.dataframe.DataFrame