constructESD(esd4all)
constructESD()所属R语言包:esd4all
Empirical-Statistical Downsacling For All.
实证的统计Downsacling对于所有。
译者:生物统计家园网 机器人LoveR
描述----------Description----------
R-package for processing results from empirical-statistical downscaling (ESD).
R-封装经验统计降尺度(ESD)的处理结果。
The code has been taylored to post-process data derived through the clim.pact (http://cran.r-project.org/web/packages/clim.pact/index.html) and met.no.REB packages (the latter is not posted on CRAN). The package uses the same ESD data as displayed in Google.Earth (http://eklima.met.no/metno/esd/esd.google.earthTemp.kmz).
后处理数据而得来的clim.pact(http://cran.r-project.org/web/packages/clim.pact/index.html)和met.no.REB包的代码已经taylored (后者被发布在CRAN)。该包使用相同的ESD数据显示Google.Earth(http://eklima.met.no/metno/esd/esd.google.earthTemp.kmz)。
The R-package assumes that the ESD involves a fairly large multi-model ensemble, typically involving 40-50 different simulations. Each simulation produces one time series for each location, typically over the period 1900-2100. The time series are the seasonal mean temperature (e.g. winter, spring, summer and autumn).
R-封装的ESD假设涉及一个相当大的多模式集合,通常包括40-50不同的模拟。每个模拟产生一个时间序列的每一个位置,通常在此期间1900年至2100年。时间序列季节平均温度(如冬,春,夏,秋)。
More details about the nature of the data can be found in met.no Notes 03/2009 (http://met.no/Forskning/Publikasjoner/?module=Files;action=File.getFile;ID=2319) and 15/2009 (http://met.no/Forskning/Publikasjoner/?module=Files;action=File.getFile;ID=2631).
更多细节的性质的数据,可以发现在met.no注意03/2009(http://met.no/Forskning/Publikasjoner/?module=Files行动= File.getFile ID = 2319),15 / 2009(http://met.no/Forskning/Publikasjoner/?module=Files行动= File.getFile ID = 2631)。
data(esdsummary) retrieves ESD data generated by esdsummary() in the met.no-package. These data consist of coefficients of the best-fit polynomials to the 5-, and 95- percentiles as well as the mean of the set of time series (1900-2100) of downscaled multi-model ensemble (CMIP3). data(grm.coef) gieves the coefficients c_i from the geographical regression model (GRM) for the 5th-order polinomial fits to the trends. The 3D matrix holds the Estimate Std. Error t value Pr(>|t|) from the summary of the linear model - see R-script in exampls for more details.
data(esdsummary)检索所产生的esdsummary()的met.no封装的ESD数据。这些数据包括的系数的最佳拟合多项式的5 - ,和95 - 百分以及缩小的多模式集合(CMIP3)的集合的时间序列(1900-2100)的平均值。 data(grm.coef)的GIEVES系数c_i从地域回归模型(GRM)的5阶polinomial的适合的趋势。 3D矩阵持有的估计标准。误差t值Pr(> | T |)的线性模型的总结 - R-脚本在exampls更多详细信息。
constructESD constructs time series of the 5-, and 95- percentiles as well as the mean (1900-2100) of downscaled GCM (e.g from the CMIP3 data set). These reconstructions are constructed from coefficients
constructESD构造时间序列的5 - ,和95 - 百分位数,以及缩小的GCM(例如从CMIP3数据集)的平均值(1900-2100)。这些重建是构建系数
t^3 + c4 t^4 + c5 t^5,</i> where t is the time.
T ^ 3 + C4 T ^ 4 + C5吨的^ 5,</ I>,其中,t为时间。
pdfESD produces a pdf (Gaussian) of the seasonal temperature downscaled from the multi-model ensemble at a given location. Note, this pdf is not necessarily the same as the true pdf for the real temperature.
pdfESD产生的PDF(高斯)的季节性温度降尺度的多模式集合在一个给定的位置。请注意,此PDF不一定是真正的PDF文件的真实温度相同。
mapESDlocs produces a map showing the locations for which there are multi-model ESD results in the esd4all package.
mapESDlocs产生了图显示的位置有esd4all包的多模型ESD结果。
queryLocations returns the name of the locations of the ESD locations.
queryLocations返回的ESD位置的位置的名称。
get5mintopo retrieves a 5-minute resolution data file of the topography over Internet and saves the data locally in a suitable format for the use in the esd4all package.
get5mintopo检索5分钟分辨率的地形对互联网的数据文件,并将数据保存在本地使用esd4all包在一个合适的格式。
fortegn a utility used internally - returns -1 or +1.
fortegn一个内部使用的工具 - 返回-1或+1。
geo.inf is a function that uses a geographical regression model (GRM) to grid the results, and then adds the residuals through interpolation (kriging or 2D splines). This is an internal function.
geo.inf是一个函数,它使用的GEO回归模型(GRM)格的结果,然后添加的残差,通过插值(克里格法或2D样条)。这是一个内部的功能。
gridESD is the main function that grids the coefficients used to describe the best-fit polynomials providing smooth approximations of the time series for 5- and 95-percentiles and the ensemble mean. The function uses geo.inf.
gridESD的主要功能是电网的系数,用来描述提供最适合的多项式平滑近似的时间序列为5 - 95百分位值和合奏的意思。该功能使用了geo.inf。
gridded.c is produced by gridESD. In the CRAN-version (1.0-3), a reduced version of this gridded data set is used due to size limitations, but a fuller version is available from http://noserc.met.no/grtools/esd4all.html.
gridded.c是gridESD。在CRAN版本(1.0-3)中,栅格数据集的简化版本,这是由于尺寸的限制,但更全面的版本可从http://noserc.met.no/grtools/esd4all.html的。
mapESDquants constructs map of derived quantiles.
mapESDquants构建图的衍生位数。
mapESDprobs construct map of the fraction of GCMs with value below/higher then threshold.
mapESDprobs构造图大气环流的分数值低于/高于阈值。
esdsummary contains coefficients describing the polynomials of the 5th and 95th percentiles as well as ensemble mean of ESD analysis for a large number of locations around the world, seen in http://eklima.met.no/metno/esd/esd.google.earthTemp.kmz. The list is created using esd2google in met.no.REB, available at http://noserc.met.no/grtools/reb.html.
esdsummary描述的第5和第95百分位的多项式的系数以及合奏的意思是,世界各地的,http://eklima.met.no/metno/esd/看到大量的ESD分析esd.google.earthTemp.kmz。创建列表使用esd2googlemet.no.REB,可在http://noserc.met.no/grtools/reb.html。
gridded.c contains results from gridding the coefficients (stored in esdsummary) over northern Europe.
gridded.c包含网格系数(存储在esdsummary),欧洲北部的结果。
ESDinGoogle views the ESD results in GoogleEarth
ESDinGoogle认为,在GoogleEarth的ESD结果
ESDdetails provides details about the ESD results and explains how the figures should be interpreted. ESDreference provides a link to a proper reference for the ESD - Benestad, R.E. (2005) Climate change scenarios for northern Europe from multi-model IPCC AR4 climate simulations GRL, 32 doi:10.1029/2005GL023401 No. 17, L17704.
ESDdetails提供的公共服务电子化“计划的结果和解释的数字应如何解释。 ESDreference提供了一个链接到一个适当的参考的ESD - 贝内斯塔,RE (2005年)的气候变化情景欧洲北部多模型IPCC第四次评估报告“气候模拟GRL,32 DOI:10.1029/2005GL023401号的17,L17704。
rda2cdf reads the gridded data in an rda-file and saves these as a netCDF file.
rda2cdf读取栅格数据的rda文件中,并保存为netCDF文件。
figures Makes figures showing maps of the 95-percentile for summer (JJA) mean temperature and probability of below freezing mean winter (DJF) temperatures.
figures使数字显示,夏季(JJA)的95个百分点的图平均气温零度以下,冬季平均温度(DJF)的概率。
用法----------Usage----------
constructESD(location,plot=TRUE,
get.data="data(esdsummary,envir=environment())",
gridded="data(gridded.c,envir=environment())",
mfrow=c(2,2))
pdfESD(location,plot=TRUE,get.data="data(esdsummary,envir=environment())",
gridded="data(gridded.c,envir=environment())",year=2050,
ref=NULL,mfrow=c(2,2),what="pdf")
mapESDlocs(get.data="data(esdsummary,envir=environment())")
queryLocations(nr=NULL,get.data="data(esdsummary,envir=environment())")
get5mintopo(browser = "firefox", url ="http://marine.rutgers.edu/po/tools/gridpak/etopo5.nc")
fortegn(a,b)
geo.inf(g.obj,do.km=TRUE,x.scale=1000,
predict=TRUE,krig=TRUE,krig.Nx=NULL,krig.Ny=NULL,
x.rng=c(-10,32),y.rng=c(44,70),plot=FALSE,
krig.package="fields",
use.previous.estimates=TRUE,linear.intp=TRUE)
KrigFields(resid,lon.grd,lat.grd)
KrigSgeostat(resid,lon.grd,lat.grd,do.km)
gridESD(get.data = "data(esdsummary,envir=environment())",
plot = FALSE, x.rng = c(-30, 50), y.rng = c(40, 72),
x.scale = 1000, do.km = TRUE, krig = TRUE, new = TRUE,
krig.Nx = 30, krig.Ny = 30, use.previous.estimates =
TRUE, linear.intp = TRUE, krig.package = "fields",
fname = "gridded.c.rda")
mapESDquants(what="q95",season=3,year=2050,ref=NULL,
get.data1="data(gridded.c,envir=environment())",
get.data2="data(esdsummary,envir=environment())",
plot=TRUE)
mapESDprobs(thresh=0,season=1,year=2050,ref=NULL,
get.data="data(gridded.c,envir=environment())",plot=TRUE)
data(esdsummary)
data(gridded.c)
data(gridded.ealat.c)
data(gridded.africa.c)
data(grm.coef)
data(grm.coef.africa)
data(grm.coef.ealat)
ESDinGoogle(browser = "firefox", url="http://eklima.met.no/metno/esd/esd.google.earthTemp.kmz")
ESDdetails(browser = "firefox", url="http://met.no/Forskning/Publikasjoner/")
rda2cdf(get.data="data(gridded.c,envir=environment())")
figures(get.data="data(gridded.c,envir=environment())",
season.1=3,season.2=1,year=2050,thresh=0,what="q95")
reduce.rda.size(get.data="data(gridded.c,envir=environment())",reduce.res=TRUE,
Nx=100,Ny=100)
参数----------Arguments----------
参数:location
A string containing the name of site or a list with longitude and latitude (in that order) for reconstruction from gridded data.
一个字符串,包含网站或重建栅格数据的经度和纬度(按顺序)列表的名称。
参数:plot
flag: TRUE or FALSE
标志:TRUE或FALSE
参数:get.data
Method for getting the data
获取数据的方法
参数:gridded
Method for getting gridded data
获取栅格数据的方法
参数:year
Scenario year
情景年
参数:nr
Station number
站号
参数:browser
Preferred browser
首选浏览器
参数:url
URLs of on-line reports or KML-files.
上线报告或KML文件的URL。
参数:g.obj
List object holding ESD data for a number of sites. Used for gridding.
ESD数据的List对象的网站数量。用于网格。
参数:do.km
FLAG: TRUE use km rather than lon-lat coordinates.
FLAG:TRUE,而不是使用公里经度,纬度坐标。
参数:x.scale
Spatila scale: 1000 implies units of km.
Spatila规模:1000意味着单位为公里。
参数:predict
FLAG: TRUE or FALSE
FLAG:TRUE或FALSE
参数:krig
FLAG: FALSE implies a bi-linear interpolation rather than kriging. Two kriging options are avialble, specified by the argument krig.package. Past tests have revealed some problems with the kriging options, however.
FLAG:,FALSE意味着一个双线性插值,而不是克里格法。两个的克里格法选项是avialble的,指定的参数krig.package。过去的测试已经暴露出一些问题与克里格选项,但是。
参数:krig.package
Specify package for kriging analysis: "fields" or "sgeostat"
指定包为克里格分析:“字段”或“sgeostat的”
参数:x.rng
x range for selection of sites in gridding
X系列的选址在网格
参数:y.rng
y range for selection of sites in gridding
y范围选择的网站在网格
参数:use.previous.estimates
FLAG: TRUE for avoiding repeating lengthy calculations
FLAG:TRUE为避免重复冗长的计算
参数:linear.intp
used for the linear argument in interp
用于线性参数interp
参数:ref
Reference year
基准年
参数:fname
File name for gridded.c.
文件名称gridded.c。
参数:what
Specification of type
规格类型
参数:a
A value: a < b returns -1 in fortegn
A值:A <B返回-1fortegn
参数:b
A value: a < b returns -1 in fortegn
A值:A <B返回-1fortegn
参数:reduce.res
TRUE: use interp to reduce the spatial resolution, otherwise save only the land points.
TRUE:使用interp,以减少空间分辨率,其他只有土地百分点。
参数:mfrow
see par.
看到par。
参数:krig.Nx
To specify coarser grid for residual gridding
要指定较粗的网格,剩余的网格
参数:krig.Ny
To specify coarser grid for residual gridding
要指定较粗的网格,剩余的网格
参数:new
FALSE: try to continue on a previous job
FALSE:在以前的工作中继续
参数:season
Season
季节
参数:season.1
Season
季节
参数:season.2
Season
季节
参数:get.data1
Method for getting the data
获取数据的方法
参数:get.data2
Method for getting the data
获取数据的方法
参数:thresh
Threshold value for estimating probabilities
阈值估计概率
参数:resid
List object holding the residuals from GRM
List对象的残差GRM
参数:lon.grd
longitude coordinates of grid
经度坐标的网格
参数:lat.grd
Latitude coordinates of grid
纬度坐标网格
参数:Nx
number of points in x-dimensions
数目的点在x维度
参数:Ny
number of points in y-dimensions
y维度中的点的数目
(作者)----------Author(s)----------
R.E. Benestad
实例----------Examples----------
## Not run: [#不运行:]
ESDinGoogle()
data(esdsummary)
mapESDlocs()
queryLocations() -> a
constructESD(a[1]) -> b
pdfESD(a[1])
mapESDquants() -> map.q95
mapESDprobs() -> map.pr.T.lt.0
# How to generate the gridded data[如何生成的栅格数据]
dsjobs(ele=101,scen="sresa1b")
bestESD() # to weed out multiple locations[淘汰多个位置]
allESD(path="ESD/") # to weed out multiple locations[淘汰多个位置]
esd2google() -> esdsummary # summarise all the ESD results[概括所有的ESD结果]
catESDsummary(esdsummary) -> esdsummary.tidy
gridded.c <- gridESD(get.data=esdsummary.tidy, x.rng=c(-12,45),y.rng=c(35,72),new=TRUE)
gridded.africa.c <- gridESD(get.data=esdsummary.tidy,x.rng=c(-20,50),y.rng=c(-40,37),new=TRUE)
gridded.ealat.c <-
gridESD(get.data=esdsummary.tidy,x.rng=c(15,190),y.rng=c(60,80),new=TRUE)
#How to create the figures in publications:[如何创建出版物的数字:]
figures(get.data="data(gridded.ealat.c,envir=environment())",year=2100,
what="mean",thresh=-10,season.1=1)
file.rename("Gridded_ESD-q95map.nc","EALAT_ESD-meanmap-2100.nc")
file.rename("Gridded_ESD-p0map.nc","EALAT_ESD-p-10map-2100.nc")
figures(get.data="data(gridded.ealat.c,envir=environment())",
what="mean",thresh=-10,season.1=1)
file.rename("Gridded_ESD-q95map.nc","EALAT_ESD-meanmap-2050.nc")
file.rename("Gridded_ESD-p0map.nc","EALAT_ESD-p-10map-2050.nc")
figures(get.data="data(gridded.ealat.c,envir=environment())",year=2000,
what="mean",thresh=-10,season.1=1)
file.rename("Gridded_ESD-q95map.nc","EALAT_ESD-meanmap-2000.nc")
file.rename("Gridded_ESD-p0map.nc","EALAT_ESD-p-10map-2000.nc")
constructESD(list(90,70),gridded="data(gridded.ealat.c,envir=environment())")
pdfESD(list(90,70),gridded="data(gridded.ealat.c,envir=environment())")
figures(get.data="data(gridded.africa.c,envir=environment())",
season.1=3,season.2=3,thresh=35)
file.rename("Gridded_ESD-q95map.nc","Africa_ESD-q95map-2500.nc")
file.rename("Gridded_ESD-p0map.nc","Africa_ESD-p35map-2500.nc")
figures(get.data="data(gridded.africa.c,envir=environment())",
season.1=3,season.2=3,thresh=35,year=2010)
file.rename("Gridded_ESD-q95map.nc","Africa_ESD-q95map-2000.nc")
file.rename("Gridded_ESD-p0map.nc","Africa_ESD-p34map-2000.nc")
figures(get.data="data(gridded.africa.c,envir=environment())",
season.1=3,season.2=3,thresh=35,year=2100)
file.rename("Gridded_ESD-q95map.nc","Africa_ESD-q95map-2100.nc")
file.rename("Gridded_ESD-p0map.nc","Africa_ESD-p34map-2100.nc")
figures(year=2100)
file.rename("Gridded_ESD-q95map.nc","Europe_ESD-q95map-2100.nc")
file.rename("Gridded_ESD-p0map.nc","Europe_ESD-p0map-2100.nc")
figures(year=2000)
file.rename("Gridded_ESD-q95map.nc","Europe_ESD-q95map-2000.nc")
file.rename("Gridded_ESD-p0map.nc","Europe_ESD-p0map-2000.nc")
figures()
file.rename("Gridded_ESD-q95map.nc","Europe_ESD-q95map-2050.nc")
file.rename("Gridded_ESD-p0map.nc","Europe_ESD-p0map-2050.nc")
# Maps for EALAT book:[图为EALAT书:]
figures(get.data="data(gridded.ealat.c,envir=environment())",year=1975,
what="mean",thresh=-10)
file.rename("Gridded_ESD-q95map.nc","EALAT_ESD-meanmap-1975.nc")
file.rename("Gridded_ESD-p0map.nc","EALAT_ESD-p-10map-1975.nc")
figures(get.data="data(gridded.ealat.c,envir=environment())",year=2085,
what="mean",thresh=-10)
file.rename("Gridded_ESD-q95map.nc","EALAT_ESD-meanmap-2085.nc")
file.rename("Gridded_ESD-p0map.nc","EALAT_ESD-p-10map-2085.nc")
# Generate tables for adjusted R-squared statistics for the geographical[生成表的地域调整后的R-平方统计]
# regression model[回归模型]
library(esd4all)
data(gridded.c)
R2 <- attributes(gridded.c)$GRM.R2
dim(R2) <- c(6,12); R2 <- t(R2)
colnames(R2) <- paste("c",0:5,sep="_")
rownames(R2) <- paste(rep(c("mean","q05","q95"),4),
c(rep("DJF",3),rep("MAM",3),rep("JJA",3),rep("SON",3)))
print(R2)
# The papers used ferret (ferret.wrc.noaa.gov/) to make the final plots [使用的纸张雪貂(ferret.wrc.noaa.gov /)做最后的图]
# based on the netCDF files created... [根据NetCDF文件创建...]
# The following lines were used to reduce the matrix of coefficients for[下面的线被用来减少的系数矩阵]
# the CRAN-version of the esd4all-package:[的CRAN版本的的esd4all包:]
reduce.rda.size(Nx=50,Ny=50) -> gridded.c
save(file="gridded.c.reduced.rda",gridded.c)
reduce.rda.size(get.data="data(gridded.ealat.c,envir=environment())",Nx=50,Ny=50)->
gridded.ealat.c
save(file="gridded.ealat.c.reduced.rda",gridded.ealat.c)
reduce.rda.size(get.data="data(gridded.africa.c,envir=environment())",Nx=50,Ny=50)->
gridded.africa.c
save(file="gridded.africa.c.reduced.rda",gridded.africa.c)
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|