Closed AdrienWehrle closed 2 years ago
On the first iteration of the while loop mflag = True
so the test on L426 is always False at first and the d therein is not used.
So this should not cause any issue.
We could assign a dummy (nan?) value to d before the while loop.
Thanks! I just proposed the change in the above PR.
Spotted by
flake8
when added to the workflow in 9aff0c52a5b5921df1bc7c5fb4b2473e68e43f27.d
is indeed only defined few lines below but is already used in this condition.The condition can't simply be moved at the end of the method because
x1
andx2
are used for it but reassigned few lines below, so I don't think I understand that code. We should really avoid reassignments (here at L434)... @BaptisteVandecrux, could you help? Thanks a lot in advance!https://github.com/GEUS-SICE/SICE/blob/9aff0c52a5b5921df1bc7c5fb4b2473e68e43f27/sice_lib.py#L422-L428