cryotools / cosipy

Coupled snowpack and ice surface energy and mass balance model in Python
GNU General Public License v3.0
51 stars 29 forks source link

Double assignment in radCor.py #21

Closed jlandmann closed 5 years ago

jlandmann commented 5 years ago

First of all: this looks like a really cool project!!!! Thanks for doing this great effort!!!! :-)

While searching for a way to correct incoming solar radiation for terrain slope and azimuth, I stumbled upon your implementation of it. I didn't test if it works properly, but I think it has two assignments to the same variable one of which should be deleted for code clarity: https://github.com/cryotools/cosipy/blob/9b8645a4ab23277f44c564fe6358521597b80d3b/modules/radCor.py#L130-L134

In my humble opinion, the second assignment should be correct. Let me know if I should make a PR.

AnsArn commented 5 years ago

Thanks a lot for pointing out the double assignment. Yes, the second assignment is the correct one. It is now corrected in the radCor.py file.