Possibly-missing error handling
This is unlikely to cause an actual issue in practice, but I noticed that here we set IFL from the result of the environmental CAPE, but shortly thereafter we reassign it to the nominal value of 1 without actually handling the case where it's not 1.
I say this is unlikely to cause an actual issue because this is just one of many CAPE computations, so the probability of a failure here but not elsewhere is not particularly high.
In my browser, I have to scroll down to see the reassignment IFL=int(1):
https://github.com/dgilford/tcpyPI/blob/3c1d4eff8bd2f6d68e5bef45cf445a0641de7823/src/tcpyPI/pi.py#L585-L598
On a related note, in the loop to compute $p_\min$ it looks like we use the IFLAG of the last iteration. Maybe we could bail earlier on an error?