Fix for skewt subroutines ignoring x axis units
Wet and dry adiabats, along with mixing lines, do not correctly plot unless everything is in degrees celcius. This is especially a problem when the plots show the wrong values without giving any sort of warning. This fix makes the subroutines plot onto units matching the xaxis or input temperature. Checklist
Closes #1155 test added
Description Of Changes
Checklist
- [x] Closes #xxxx
- [x] Tests added
- [x] Fully documented
This follows on from the closed unimplemented pull request #1168
When I run the pytest --mpl -k test_skewt.py, there is a warning. I don't know what this warning is or if it applies to my changes?

Let me look locally. Some of the other most recent builds don't show this, so I'm guessing something that's tweaked in this PR is causing it.
Ok, so the error is caused by the fact that we're now doing a little bit of computing, so our this line:
ref_pressure < pressure.max()
ends up returning true, even though both are nominally 1000. Mind if I upload a commit to fix?
Actually, on second thought I'll do a separate PR for that issue, since I'll need some tests for that. We can ignore the warning in your PR.
You should be able to add the blank line and do:
git commit —amend
git push —force
As far as the other tests, I can take a look and see what’s going on.
Thanks @dopplershift.
@jibbals Apologies on this languishing for so long. I took the liberty of rebasing this on current main and making sure everything works with how the code is now structured. I'm expecting this to pass now.
Regarding the warnings from lsoda, I've figured them out completely, it's pretty dumb. Essentially:
units.Quantity(1000., 'mbar') - units.Quantity(1000., 'hPa')
gives
-2.2737367544323206e-13 millibar rather than 0 thanks to the wonder that is floating point arithmetic.
So with cf734e38 deciding default units for the xaxis, and underlying calculations (e.g. dry_lapse) having unit handling since, the original behavior in #1155 no longer happens, and these tests (with units specified, even if mixed) pass as-is on 1.1 and on current main. Passing un-united arrays as t0 to e.g. plot_dry_adiabats does currently fail with a unit error per the underlying calculation. I'm fine with that. As far as I can tell, the only thing we gain here right now is the hidden t > 150 assumption, which does avoid unit errors, but (imo) incorrectly so. We do need some of this more flexible axis unit handling in the future, so let's leave this open but punt for now. Thanks all!