Skip to content

Commit b214165

Browse files
committed
updates for Hamon PET method, preventing negative PET
1 parent 4c8e30e commit b214165

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)