awdb.convenience.discover_stations

awdb.convenience.discover_stations(
    network_codes=None,
    state_codes=None,
    station_triplets=None,
    station_names=None,
    elements=None,
    active_only=True,
    limit=None,
    include_sensor_metadata=False,
)

Discover stations using advanced filtering criteria with wildcard support.

This function leverages the full AWDB API filtering capabilities for efficient server-side filtering using wildcards. When include_sensor_metadata=True, it automatically queries station element details to provide complete sensor inventories.

Args: network_codes: Network codes with wildcards (e.g., [‘:OR:’] for all networks in OR) state_codes: State codes (e.g., [‘OR’, ‘WA’]) station_triplets: Station triplets with wildcards (e.g., [’*:OR:SNTL’]) station_names: Station names with wildcards (e.g., [‘Lake’]) elements: Element codes with wildcards (e.g., [‘SMS:’, ’STO:-20:’]) active_only: Return only active stations limit: Maximum number of stations to return include_sensor_metadata: Include detailed sensor information for each station

Returns: List of station dictionaries with optional sensor metadata

Examples: >>> # Find all SNOTEL stations in Oregon >>> stations = await discover_stations(station_triplets=[’*:OR:SNTL’]) >>> >>> # Find stations with soil moisture sensors in California >>> stations = await discover_stations(elements=[’SMS:*’], state_codes=[‘CA’]) >>> >>> # Find stations by name pattern >>> stations = await discover_stations(station_names=[‘River’]) >>> >>> # Get sensor metadata for found stations >>> stations = await discover_stations( … station_triplets=[’*:OR:SNTL’], … include_sensor_metadata=True … )