@@ -150,7 +150,7 @@ model2netcdf.SIPNET <- function(outdir, sitelat, sitelon, start_date, end_date,
150150 )
151151
152152
153- if (! (" LAI " %in% colnames(sipnet_output ))) {
153+ if (! (" lai " %in% colnames(sipnet_output ))) {
154154 # When LAI not reported, calculate it from leaf C and leaf specific weight,
155155 # with the latter read from the parameter file.
156156 # Note the hardcoded + undocumented assumption that ../run/sipnet.param
@@ -163,7 +163,7 @@ model2netcdf.SIPNET <- function(outdir, sitelat, sitelon, start_date, end_date,
163163 " sipnet.param" ), stringsAsFactors = FALSE )
164164 leafCSpWt <- param [param [, 1 ] == " leafCSpWt" , 2 ]
165165 SLA <- 1000 / leafCSpWt # m2 leaf / kg C
166- sipnet_output $ LAI = sipnet_output $ plantLeafC * SLA
166+ sipnet_output $ lai = sipnet_output $ plantLeafC * SLA
167167 }
168168
169169 # ## Loop over years in SIPNET output to create separate netCDF outputs
@@ -213,7 +213,7 @@ model2netcdf.SIPNET <- function(outdir, sitelat, sitelon, start_date, end_date,
213213 " litter_carbon_content" = sub.sipnet.output $ litter ,
214214 " fine_root_carbon_content" = sub.sipnet.output $ fineRootC ,
215215 " coarse_root_carbon_content" = sub.sipnet.output $ coarseRootC ,
216- " LAI" = sub.sipnet.output $ LAI ,
216+ " LAI" = sub.sipnet.output $ lai ,
217217 " TotLivBiom" = sub.sipnet.output $ plantWoodC + sub.sipnet.output $ plantLeafC +
218218 sub.sipnet.output $ coarseRootC + sub.sipnet.output $ fineRootC ,
219219 " TotSoilCarb" = sub.sipnet.output $ soil + sub.sipnet.output $ litter ,
0 commit comments