Skip to content

Commit 013d8ea

Browse files
James CraigJames Craig
authored andcommitted
2 parents 81b3973 + 114157a commit 013d8ea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Diagnostics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ double CDiagnostic::CalculateDiagnostic(CTimeSeriesABC *pTSMod,
674674
}
675675
if (N > 0.0)
676676
{
677-
return (100.0 * maxMod - maxObs)/maxObs;
677+
return (100.0 * ((maxMod - maxObs)/maxObs));
678678
}
679679
else
680680
{

src/Evaporation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ double Hamon1961Evap(const force_struct *F)
267267

268268
abs_hum=216.7*(sat_vap*MB_PER_KPA)/(F->temp_daily_ave+ZERO_CELSIUS);//abs. humidity, g/m3 (may wish to make separate function of T)s
269269

270-
return 0.0055*4.0*abs_hum*F->day_length*F->day_length*MM_PER_INCH;
270+
return max(0.0,0.0055*4.0*abs_hum*F->day_length*F->day_length*MM_PER_INCH);
271271
}
272272

273273
//////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)