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

NaN values of tdr #3

Open
jaideep777 opened this issue Jun 12, 2024 · 0 comments
Open

NaN values of tdr #3

jaideep777 opened this issue Jun 12, 2024 · 0 comments

Comments

@jaideep777
Copy link

In SPLASH::run_one_day() and equivalent functions, tdrain can and does become nan, which should be checked and handled separately.

The relevant lines of code are here:

if((R > 0.0) && (sm > Wmax)){
        // calc theoretical time to drain out the area upslope at the current transmittance
        t_drain = -1.0*log(1.0-(log(Kb)*(Au*R/Q)))/log(Kb);
        // cout << "R/Q/t_drain = " << R << "/" << Q << "/" << t_drain << '\n'; 
        // using the usual decaying drainage eqn Q_t=Q_o Kb^t, how muchs is the initial input?
        //q_in_f = Qt/(Ai*pow(Kb,t_drain));
        q_in_f = (Qt-Au*R*log(Kb))/Ai;
       
    }    
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

No branches or pull requests

1 participant