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.
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.