Skip to content

Sun angle < 0 fatal error #582

Description

@cdeline

Passing NaN values into the RADIANCE gendaylit function should not be allowed - we need to implement some better error checking here to prevent errors and nonsense from very low sun angles and very low dni. specifically within RadianceObj.gendaylit at the output of the np.arcsin() function.

/home/kdoubled/.conda-envs/radianceEnv/lib/python3.9/site-packages/bifacial_radiance/main.py:1662: RuntimeWarning: overflow encountered in scalar subtract
sunalt = np.arcsin((ghi-dhi)/(dni+.001))*180/np.pi # reverse engineer elevation from ghi, dhi, dni
/home/kdoubled/.conda-envs/radianceEnv/lib/python3.9/site-packages/bifacial_radiance/main.py:1662: RuntimeWarning: invalid value encountered in arcsin
sunalt = np.arcsin((ghi-dhi)/(dni+.001))*180/np.pi # reverse engineer elevation from ghi, dhi, dni
/home/kdoubled/.conda-envs/radianceEnv/lib/python3.9/site-packages/bifacial_radiance/main.py:2143: Warning: oconv: fatal - (!gendaylit -ang nan 56.04273662073834 -W 34 4 -g 0.2 -O 1 ): bad arguments for source "sun"
warnings.warn(err[9:], Warning)
/home/kdoubled/.conda-envs/radianceEnv/lib/python3.9/site-packages/bifacial_radiance/main.py:2875: UserWarning: AnalysisObj not successful.
warnings.warn('AnalysisObj not successful.')

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions