问题描述
我被困在水包的能量平衡计算上.我正在遵循的示例代码位于此网站 https://cran.r-project.org/web/packages/water/vignettes/Landsat8.html.我正在使用我自己的数据,并且能够读取我的原始陆地卫星图像和我感兴趣的区域 (aoi) 的表面反射图像.使用此代码时出现以下错误.
I am stuck on the Energy Balance calculation of the water package. The example code I am following is at this website https://cran.r-project.org/web/packages/water/vignettes/Landsat8.html. I am using my own data and am able to read both my original landsat image and the surface reflectance image with my area of interests (aoi). I get the following error when I use this code.
Energy.Balance <- METRIC.EB(image.DN = image, image.SR = image.SR,
plain=TRUE, aoi=aoi, n = 5, WeatherStation = WeatherStation,
ETp.coef = 1.2, sat="L8", alb.coeff = "Olmedo", LST.method = "SW",
LAI.method = "metric2010", Z.om.ws = 0.03, MTL = MTLfile)
Error in .local(x, ...):RasterLayer has no NA cells (for which to compute a distance)
推荐答案
这听起来像是搜索锚点像素时的问题.您可以尝试更新到最新版本的水包(0.7)并在函数METRIC.EB()
中添加anchors.method = 'flexible'
?
This sounds like a problem when searching for the anchor pixels. Can you try updating to the lastest version of water package (0.7) and adding anchors.method = 'flexible'
to function METRIC.EB()
?
这篇关于.local(x, ...) 中的 METRIC.EB 错误:RasterLayer 没有 NA 单元格(用于计算距离)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!