EDIT: the issue title was focused on proposing to implement UxDataArray.to_uxdataset() and UxDataset.to_uxdataarray(), but I later discovered the relevant functionality actually exists, it just wasn't named what I was expecting. See next message for details.
Below was the original text for this message, less relevant now but I am keeping it here for reference:
These should both work in the intuitive way, analogously to xarray.DataArray.to_dataset() and xarray.Dataset.to_dataarray().
These may be especially relevant as an easy-to-implement workaround for #1734 (and could maybe even be used while solving that issue?), as it would enable something like ds.to_uxdataarray('variable').zonal_mean().to_dataset('variable'), and similar for any other currently-only-defined-for-UxDataArray methods.
EDIT: the issue title was focused on proposing to implement UxDataArray.to_uxdataset() and UxDataset.to_uxdataarray(), but I later discovered the relevant functionality actually exists, it just wasn't named what I was expecting. See next message for details.
Below was the original text for this message, less relevant now but I am keeping it here for reference: