iwfm.read_obs_smp

iwfm.read_obs_smp(smp_file)[source]

Read the contents of an observed values smp file (PEST observation file) and return as a polars DataFrame or dict.

Parameters:

smp_file (str) – Data file name (PEST-style smp format) Format: site_name MM/DD/YYYY HH:MM:SS value

Returns:

If polars is available, returns a sorted DataFrame with columns:

site_name : str      - observation site identifier
date      : datetime - observation date
time      : str      - observation time string (HH:MM:SS)
obs_value : float    - observed value

If polars is not available, returns a dict with the same keys, each containing a list of values. Sorted by (site_name, date, time).

Return type:

polars.DataFrame or dict