swn.file.topnet2ts#

swn.file.topnet2ts(nc_path, varname, *, mult=None, run=None, log_level=20)#

Read TopNet data from a netCDF file into a pandas.DataFrame timeseries.

User may need to multiply DataFrame to convert units.

Parameters:
nc_pathstr

File path to netCDF file

varnamestr

Variable name in netCDF file to read

multfloat, optional

Multiplier applied to dataset, which preserves dtype. For example, to convert from “meters3 second-1” to “meters3 day-1”, use 86400.

runint, optional

Files with an ensemble or uncertainty analysis may have more than one run, this option allows a run to be selected. Default behaviour is to take the first run (index 0). The last run can be selected with -1.

log_levelint, optional

Level used by logging module; default is 20 (logging.INFO)

Returns:
pandas.DataFrame

Where columns is rchid and index is DatetimeIndex.