Skip to content

Commit ded0417

Browse files
committed
fix: uninitialized variable usage
1 parent 9a0699b commit ded0417

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

include/pet_tools.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ double calculate_net_radiation_W_per_sq_m(pet_model *model)
6262
surface_longwave_albedo=0.03; // water - actually not this simple, but close enough for now
6363
}
6464

65-
if(model->pet_options.yes_aorc==0) // we must calculate longwave incoming from the atmosphere
65+
if(model->pet_options.yes_aorc==0)
66+
{
67+
// calculate longwave incoming from the atmosphere
6668
saturation_water_vapor_partial_pressure_Pa=calc_air_saturation_vapor_pressure_Pa(model->surf_rad_forcing.air_temperature_C);
6769

68-
actual_water_vapor_partial_pressure_Pa=model->surf_rad_forcing.relative_humidity_percent/100.0*
70+
actual_water_vapor_partial_pressure_Pa=model->surf_rad_forcing.relative_humidity_percent/100.0*
6971
saturation_water_vapor_partial_pressure_Pa;
7072

71-
if(model->pet_options.yes_aorc==0)
72-
{
7373
// CALCULATE DOWNWELLING LONGWAVE RADIATION FLUX FROM ATMOSPHERE, W/m2.
7474
if(0.90 < model->surf_rad_forcing.cloud_cover_fraction) // very nearly overcast or overcast
7575
{

0 commit comments

Comments
 (0)