hydrotools.nwm_client.HTTPFileCatalog module¶
NWM HTTP File Catalog¶
Concrete implementation of a National Water Model file client for discovering files on generic HTTP servers, for example:
NOMADS – https://nomads.ncep.noaa.gov/pub/data/nccf/com/nwm/prod/
Classes¶
HTTPFileCatalog
- class hydrotools.nwm_client.HTTPFileCatalog.HTTPFileCatalog(server: str, ssl_context: ~ssl.SSLContext = <ssl.SSLContext object>)¶
Bases:
NWMFileCatalog
An HTTP client class for NWM data. This HTTPFileCatalog class provides various methods for discovering NWM files on generic web servers.
- _abc_impl = <_abc._abc_data object>¶
- async static get_html(url: str, ssl_context: ~ssl.SSLContext = <ssl.SSLContext object>) str ¶
Retrieve an HTML document.
- Parameters:
url (str, required) – Path to HTML document
ssl_context (ssl.SSLContext, optional, default context) – SSL configuration context.
- Return type:
HTML document retrieved from url.
- list_blobs(configuration: str, reference_time: str, must_contain: str = 'channel_rt') List[str] ¶
List available blobs with provided parameters.
- Parameters:
configuration (str, required) – Particular model simulation or forecast configuration. For a list of available configurations see NWMDataService.configurations
reference_time (str, required) – Model simulation or forecast issuance/reference time in %Y%m%dT%HZ format.
must_contain (str, optional, default 'channel_rt') – Optional substring that must be found in each blob name.
- Return type:
A list of blob names that satisfy the criteria set by the parameters.
- property server: str¶
- property ssl_context: SSLContext¶