Skip to content

ValueError in IntegrateSlope despite providing all required inputs as per documentation #13

@meghakiyer

Description

@meghakiyer

I have created and provided all the required input files as specified in the PySEBAL documentation. However, when attempting to run the model using Run_py3.py, the execution fails with the following error:

******* ERROR *******

Traceback (most recent call last):
File "/home/user/Documents/PySEBAL_dev/SEBAL/Run_py3.py", line 23, in
pysebal_py3.SEBALcode(number,inputExcel)
File "/home/user/Documents/PySEBAL_dev/SEBAL/pysebal_py3.py", line 818, in SEBALcode
Ra_mountain_24, Ra_inst, cos_zn, dr, phi, delta = Calc_Ra_Mountain(lon, DOY, hour, minutes, lon_proy, lat_proy, slope, aspect)
File "/home/user/Documents/PySEBAL_dev/SEBAL/pysebal_py3.py", line 3430, in Calc_Ra_Mountain
Ra_24.flat[ID]=TwoPeriodSun(constant,delta,s.flat[ID],gamma.flat[ID],phi.flat[ID])
File "/home/user/Documents/PySEBAL_dev/SEBAL/pysebal_py3.py", line 3480, in TwoPeriodSun
Val = IntegrateSlope(constant,B2.flat[ID],B1.flat[ID],delta,s.flat[ID],gamma.flat[ID],phi.flat[ID])
File "/home/user/Documents/PySEBAL_dev/SEBAL/pysebal_py3.py", line 3505, in IntegrateSlope
if abs(delta+phi.flat[ID])>(np.pi/2):
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Please let me know if a fix for this issue is already available

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions