Skip to content

Commit b8aefcf

Browse files
author
rqthomas
committed
merge Figure 5 into Figure 3
1 parent 94267a6 commit b8aefcf

22 files changed

+31
-30
lines changed

Main_analysis.R

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
library(plotrix)
55

6-
working_directory <- "/Users/quinn/Dropbox (VTFRS)/Shared_folders/ACONITE/Manuscript 2/2019 ms/analysis/final_rerun_for_reproducability/"
6+
working_directory <- "/Users/quinn/Dropbox (VTFRS)/Shared_folders/ACONITE/Manuscript 2/2019 ms/analysis/final_rerun_for_reproducability/ACONITE_canopy/"
77
figure_directory <- paste(working_directory, "/output/", sep = "")
88
fortran_code <- "src/aconite_canopy_Rinterface.so"
99
################
@@ -180,15 +180,15 @@ xlab = expression(paste("annual respiration (g C ", m^2, " ", yr^-1, ")", sep
180180
load("output/Rm_at_obs_LAI_TCN_biome3.Rdata")
181181
ylim = range(c(density(par_out_reich[, 2])$y, density(par_out_ryan[, 2])$y), density(par_out_atkin[, 2])$y)
182182
xlim = c(0, max(c(density(par_out_reich[, 2])$x, density(par_out_ryan[, 2])$x), density(par_out_atkin[, 2])$x))
183-
plot(density(par_out_reich[, 2], cut = c(0, 10000)), xlim = xlim, ylim = ylim, main = "")
184-
points(density(par_out_atkin[, 2], cut = c(0, 10000)), type = "l", col = "blue")
185-
points(density(par_out_ryan[, 2], cut = c(0, 10000)), type = "l", col = "red")
183+
plot(density(par_out_reich[, 2], cut = c(0, 10000)), xlim = xlim, ylim = ylim, main = "", lty = "dotted")
184+
points(density(par_out_atkin[, 2], cut = c(0, 10000)), type = "l", col = "blue", lty = "dashed")
185+
points(density(par_out_ryan[, 2], cut = c(0, 10000)), type = "l", col = "red", lty = "solid")
186186
mtext("density", side = 2, adj = 0.6, line = 2.5, cex = 0.7)
187187
mtext("Tropical Evergeen", side = 2, adj = 0.6, line = 4.5)
188188
v = expression("Canopy R"[leaf][",m"])
189189
mtext(v, side = 3, adj = 0.6, line = 1.0)
190190
text(xlim[1], ylim[2], "\n (a)")
191-
legend("topright", c("Ryan 1991", "Atkin 2016", "Reich 2008"), lty = c(1, 1, 1), col = c("red", "blue", "black"), bty = "n")
191+
legend("topright", c("Ryan 1991", "Atkin 2016", "Reich 2008"), col = c("red", "blue", "black"), bty = "n", lty = c("solid", "dashed", "dotted"))
192192

193193
#Blank
194194
plot.new()
@@ -197,9 +197,9 @@ plot.new()
197197
load("output/Rm_at_obs_LAI_TCN_biome2.Rdata")
198198
ylim = range(c(density(par_out_reich[, 2])$y, density(par_out_ryan[, 2])$y), density(par_out_atkin[, 2])$y)
199199
xlim = c(0, max(c(density(par_out_reich[, 2])$x, density(par_out_ryan[, 2])$x), density(par_out_atkin[, 2])$x))
200-
plot(density(par_out_reich[, 2], cut = c(0, 10000)), xlim = xlim, ylim = ylim, xlab = "annual respiration (gC m-2 yr-1)", ylab = "Arctic Evergreen", main = "")
201-
points(density(par_out_atkin[, 2], cut = c(0, 10000)), type = "l", col = "blue")
202-
points(density(par_out_ryan[, 2], cut = c(0, 10000)), type = "l", col = "red")
200+
plot(density(par_out_reich[, 2], cut = c(0, 10000)), xlim = xlim, ylim = ylim, xlab = "annual respiration (gC m-2 yr-1)", ylab = "Arctic Evergreen", main = "", lty = "dotted")
201+
points(density(par_out_atkin[, 2], cut = c(0, 10000)), type = "l", col = "blue", lty = "dashed")
202+
points(density(par_out_ryan[, 2], cut = c(0, 10000)), type = "l", col = "red", lty = "solid")
203203
mtext("density", side = 2, adj = 0.6, line = 2.5, cex = 0.7)
204204
mtext("Arctic Evergreen", side = 2, adj = 0.6, line = 4.5)
205205
text(xlim[1], ylim[2], "\n (b)")
@@ -210,9 +210,9 @@ plot.new()
210210
load("output/Rm_at_obs_LAI_TCN_biome1.Rdata")
211211
ylim = range(c(density(par_out_reich[, 2])$y, density(par_out_ryan[, 2])$y), density(par_out_atkin[, 2])$y)
212212
xlim = c(0, max(c(density(par_out_reich[, 2])$x, density(par_out_ryan[, 2])$x), density(par_out_atkin[, 2])$x))
213-
plot(density(par_out_reich[, 2], cut = c(0, 10000)), xlim = xlim, ylim = ylim, xlab = "annual respiration (gC m-2 yr-1)", ylab = "Arctic Deciduous", main = "")
214-
points(density(par_out_atkin[, 2], cut = c(0, 10000)), type = "l", col = "blue")
215-
points(density(par_out_ryan[, 2], cut = c(0, 10000)), type = "l", col = "red")
213+
plot(density(par_out_reich[, 2], cut = c(0, 10000)), xlim = xlim, ylim = ylim, xlab = "annual respiration (gC m-2 yr-1)", ylab = "Arctic Deciduous", main = "", lty = "dotted")
214+
points(density(par_out_atkin[, 2], cut = c(0, 10000)), type = "l", col = "blue", lty = "dashed")
215+
points(density(par_out_ryan[, 2], cut = c(0, 10000)), type = "l", col = "red", lty = "solid")
216216
mtext("density", side = 2, adj = 0.6, line = 2.5, cex = 0.7)
217217
mtext("Arctic Deciduous", side = 2, adj = 0.6, line = 4.5)
218218
mtext(xlab, side = 1, adj = 0.6, line = 2.5, cex = 0.7)
@@ -303,15 +303,16 @@ par(mfrow = c(3, 3), mar = c(1.1, 1.1, 1.1, 1.1), oma = c(5, 6, 2, 0))
303303
load("output/Rm_at_obs_LAI_TCN_biome3.Rdata")
304304
ylim = range(c(density(par_out_reich[, 2]/par_out_reich[, 1])$y, density(par_out_ryan[, 2]/par_out_ryan[, 1])$y), density(par_out_atkin[, 2]/par_out_atkin[, 1])$y)
305305
xlim = range(c(density(par_out_reich[, 2]/par_out_reich[, 1])$x, density(par_out_ryan[, 2]/par_out_ryan[, 1])$x), density(par_out_atkin[, 2]/par_out_atkin[, 1])$x)
306-
plot(density(par_out_reich[, 2]/par_out_reich[, 1]), xlim = xlim, ylim = ylim, main = "")
307-
points(density(par_out_atkin[, 2]/par_out_atkin[, 1]), type = "l", col = "blue")
308-
points(density(par_out_ryan[, 2]/par_out_ryan[, 1]), type = "l", col = "red")
306+
plot(density(par_out_reich[, 2]/par_out_reich[, 1]), xlim = xlim, ylim = ylim, main = "", lty = "dotted")
307+
points(density(par_out_atkin[, 2]/par_out_atkin[, 1]), type = "l", col = "blue", lty = "dashed")
308+
points(density(par_out_ryan[, 2]/par_out_ryan[, 1]), type = "l", col = "red", lty = "solid")
309309
v = expression(paste("Canopy ", R[leaf][",m"],"/GPP", sep = " "))
310310
mtext(v, side = 3, adj = 0.6, line = 1.0)
311311
text(xlim[1], ylim[2], "\n (a)")
312312
mtext("density", side = 2, adj = 0.6, line = 2.5, cex = 0.7)
313313
mtext("Tropical Evergeen", side = 2, adj = 0.6, line = 4.5)
314-
legend("topright", c("Ryan 1991", "Atkin 2016", "Reich 2008"), lty = c(1, 1, 1), col = c("red", "blue", "black"), bty = "n")
314+
legend("topright", c("Ryan 1991", "Atkin 2016", "Reich 2008"), col = c("red", "blue", "black"), bty = "n", lty = c("solid", "dashed", "dotted"))
315+
315316

316317
#Blank
317318
plot.new()
@@ -320,9 +321,9 @@ plot.new()
320321
load("output/Rm_at_obs_LAI_TCN_biome2.Rdata")
321322
ylim = range(c(density(par_out_reich[, 2]/par_out_reich[, 1])$y, density(par_out_ryan[, 2]/par_out_ryan[, 1])$y), density(par_out_atkin[, 2]/par_out_atkin[, 1])$y)
322323
xlim = range(c(density(par_out_reich[, 2]/par_out_reich[, 1])$x, density(par_out_ryan[, 2]/par_out_ryan[, 1])$x), density(par_out_atkin[, 2]/par_out_atkin[, 1])$x)
323-
plot(density(par_out_reich[, 2]/par_out_reich[, 1]), xlim = xlim, ylim = ylim, xlab = "Rm/GPP Ratio", main = "")
324-
points(density(par_out_atkin[, 2]/par_out_atkin[, 1]), type = "l", col = "blue")
325-
points(density(par_out_ryan[, 2]/par_out_ryan[, 1]), type = "l", col = "red")
324+
plot(density(par_out_reich[, 2]/par_out_reich[, 1]), xlim = xlim, ylim = ylim, xlab = "Rm/GPP Ratio", main = "", lty = "dotted")
325+
points(density(par_out_atkin[, 2]/par_out_atkin[, 1]), type = "l", col = "blue", lty = "dashed")
326+
points(density(par_out_ryan[, 2]/par_out_ryan[, 1]), type = "l", col = "red", lty = "solid")
326327
mtext("density", side = 2, adj = 0.6, line = 2.5, cex = 0.7)
327328
mtext("Arctic Evergreen", side = 2, adj = 0.6, line = 4.5)
328329
text(xlim[1], ylim[2], "\n (b)")
@@ -333,9 +334,9 @@ plot.new()
333334
load("output/Rm_at_obs_LAI_TCN_biome1.Rdata")
334335
ylim = range(c(density(par_out_reich[, 2] / par_out_reich[, 1])$y, density(par_out_ryan[, 2] / par_out_ryan[, 1])$y), density(par_out_atkin[, 2] / par_out_atkin[, 1])$y)
335336
xlim = range(c(density(par_out_reich[, 2] / par_out_reich[, 1])$x, density(par_out_ryan[, 2] / par_out_ryan[, 1])$x), density(par_out_atkin[, 2] / par_out_atkin[, 1])$x)
336-
plot(density(par_out_reich[, 2] / par_out_reich[, 1]), xlim = xlim, ylim = ylim, xlab = "Rm/GPP Ratio", main = "")
337-
points(density(par_out_atkin[, 2] / par_out_atkin[, 1]), type = "l", col = "blue")
338-
points(density(par_out_ryan[, 2] / par_out_ryan[, 1]), type = "l", col = "red")
337+
plot(density(par_out_reich[, 2] / par_out_reich[, 1]), xlim = xlim, ylim = ylim, xlab = "Rm/GPP Ratio", main = "", lty = "dotted")
338+
points(density(par_out_atkin[, 2] / par_out_atkin[, 1]), type = "l", col = "blue", lty = "dashed")
339+
points(density(par_out_ryan[, 2] / par_out_ryan[, 1]), type = "l", col = "red", lty = "solid")
339340
text(xlim[1], ylim[2], "\n (c)")
340341
mtext("density", side = 2, adj = 0.6, line = 2.5, cex = 0.7)
341342
mtext("Arctic Deciduous", side = 2, adj = 0.6, line = 4.5)
@@ -357,7 +358,7 @@ par(mfrow = c(3, 3), mar = c(1.1, 1.1, 1.1, 1.1), oma = c(5, 6, 2, 0))
357358
#########
358359
load("output/baseline_ryan_tropical_0.0106_1_contours.Rdata")
359360
contour(LAI, N, ((gpp - ra_mass) - leaf_growth_respiration - leaf_allocation), levels = seq(0, 7000, 200))
360-
points(leafC.linelist[[zero_iso_leafC]]$x, leafC.linelist[[zero_iso_leafC]]$y, type = "l", col = "red", lwd = 2, lty = "dashed")
361+
points(leafC.linelist[[zero_iso_leafC]]$x, leafC.linelist[[zero_iso_leafC]]$y, type = "l", col = "red", lwd = 2, lty = "dotted")
361362
points(leafN.linelist[[zero_iso_leafN]]$x, leafN.linelist[[zero_iso_leafN ]]$y, type = "l", col = "blue", lwd = 2, lty = "longdash")
362363
mtext(ylabel, side = 2, adj = 0.6, line = 2.5, cex = 0.7)
363364
mtext("Tropical Evergeen", side = 2, adj = 0.6, line = 4.5)
@@ -368,7 +369,7 @@ abline(lm(obs_TFN ~ obs_LAI))
368369
#########
369370
load("output/baseline_atkin_tropical_1.756_0.2061_contours.Rdata")
370371
contour(LAI, N, ((gpp - ra_mass) - leaf_growth_respiration - leaf_allocation), levels = seq(0, 7000, 200))
371-
points(leafC.linelist[[zero_iso_leafC]]$x, leafC.linelist[[zero_iso_leafC]]$y, type = "l", col = "red", lwd = 2, lty = "dashed")
372+
points(leafC.linelist[[zero_iso_leafC]]$x, leafC.linelist[[zero_iso_leafC]]$y, type = "l", col = "red", lwd = 2, lty = "dotted")
372373
points(leafN.linelist[[zero_iso_leafN]]$x, leafN.linelist[[zero_iso_leafN ]]$y, type = "l", col = "blue", lwd = 2, lty = "longdash")
373374
points(obs_LAI, obs_TFN, pch = 20, cex = 2)
374375
mtext("Aktin et al. 2016", side = 3, adj = 0.6, line = 1.0)
@@ -377,7 +378,7 @@ abline(lm(obs_TFN ~ obs_LAI))
377378
#########
378379
load("output/baseline_reich_tropical_0.691_1.639_contours.Rdata")
379380
contour(LAI, N, ((gpp - ra_mass) - leaf_growth_respiration - leaf_allocation), levels = seq(0, 7000, 200))
380-
points(leafC.linelist[[zero_iso_leafC]]$x, leafC.linelist[[zero_iso_leafC]]$y, type = "l", col = "red", lwd = 2, lty = "dashed")
381+
points(leafC.linelist[[zero_iso_leafC]]$x, leafC.linelist[[zero_iso_leafC]]$y, type = "l", col = "red", lwd = 2, lty = "dotted")
381382
points(leafN.linelist[[zero_iso_leafN]]$x, leafN.linelist[[zero_iso_leafN ]]$y, type = "l", col = "blue", lwd = 2, lty = "longdash")
382383
points(obs_LAI, obs_TFN, pch = 20, cex = 2)
383384
mtext("Reich et al. 2008", side = 3, adj = 0.6, line = 1.0)
@@ -386,7 +387,7 @@ abline(lm(obs_TFN ~ obs_LAI))
386387
#########
387388
load("output/baseline_ryan_arctic_evergreen_0.0106_1_contours.Rdata")
388389
contour(LAI, N, ((gpp - ra_mass) - leaf_growth_respiration - leaf_allocation), levels = seq(0, 7000, 100), ylab = "Arctic Evergreen")
389-
points(leafC.linelist[[zero_iso_leafC]]$x, leafC.linelist[[zero_iso_leafC]]$y, type = "l", col = "red", lwd = 2, lty = "dashed")
390+
points(leafC.linelist[[zero_iso_leafC]]$x, leafC.linelist[[zero_iso_leafC]]$y, type = "l", col = "red", lwd = 2, lty = "dotted")
390391
points(leafN.linelist[[zero_iso_leafN]]$x, leafN.linelist[[zero_iso_leafN ]]$y, type = "l", col = "blue", lwd = 2, lty = "longdash")
391392
mtext(ylabel, side = 2, adj = 0.6, line = 2.5, cex = 0.7)
392393
mtext("Arctic Evergreen", side = 2, adj = 0.6, line = 4.5)
@@ -396,23 +397,23 @@ abline(lm(obs_TFN ~ obs_LAI))
396397
#########
397398
load("output/baseline_atkin_arctic_evergreen_1.756_0.2061_contours.Rdata")
398399
contour(LAI, N, ((gpp - ra_mass) - leaf_growth_respiration - leaf_allocation), levels = seq(0, 7000, 100))
399-
points(leafC.linelist[[zero_iso_leafC]]$x, leafC.linelist[[zero_iso_leafC]]$y, type = "l", col = "red", lwd = 2, lty = "dashed")
400+
points(leafC.linelist[[zero_iso_leafC]]$x, leafC.linelist[[zero_iso_leafC]]$y, type = "l", col = "red", lwd = 2, lty = "dotted")
400401
points(leafN.linelist[[zero_iso_leafN]]$x, leafN.linelist[[zero_iso_leafN ]]$y, type = "l", col = "blue", lwd = 2, lty = "longdash")
401402
text(0.4, 19, "(e)")
402403
points(obs_LAI, obs_TFN, pch = 20, cex = 2)
403404
abline(lm(obs_TFN ~ obs_LAI))
404405
#########
405406
load("output/baseline_reich_arctic_evergreen_0.691_1.639_contours.Rdata")
406407
contour(LAI, N, ((gpp - ra_mass) - leaf_growth_respiration - leaf_allocation), levels = seq(0, 7000, 100))
407-
points(leafC.linelist[[zero_iso_leafC]]$x, leafC.linelist[[zero_iso_leafC]]$y, type = "l", col = "red", lwd = 2, lty = "dashed")
408+
points(leafC.linelist[[zero_iso_leafC]]$x, leafC.linelist[[zero_iso_leafC]]$y, type = "l", col = "red", lwd = 2, lty = "dotted")
408409
points(leafN.linelist[[zero_iso_leafN]]$x, leafN.linelist[[zero_iso_leafN ]]$y, type = "l", col = "blue", lwd = 2, lty = "longdash")
409410
points(obs_LAI, obs_TFN, pch = 20, cex = 2)
410411
text(0.4, 19, "(f)")
411412
abline(lm(obs_TFN ~ obs_LAI))
412413
#########
413414
load("output/baseline_ryan_arctic_decid_0.0106_1_contours.Rdata")
414415
contour(LAI, N, ((gpp-ra_mass) - leaf_growth_respiration - leaf_allocation), levels = seq(0, 7000, 100),ylab = "Arctic Decidious")
415-
points(leafC.linelist[[zero_iso_leafC]]$x, leafC.linelist[[zero_iso_leafC]]$y, type = "l", col = "red", lwd = 2, lty = "dashed")
416+
points(leafC.linelist[[zero_iso_leafC]]$x, leafC.linelist[[zero_iso_leafC]]$y, type = "l", col = "red", lwd = 2, lty = "dotted")
416417
points(leafN.linelist[[zero_iso_leafN]]$x, leafN.linelist[[zero_iso_leafN ]]$y, type = "l", col = "blue", lwd = 2, lty = "longdash")
417418
mtext(ylabel, side = 2, adj = 0.6, line = 2.5, cex = 0.7)
418419
mtext("Arctic Deciduous", side = 2, adj = 0.6, line = 4.5)
@@ -423,7 +424,7 @@ abline(lm(obs_TFN ~ obs_LAI))
423424
#########
424425
load("output/baseline_atkin_arctic_decid_1.756_0.2061_contours.Rdata")
425426
contour(LAI, N, ((gpp-ra_mass) - leaf_growth_respiration - leaf_allocation), levels = seq(0, 7000, 100))
426-
points(leafC.linelist[[zero_iso_leafC]]$x, leafC.linelist[[zero_iso_leafC]]$y, type = "l", col = "red", lwd = 2, lty = "dashed")
427+
points(leafC.linelist[[zero_iso_leafC]]$x, leafC.linelist[[zero_iso_leafC]]$y, type = "l", col = "red", lwd = 2, lty = "dotted")
427428
points(leafN.linelist[[zero_iso_leafN]]$x, leafN.linelist[[zero_iso_leafN ]]$y, type = "l", col = "blue", lwd = 2, lty = "longdash")
428429
points(obs_LAI, obs_TFN, pch = 20, cex = 2)
429430
mtext(xlabel, side = 1, adj = 0.6, line = 2.5, cex = 0.7)
@@ -432,7 +433,7 @@ abline(lm(obs_TFN ~ obs_LAI))
432433
#########
433434
load("output/baseline_reich_arctic_decid_0.691_1.639_contours.Rdata")
434435
contour(LAI, N, ((gpp-ra_mass) - leaf_growth_respiration - leaf_allocation), levels = seq(0, 7000, 100))
435-
points(leafC.linelist[[zero_iso_leafC]]$x,leafC.linelist[[zero_iso_leafC]]$y, type = "l", col = "red", lwd = 2, lty = "dashed")
436+
points(leafC.linelist[[zero_iso_leafC]]$x,leafC.linelist[[zero_iso_leafC]]$y, type = "l", col = "red", lwd = 2, lty = "dotted")
436437
points(leafN.linelist[[zero_iso_leafN]]$x, leafN.linelist[[zero_iso_leafN ]]$y, type = "l", col = "blue", lwd = 2, lty = "longdash")
437438
points(obs_LAI, obs_TFN, pch = 20, cex = 2)
438439
mtext(xlabel, side = 1, adj = 0.6, line = 2.5, cex = 0.7)
57.8 KB
Binary file not shown.

output/Figure2_Rm_flux.pdf

0 Bytes
Binary file not shown.

output/Figure3_Rm_histogram.pdf

25.1 KB
Binary file not shown.

output/Figure4_other_fluxes.pdf

0 Bytes
Binary file not shown.
17.2 KB
Binary file not shown.

output/Figure6_NCCE_flux.pdf

-44 Bytes
Binary file not shown.
-1 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)