I need to turn a 3-dimensional xarray DataArray into a 1-dimension dataset/dataarray in order to create a cumulative distribution function. I attempted to use this question and answer for reference, but I get an error that states: 'DataArray' object has no attribute 'data_vars.'
This makes me think that the answer is out of date and no longer useable. What would be my best option to collapse this 3D array into a 1D array?
Here's a picture of the data. Unfortunately, I'm unsure of how to upload a netCDF file, so the data is not readily accessible.
Thank you for the help!