我正在查找枫糖浆每年的平均生产天数。我的 Maple 分布数据位于 ascii 文件中。我有一个名为的栅格(从 NetCDF 文件创建)brick.Tmax
。我想要匹配的规格brick.Tmax
我的枫树分布数据。
## These are the specs I want to use for my maple distribution
brick.Tmax
class : RasterBrick
dimensions : 222, 462, 102564, 366 (nrow, ncol, ncell, nlayers)
resolution : 0.125, 0.125 (x, y)
extent : -124.75, -67, 25.125, 52.875 (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
data source : E:\all_files\gridded_obs.daily.Tmax.1980.nc
names : X1980.01.01, X1980.01.02, X1980.01.03, X1980.01.04, X1980.01.05, X1980.01.06, X1980.01.07, X1980.01.08, X1980.01.09, X1980.01.10, X1980.01.11, X1980.01.12, X1980.01.13, X1980.01.14, X1980.01.15, ...
Date : 1980-01-01, 1980-12-31 (min, max)
varname : Tmax
## reading in red maple data from ascii file into rasterLayer
red_raster <- raster("E:/all_files/Maple_Data/redmaple.asc")
red_raster
class : RasterLayer
dimensions : 140, 150, 21000 (nrow, ncol, ncell)
resolution : 20000, 20000 (x, y)
extent : -1793092, 1206908, -1650894, 1149106 (xmin, xmax, ymin, ymax)
coord. ref. : NA
data source : E:\all_files\Maple_Data\redmaple.asc
names : redmaple
values : -2147483648, 2147483647 (min, max)
我如何投影所有规格(尺寸、crs、分辨率和范围)brick.Tmax
onto red_raster
,同时仍然保留red_raster
?看起来两者是互相排斥的。
注意:为了简化我的问题,我对我原来的帖子进行了相当多的编辑,所以如果下面的评论在当前上下文中令人困惑,我深表歉意。 (我删除了光栅prodavg_rast
这就像一个中间人)。