#+++ load libraries used in this vignette
library(REddyProc)
library(dplyr)
#+++ Load data with 1 header and 1 unit row from (tab-delimited) text file
Dir.s <-paste(system.file(package='REddyProc'),'examples',sep='/')
EddyData.F <-fLoadTXTIntoDataframe('AMF_JDS_2018.txt',Dir.s)
# note: use\code{fFilterAttr} to subset rows while keeping the units attributes
#+++ Add time stamp in POSIX time format
EddyDataWithPosix.F<-fConvertTimeToPosix(EddyData.F,'YDH',Year.s='Year',Day.s='DoY',Hour.s='Hour')
#+++ Initalize R5 reference class sEddyProc for post-processing of eddy data
#+++ with the variables needed for post-processing later
EddyProc.C<-sEddyProc$new('JDS',EddyDataWithPosix.F,c('NEE','Rg','Tair','VPD','Ustar'))
EddyProc.C$sSetLocationInfo(Lat_deg.n=31.2130184,Long_deg.n=121.9038239,TimeZone_h.n=8) #Location of Jiuduansha
#+++ Generate plots of all data in directory \plots (of current R working dir)
#EddyProc.C$sPlotHHFluxes('NEE')
#EddyProc.C$sPlotFingerprint('Rg')
#EddyProc.C$sPlotDiurnalCycle('Tair')
#+++ Plot individual months/years to screen (of current R graphics device)
#EddyProc.C$sPlotHHFluxesY('NEE', Year.i=2018)
EddyProc.C$sPlotFingerprintY('NEE', Year.i=2018)
#+++ Fill gaps in variables with MDS gap filling algorithm (without prior ustar filtering)
EddyProc.C$sMDSGapFill('NEE', FillAll.b=TRUE) #Fill all values to estimate flux uncertainties
EddyProc.C$sMDSGapFill('Rg', FillAll.b=FALSE) #Fill only the gaps for the meteo condition, e.g. 'Rg'
#+++ Example plots of filled data to screen or to directory \plots
EddyProc.C$sPlotFingerprintY('NEE_f', Year.i=2018)
EddyProc.C$sPlotDailySumsY('NEE_f','NEE_fsd', Year.i=2018) #Plot of sums with uncertainties
EddyProc.C$sPlotDailySums('NEE_f','NEE_fsd')
#+++ Partition NEE into GPP and respiration
EddyProc.C$sMDSGapFill('Tair', FillAll.b=FALSE) # Gap-filled Tair (and NEE) needed for partitioning
EddyProc.C$sMDSGapFill('VPD', FillAll.b=FALSE) # Gap-filled Tair (and NEE) needed for partitioning
EddyProc.C$sMRFluxPartition() # night time partitioning -> Reco, GPP
EddyProc.C$sGLFluxPartition() # day time partitioning -> Reco_DT, GPP_DT
#EddyProc.C$sGLFluxPartition(controlGLPart.l=partGLControl(isBoundLowerNEEUncertainty=FALSE)) # day time partitioning -> Reco_DT, GPP_DT
#plot( EddyProc.C$sTEMP$GPP_DT ~ EddyProc.C$sTEMP$GPP_f); abline(0,1)
#plot( -EddyProc.C$sTEMP$GPP_DT + EddyProc.C$sTEMP$Reco_DT ~ EddyProc.C$sTEMP$NEE_f ); abline(0,1)
#names(EddyProc.C$sTEMP)
# there are some constraints, that might be too strict for some datasets
# e.g. in the tropics the required temperature range might be too large.
# Its possible to change these constraints
#EddyProc.C$sMRFluxPartition(parsE0Regression=list(TempRange.n=2.0, optimAlgorithm="LM") )
#+++ Example plots of calculated GPP and respiration
EddyProc.C$sPlotFingerprintY('GPP_f', Year.i=2018)
EddyProc.C$sPlotFingerprint('GPP_f')
EddyProc.C$sPlotHHFluxesY('Reco', Year.i=2018)
EddyProc.C$sPlotHHFluxes('Reco')
x <- EddyProc.C$sTEMP
write.csv(x,file = "C:/Users/Surface/Desktop/1.csv")
GPP.zip_初级生产力计算_生态系统
版权申诉
5星 · 超过95%的资源 140 浏览量
2022-09-15
01:48:49
上传
评论 2
收藏 1KB ZIP 举报
weixin_42651887
- 粉丝: 80
- 资源: 1万+
最新资源
- 整卷预览.mhtml
- MySQL是一种广泛使用的开源关系型数据库管理系统,它提供了丰富的SQL语句用于数据库的创建、查询、更新和管理 以下是一些常见的
- MySQL是一种广泛使用的开源关系型数据库管理系统,它提供了丰富的SQL语句用于数据库的创建、查询、更新和管理 以下是一些常见
- MySQL是一种广泛使用的开源关系型数据库管理系统,它提供了丰富的SQL语句用于数据库的创建、查询、更新和管理 以下是一些常见的
- 基于Javascript的结婚请帖设计源码 - Invitation
- mysql语句大全及用法
- mysql语句大全及用法
- mysql语句大全及用法
- MySQL是一种广泛使用的开源关系型数据库管理系统
- MySQL是一种广泛使用的开源关系型数据库管理系统
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论2