Skip to content

data.IEM_ASOS

Global

Import path: earth2studio.data.IEM_ASOS

View source on GitHub

Documentation

IEM archive of parsed ASOS, AWOS, and METAR station observations.

This source uses the Iowa Environmental Mesonet bulk ASOS service. It requests only parsed observation fields and never requests or retains the unprocessed METAR report. IEM performs little quality control on this historical archive.

Parameters:

  • stations (str | list[str] | None, default: None ) –

    IEM station identifiers to query. None queries all stations allowed by the selected networks, by default None.

  • networks (str | list[str] | None, default: None ) –

    IEM network identifiers, such as "IA_ASOS". None does not restrict the request by network, by default None.

  • report_types (tuple[int, ...], default: (3, 4) ) –

    IEM report types to include: 1 for HFMETAR, 3 for routine, and 4 for special reports, by default (3, 4).

  • time_tolerance (TimeTolerance, default: timedelta64(10, 'm') ) –

    Time tolerance window for filtering observations. Accepts a single value (symmetric +/- window) or a tuple (lower, upper) for asymmetric windows, by default np.timedelta64(10, "m").

  • cache (bool, default: True ) –

    Cache parsed CSV responses in the local filesystem, by default True.

  • verbose (bool, default: True ) –

    Show download progress, by default True.

  • async_timeout (int, default: 600 ) –

    Total timeout in seconds for an async fetch, by default 600.

  • async_workers (int, default: 16 ) –

    Maximum number of concurrent fetch tasks. Request starts are rate-limited to one per second to comply with the IEM service limit, by default 16.

  • retries (int, default: 3 ) –

    Number of retries for transient download failures, by default 3.

Warning

Broad station or time selections can return large responses. IEM limits requests without explicit stations to 24 hours and applies an IP-based one-request-per-second throttle.

Note

Additional resources:

__call__

__call__(
    time: datetime | list[datetime] | TimeArray,
    variable: str | list[str] | VariableArray,
    fields: str | list[str] | Schema | None = None,
) -> DataFrame

Retrieve parsed IEM ASOS/AWOS observations.

Parameters:

  • time (datetime | list[datetime] | TimeArray) –

    Timestamps to return observations for in UTC.

  • variable (str | list[str] | VariableArray) –

    Variables from IEM_ASOSLexicon to return.

  • fields (str | list[str] | Schema | None, default: None ) –

    Output fields to include, by default None (all fields).

Returns:

  • DataFrame –

    Parsed observations in Earth2Studio long-form schema.

fetch async

fetch(
    time: datetime | list[datetime] | TimeArray,
    variable: str | list[str] | VariableArray,
    fields: str | list[str] | Schema | None = None,
) -> DataFrame

Asynchronously retrieve parsed IEM ASOS/AWOS observations.

Parameters:

  • time (datetime | list[datetime] | TimeArray) –

    Timestamps to return observations for in UTC.

  • variable (str | list[str] | VariableArray) –

    Variables from IEM_ASOSLexicon to return.

  • fields (str | list[str] | Schema | None, default: None ) –

    Output fields to include, by default None (all fields).

Returns:

  • DataFrame –

    Parsed observations in Earth2Studio long-form schema.

available classmethod

available(time: datetime | datetime64) -> bool

Check whether a timestamp is within the IEM archive range.

Parameters:

Returns:

  • bool –

    True when the timestamp is not earlier than the archive start.