robintw / Py6S

A Python interface to the 6S Radiative Transfer Model
GNU Lesser General Public License v3.0
186 stars 105 forks source link

IEEE_UNDERFLOW_FLAG error in MacOs Darwin #98

Closed fnemina closed 1 year ago

fnemina commented 1 year ago

While running Py6S code sometimes the flag IEEE_UNDERFLOW_FLAG is raised in MacOs Darwin with the M1 chip.

This flag is raised randomly and sometimes for the same object it can result in and error or not.

For what I've read it could be ignored the same way IEEE_INVALID_FLAG and IEEE_DENORMAL are ignored by adding the line

and (not ("IEEE_UNDERFLOW_FLAG" in stderr))

to outputs.py at line 77.

Does this seems like a sensible solution.

Thanks in advance Fran

robintw commented 1 year ago

Interesting, thanks for raising this.

Yes, that sounds like a sensible solution. Are you able to submit a PR?

fnemina commented 1 year ago

Yes I am. I'll just send it to you.

robintw commented 1 year ago

Fixed by #99