noaa-oar-arl / monetio

The Model and ObservatioN Evaluation Tool I/O package
https://monetio.readthedocs.io
MIT License
16 stars 19 forks source link

hysplit combine_dataset bugs #168

Open amcz opened 2 months ago

amcz commented 2 months ago

combine_dataset function in hysplit.py has a couple bugs.

  1. It does not properly combine datasets in which the time coordinates are not the same. In the hysplit DataArrays the time coordinate are datetime64 objects. The xarray align method does not seem to be able to align these properly. The fix is to change the time coordinate to integers before aligning and then convert back to datetime objects after the datasets are merged.

  2. It also is not properly combining datasets when both the source and ensemble dimensions are greater than 1. Most use cases have focused on when we are looking at a source term ensemble with one meteorological dataset (source dimension > 1 and ens dimension=1) or a meteorological ensemble (source dimension=1 and ensemble dimension > 1). However it should also be able to produce a combined dataset when both these dimensions > 1.

amcz commented 2 months ago

this issue has been fixed in hysplitdev branch

zmoon commented 2 months ago

this issue has been fixed in hysplitdev branch

Cool, shall we PR to develop branch? Is the hysplit_experimental supposed to be included?

amcz commented 2 months ago

Thanks - I will take the hysplit_experimental out and then it will be ready