Skip to content

NaN values of tdr  #3

@jaideep777

Description

@jaideep777

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;
       
    }    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions