API#

Load U.S. Climate Reference Network (USCRN) data.

Get data#

Download selected data for all sites and return as a pandas.DataFrame. In the returned DataFrame, and those from the readers as well, variable attributes such as long name and units are stored in attrs.

uscrn.get_data([years, which, n_jobs, cat, ...])

Get USCRN archive data.

uscrn.get_nrt_data(period[, which, n_jobs, cat])

Get USCRN near-real-time data.

Convert to xarray#

Convert to xarray.Dataset, automatically adding a soil depth dimension if applicable.

uscrn.to_xarray(df[, which, title, keep])

Convert to xarray representation.

Read#

Read data from a single file and return as a pandas.DataFrame.

uscrn.read(fp, *[, cat])

Read a USCRN file, auto-detecting which reader to use based on file name.

uscrn.read_daily(fp, *[, cat])

Read a daily USCRN file.

uscrn.read_daily_nrt(fp, *[, cat])

Read a daily USCRN "update" file.

uscrn.read_hourly(fp, *[, cat])

Read an hourly USCRN file.

uscrn.read_hourly_nrt(fp, *[, cat])

Read an hourly USCRN "update" file.

uscrn.read_monthly(fp, *[, cat])

Read a monthly USCRN file.

uscrn.read_subhourly(fp, *[, cat])

Read a subhourly USCRN file.

Metadata#

Load site metadata as a pandas.DataFrame.

uscrn.load_meta(*[, cat])

Load the station metadata table.