data-raw/cases/FLUX_in_TP.R

library(sp2)
library(sp)
library(data.table)
library(lubridate)

plot(TP_poly)
plot(sp,add = TRUE)

r <- raster::intersect(sp, TP_poly)
# sites <- r$site %>% code_ChrVec()
sites <- c("CN-Dan", "CN-Ha2", "CN-HaM")

library(tidyverse)
df <- fread("OUTPUT/fluxsites166_FULLSET_daily_v20200411 (80%).csv")
d <- df[site %in% sites]
d$date %<>% ymd()
ggplot(d, aes(date, GPP_DT)) + geom_point() +
    facet_wrap(~site, ncol = 1, scales = "free_y") +
    labs(y = expression(GPP[DT] ~ "(" * gC ~ m^-2 ~ d^-1 * ")"))

save(d, file = "data-raw/cases/青藏高原通量站数据.rda")
rpkgs/rfluxnet documentation built on May 31, 2024, 6:57 p.m.