Skip to content

Commit

Permalink
Update src/soil_moisture_profile.cxx
Browse files Browse the repository at this point in the history
modified condition to check negative values as well.

Co-authored-by: Austin Raney <austin.raney@noaa.gov>
  • Loading branch information
ajkhattak and aaraney committed Apr 1, 2024
1 parent f45cc0d commit 532566a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/soil_moisture_profile.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ ReadVectorData(string param_name, string param_value)

if (z1.find(delimiter) == string::npos) {
double v = stod(z1);
if (v == 0.0) {
if (v <= 0.0) {
stringstream errMsg;
errMsg << "Input provided in the config file for parameter "<< param_name << " is " << v << ". It should be positive."<< "\n";
throw runtime_error(errMsg.str());
Expand Down

0 comments on commit 532566a

Please sign in to comment.