Closed MightyBOBcnc closed 3 years ago
Further investigation: Probably an "invalid" Z coordinate being passed to xyz2latlon.
It looks like due to floating point precision sometimes a value of 1.0000000000000002 or -1.0000000000000002 is being passed for the Z coordinate which is just enough outside of the allowable range for arcsin to fail and return a NaN.
Steps to Reproduce:
Observed Result: A gray ring of vertices appears around both poles when visualized in PyVista.
Expected Result: All vertices are assigned a color from the color scale.
Additional Notes: The gray vertices suggests that NaN values are being placed in the array used for color mapping. PyVista will assign no color if it encounters a NaN. The calc_daily_insolation_2 function has a lerp operation that uses division and that is the first place I would investigate; dividing by a certain value could possibly produce NaNs.