I would like to incorporate XArray into PyDSD to make many of the operations much easier (In particular, netCDF writing).
Here is my proposal, I would like some feedback.
All entries in fields become DataArrays. All coordinates will be stored in a DropSizeDistribution.coords. We will add properties for time, diameter, velocity bin to point into the coords dictionary. Most things will be able to stay the same as far as how they work. The one bigger change is the values would now be accessed as something like DropSizeDistribution['Nd'].values instead of by ['data'].
Benefits: We can autoroll datasets and make writing much easier. Xarray objects are easier to work with and this opens the possibility of possibly adding some dask integrations as well.
@nguy and anyone else that has a vested interest, I would love to get your feedback. The actual work to write the changes will be pretty quick I believe.
One big thing I have not figured out how to address is making sure all of the lengths stay in sync. This is a problem with our current implementation as well though so we don't lose anything here.
I would like to incorporate XArray into PyDSD to make many of the operations much easier (In particular, netCDF writing).
Here is my proposal, I would like some feedback.
All entries in fields become DataArrays. All coordinates will be stored in a DropSizeDistribution.coords. We will add properties for time, diameter, velocity bin to point into the coords dictionary. Most things will be able to stay the same as far as how they work. The one bigger change is the values would now be accessed as something like DropSizeDistribution['Nd'].values instead of by ['data'].
Benefits: We can autoroll datasets and make writing much easier. Xarray objects are easier to work with and this opens the possibility of possibly adding some dask integrations as well.
@nguy and anyone else that has a vested interest, I would love to get your feedback. The actual work to write the changes will be pretty quick I believe.
One big thing I have not figured out how to address is making sure all of the lengths stay in sync. This is a problem with our current implementation as well though so we don't lose anything here.