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 hysp_massload bugs #94

Closed amcz closed 1 year ago

amcz commented 1 year ago

There were two bugs in the hsysp_massload function. The function threw an error if a cdump file with only one vertical level was input. This was due to 'z' no longer being a dimension in the arrays returned from some of the helper functions when there was only one vertical level. The fix was to make sure that 'z' stayed as a dimension in these returned arrays. The second bug had to do with an incorrect calculation of level thickness if there were 0 concentrations in some of the levels and then that level was no longer included in the 'z' dimension. The fix was to calculate level thickness from the 'Level top heights (m)' attribute of the DataArray rather from the values of the 'z' itself. A new _delta_multiply() function was created to do this.

amcz commented 1 year ago

These issues were resolved in the develop branch with the commit on 11/21/2022

zmoon commented 1 year ago

Ok, thanks @amcz . Note the CI failure is from the linter, I will fix.