This document serves to document the FoRTE ED disturbance baseline run. It offers us an opportunity to take a look at the meteorological inputs. Things we need to think about while looking at the results
Met Data List Name
- dlwrf — downward long wave radiation (W m-2)
- nbdsf — near infrared beam downward solar radiation (W m-2)
- nddsf — near IR diffuse downward solar radiation (W m-2)
- vbdsf — visible beam downward solar radiation (W m-2)
- vddsf — visible diffuse downward solar radiation (W m-2)
- prate — precipitation rate (kgH2O m-2 s-1)
- pres — atmospheric pressure (Pa)
- hgt — geopotential height (m)
- ugrd — zonal wind (m s-1)
- vgrd — meridional wind (m s-1)
- sh — specific humidity (kgH2O kgAir-1)
- tmp — air temperature (K)
data <- as.data.table(read.csv(file.path(INPUT, 'monthly_mean_met.csv'), stringsAsFactors = FALSE))
data$date <- ymd(paste(data$year, data$month, '01', sep = '/'))
long_met_data <- melt(data, measure.vars = c("nbdsf", "nddsf", "vbdsf", "vddsf",
"prate", "dlwrf", "pres", "hgt", "ugrd",
"vgrd", "sh", "tmp"),
variable.name = 'variable', value.name = 'value')
long_met_data <- long_met_data[, list(date, variable, value, year)]
var_info <- data.table(variable = c('dlwrf', 'nbdsf', 'nddsf', 'vbdsf',
'vddsf', 'prate', 'pres', 'hgt',
'ugrd', 'vgrd', 'sh', 'tmp'),
description = c('downward long wave radiation',
'near infrared beam downward solar radiation',
'near IR diffuse downward solar radiation',
'visible beam downward solar radiation',
'visible diffuse downward solar radiation',
'precipitation rate',
'atmospheric pressure',
'geopotential height',
'zonal wind',
'meridional wind',
'specific humidity',
'air temperature'),
units = c('W m-2', 'W m-2', 'W m-2', 'W m-2',
'W m-2', 'kgH2O m-2 s-1', 'Pa', 'm',
'm s-1', 'm s-', 'kgH2O kgAir-1', 'K'))
long_met_data <- long_met_data[var_info, on = 'variable']
long_met_data <- long_met_data[variable != 'hgt', ] # exclude the geo spatial height on cause it doesn't
long_met_data %>%
ggplot() +
geom_line(aes(date, value)) +
facet_wrap("variable", scales = 'free') +
labs(title = 'Monthly Time Series of ED Met Data Inputs') +
geom_vline(xintercept = date('1979-01-01'), color = 'red') +
geom_vline(xintercept = date('2015-01-01'), color = 'blue') +
THEME
The red line indicate when the generated data historical Climate data ends. The blue line indicates when the dermatological record is used starting in 2015.
The monthly data is rather noisy and it can be difficult to look at, calculate the annual mean.
annual_data <- long_met_data[ , list( 'value' = mean(value)), by = list(year, variable)]
ggplot(annual_data) +
geom_line(aes(year, value)) +
facet_wrap("variable", scales = 'free') +
labs(title = 'Annual ED Met Data Inputs') +
geom_vline(xintercept = 1979, color = 'red') +
geom_vline(xintercept = 2015, color = 'blue') +
THEME
As part of the development of the ED FoRTE experiment runs I did a complete default run using all the met inputs. The outputs we are interested in are monthly NPP, NEE, LAI, biomass by cohort.
# Read in the ED data, it is in a very particular format, in order to plot there will need to be some
# data manipulation.
ed_data <- readRDS(file.path(OUTPUT_DIR, "full-length.rds"))
PFTs <- c(6, 8, 9, 10, 11, 7) # The PFTS to keep, some of the ED outputs report all of the PFTs.
pft_names <- data.frame(pft = PFTs,
pft_name = c('Northern North American pines',
'Late-successional North American conifers',
'Temperate broadleaf, early successional',
'Temperate broadleaf, mid-successional',
'Temperate broadleaf, late successional',
'Southern North American pines '))
monthly NPP, NEE, LAI, biomass by cohort
In these plots I’ve only included the values from June to simplify the plots. Otherwise it is near impossible to differentiate between the pfts.
out <- as.data.table(ed_data$df_cohort[[1]])[ ,list(datetime, AGB_CO, PFT, DBH, NPLANT)]
# Add a unique identifier for each of the cohorts (reminder that cohorts = unique species at DBH)
split(out, out$datetime) %>%
lapply(function(x){
x$CO <- LETTERS[1:nrow(x)]
return(x)
}) %>%
rbindlist() ->
out
out <- out[pft_names, on = c('PFT' = 'pft')]
out$year <- year(out$datetime)
out$month <- month(out$datetime)
out$variable <- "AGB_CO"
out <- out[as.data.table(ed2_variable_info())[, list(variable, description, unit)], on = 'variable', nomatch=0]
out$value <- out$NPLANT * out$AGB_CO
out$unit <- gsub(pattern = '/plant', replacement = '/m2', out$unit)
out[month == 8] %>%
ggplot(aes(year, value, color = DBH, shape = pft_name)) +
geom_point() +
THEME +
labs(title = 'Mid Summer Above Ground Biomass by Cohort (pft x DBH)',
subtitle = 'Complete Run',
y = unique(out$unit)) +
geom_vline(xintercept = 1979, color = 'red') +
geom_vline(xintercept = 2015, color = 'blue') ->
full_run
out[year %in% 1900:1920 & month == 8] %>%
ggplot(aes(datetime, AGB_CO, color = DBH, shape = pft_name)) +
geom_point() +
THEME +
labs(title = 'Mid Summer Above Ground Biomass by Cohort (pft x DBH)',
subtitle = 'Early Years',
y = unique(out$unit)) +
theme(legend.position = 'none') ->
early_years
plot_grid(early_years, full_run, rel_widths = c(0.3, 0.7))
out <- as.data.table(ed_data$df_cohort[[1]])[ ,list(datetime, MMEAN_NPP_CO, PFT, DBH, NPLANT)]
out <- out[pft_names, on = c('PFT' = 'pft')]
out$year <- year(out$datetime)
out$month <- month(out$datetime)
out$variable <- 'MMEAN_NPP_CO'
out <- out[as.data.table(ed2_variable_info())[, list(variable, description, unit)], on = 'variable', nomatch=0]
out$value <- out$MMEAN_NPP_CO * out$NPLANT
out$unit <-gsub(pattern = '/pl', replacement = '/m2', out$unit)
npp_to_plot <-out
out <- out[, list(value = mean(MMEAN_NPP_CO, na.rm = TRUE)), by = list(pft_name, year, variable, unit, description)]
out %>%
ggplot(aes(year, value, color = pft_name)) +
geom_line() +
THEME +
labs(title = 'Average Annual NPP',
subtitle = 'Species',
y = unique(out$unit)) +
geom_vline(xintercept = 1979, color = 'red') +
geom_vline(xintercept = 2015, color = 'blue')
## Warning: Removed 1 row(s) containing missing values (geom_path).
Because NEP looks at the ecosystem is is not reported on the cohort level.
out <- as.data.table(ed_data$df_scalar[[1]])[ ,list(datetime, MMEAN_NEP_PY)]
out$datetime <- ymd(out$datetime)
out$year <- year(out$datetime)
out$month <- month(out$datetime)
out$variable <- 'MMEAN_NEP_PY'
out <- out[as.data.table(ed2_variable_info())[, list(variable, description, unit)], on = 'variable', nomatch=0]
out <- out[, list(value = mean(MMEAN_NEP_PY, na.rm = TRUE)), by = list(year, variable, unit, description)]
out %>%
ggplot(aes(year, value)) +
geom_line() +
THEME +
labs(title = 'Annual NEP',
subtitle = 'Stand NEP',
y = unique(out$unit)) +
theme(legend.position = 'none') +
geom_vline(xintercept = 1979, color = 'red') +
geom_vline(xintercept = 2015, color = 'blue')
out <- as.data.table(ed_data$df_cohort[[1]])[ ,list(datetime, MMEAN_LAI_CO, PFT, DBH, NPLANT)]
out$datetime <- ymd(out$datetime)
out$year <- year(out$datetime)
out$month <- month(out$datetime)
out$variable <- 'MMEAN_LAI_CO'
out <- out[as.data.table(ed2_variable_info())[, list(variable, description, unit)],
on = 'variable', nomatch=0]
out <- out[pft_names, on = c('PFT' = 'pft')]
out[month == 8] %>%
ggplot(aes(year, MMEAN_LAI_CO, color = DBH, shape = pft_name)) +
geom_point() +
THEME +
labs(title = 'Leaf area index',
subtitle = 'Cohort (Species x DBH)',
y = unique(out$unit),
x = 'Mid Summer Values') +
# theme(legend.position = 'none') +
geom_vline(xintercept = 1979, color = 'red') +
geom_vline(xintercept = 2015, color = 'blue')
sessionInfo()
## R version 3.6.3 (2020-02-29)
## Platform: x86_64-apple-darwin15.6.0 (64-bit)
## Running under: macOS Mojave 10.14.6
##
## Matrix products: default
## BLAS: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
##
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] fortedata_1.0.1 cowplot_1.0.0 ed4forte_0.0.0.9000
## [4] lubridate_1.7.8 data.table_1.12.8 ggplot2_3.3.2
## [7] magrittr_1.5
##
## loaded via a namespace (and not attached):
## [1] Rcpp_1.0.4.6 pillar_1.4.4 compiler_3.6.3 tools_3.6.3
## [5] digest_0.6.25 evaluate_0.14 lifecycle_0.2.0 tibble_3.0.1
## [9] gtable_0.3.0 lattice_0.20-41 pkgconfig_2.0.3 rlang_0.4.6
## [13] yaml_2.2.1 rgdal_1.4-8 xfun_0.14 withr_2.2.0
## [17] dplyr_1.0.0 stringr_1.4.0 knitr_1.28 hms_0.5.3
## [21] generics_0.0.2 vctrs_0.3.1 rprojroot_1.3-2 grid_3.6.3
## [25] tidyselect_1.1.0 here_0.1 glue_1.4.1 R6_2.4.1
## [29] rmarkdown_2.3.1 sp_1.3-2 readr_1.3.1 farver_2.0.3
## [33] purrr_0.3.4 backports_1.1.8 scales_1.1.1 ellipsis_0.3.1
## [37] htmltools_0.5.0 colorspace_1.4-1 labeling_0.3 stringi_1.4.6
## [41] munsell_0.5.0 crayon_1.3.4