aldivi / caland

ca carbon accounting model
Other
7 stars 7 forks source link

fix non-regen LCC issue #39

Closed msimmond closed 6 years ago

msimmond commented 6 years ago

From Alan: Conceptually, I was adding the non-regen area to the total forest area lost rather than subtracting it (both values are negative in the code so it is a bit confusing). The original lines are (3178-3179 in the current master): lt_conv$area_adj[lt_conv[,conv_col_names[l]] < 0] = lt_conv$area_adj[lt_conv[,conv_col_names[l]] < 0] + lt_conv$non_regen_area[l] lt_conv$nonreg_add[lt_conv[,conv_col_names[l]] < 0] / lt_conv$non_regen_area[l] And they should be: lt_conv$area_adj[lt_conv[,conv_col_names[l]] < 0] = lt_conv$area_adj[lt_conv[,conv_col_names[l]] < 0] - lt_conv$non_regen_area[l] lt_conv$nonreg_add[lt_conv[,conv_col_names[l]] < 0] / lt_conv$non_regen_area[l]