xarr_to_netcdf¶
- HSTB.kluster.xarray_helpers.xarr_to_netcdf(xarr, pth, fname, attrs=None, idx=None)¶
Takes in an xarray Dataset and pushes it to netcdf. For use with the output from combine_xarrs and/or _sequential_to_xarray
- Parameters
xarr (
Dataset) – Dataset to savepth (
str) – Path to the folder to contain the written netcdf filefname (
str) – base file name for the netcdf fileattrs (
Optional[dict]) – optional attribution to store in the netcdf storeidx (
Optional[int]) – optional file name index
- Returns
path to the netcdf file
- Return type
str