Open sgdecker opened 3 years ago
If you look through the traceback, you can see the error is coming from so.fixed_point
, which is the function we're using from scipy.optimize
to solve for the LCL. So not a bug, but would be nice to have support for NaN
s. Our options in this case are:
NaN
s (slow)NaN
s with placeholder values for input, then reset to NaN
after calling fixed_point
. What do we choose for placeholder values that won't result in spurious warnings/extra iterations? (Maybe use the first point with all valid data?)NaN
s) or another calculation (like #626)
What went wrong?
Not sure if this is a bug or a feature request. My goal was to compute the condensation pressure on the 300-K surface, which is partially underground. I was expecting the
lcl
function to return NaNs at the gridpoints where the 300-K surface is underground, but instead, it crashed:I think I can manually write a nested loop to calculate condensation pressure gridpoint by gridpoint, checking for NaNs before calling
lcl()
, but I don't think this workaround should be necessary.Operating System
Linux
Version
1.1.0
Python Version
3.9.7
Code to Reproduce