possible bug in cam/tools/mkatmsrffile/mkatmsrffile.F90

segfaults for me without this fix. Not sure if the fix is is correct, but based on the range of i, using wetland() instead of awetland() looks like a bug.

--- a/models/atm/cam/tools/mkatmsrffile/mkatmsrffile.F90
+++ b/models/atm/cam/tools/mkatmsrffile/mkatmsrffile.F90
@@ -244,7 +244,7 @@ program mkatmsrffile
do j=1,npft
total_land=total_land+apft(j)%fld(i)
end do
- fraction_soilw = total_land - (alake(i)+wetland(i))
+ fraction_soilw = total_land - (alake(i)+awetland(i))
if(total_land < 1.0_r8) then
alake(i) = alake(i) + (1.0_r8 - total_land)
end if
 
Back
Top