Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check again if mat aa is zero #383

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

jerabekjak
Copy link
Member

in some cases, there was a problem that mat_aa was returned zero.
This is a draft of simple yet not elegant solution.
Feel free to modify....

in some cases, there was a problem that mat_aa was returned zero.

`12342134
@pesekon2
Copy link
Collaborator

pesekon2 commented May 7, 2024

In general, I agree with this fix. I have also found mat_aa == 0 in some cases and it clearly should not happen. However, I do not understand how can be mat_aa == 0 at this point. I do not see a way 0 would be saved into the matrix with the code above the added line (unless nodata == 0):

        mat_aa = ma.where(
            ma.logical_or(
                mat_nsheet == no_data, mat_y == no_data, mat_slope == no_data
            ),
            no_data,
            ma.where(
                mat_slope == 0,
                0.0001,  # comment OP: where did we get this value from?
                1 / mat_nsheet * ma.power(mat_slope, mat_y)
            )
        )

@jerabekjak
Copy link
Member Author

Next steps in this branch are described in commit 3098be1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants