diff --git a/models/fates/R/model2netcdf.FATES.R b/models/fates/R/model2netcdf.FATES.R index ee493b3675..e429d8b66f 100644 --- a/models/fates/R/model2netcdf.FATES.R +++ b/models/fates/R/model2netcdf.FATES.R @@ -149,14 +149,14 @@ model2netcdf.FATES <- function(outdir, sitelat, sitelon, start_date, end_date, v } ## Put time and vars - ncdf4::ncvar_put(ncout, time_var, mean(var_bound), start=c(month), count=c(1)) + ncdf4::ncvar_put(ncout, time_var, mean(var_bound), start=c(mo), count=c(1)) for (i in seq_along(out$var)) { if(out$dimm[[i]]==4){ # xypt - ncdf4::ncvar_put(ncout, out$var[[i]], out$dat[[i]], start=c(1,1,1,month), count=c(1,1,12,1)) + ncdf4::ncvar_put(ncout, out$var[[i]], out$dat[[i]], start=c(1,1,1,mo), count=c(1,1,12,1)) }else if (out$dimm[[i]]==3) { # xyt - ncdf4::ncvar_put(ncout, out$var[[i]], out$dat[[i]], start=c(1,1,month)) + ncdf4::ncvar_put(ncout, out$var[[i]], out$dat[[i]], start=c(1,1,mo)) }else{ # time_bounds - ncdf4::ncvar_put(ncout, out$var[[i]], out$dat[[i]], start=c(1,month)) + ncdf4::ncvar_put(ncout, out$var[[i]], out$dat[[i]], start=c(1,mo)) } } }