如何使用 R Verification Package 进行季节性气候预测数据集
我想在 R 中使用 verification
包。我有以下格式的 obs 和预测的每日数据:
- Obs 数据的维度为 120, 396,其中 120 是提前期,396 是总初始时间时间。
- 预测数据的维度为 120、396、10,其中前两个维度与 obs 数据维度相同,第三个维度是集合成员的维度。
另外,我已经从数据中删除了每日气候平均值。为了获得概率技能,我需要将观测数据更改为二进制数据集,并将预测数据更改为概率。为此,我需要使用 R 中 verification
包中的 verify 函数(我认为我的理解是正确的)。但是当我应用这个函数时,它会给出一些错误:
If baseline is not included, baseline values will be calculated from the sample obs.
Error in e1[[1L]] : subscript out of bounds
另外:
警告消息:
In is.finite(obs) & is.finite(pred) : 较长的对象长度不是较短对象长度的倍数
在 max(pred) 中:max 没有非缺失参数;返回 -Inf
在 min(pred) 中:min 没有非缺失参数;返回 Inf
我不知道如何解决这个函数。有人可以在这方面帮助我吗?
I want to use the verification
package in R. I have daily data of obs and prediction in the following format:
- Obs data has dimension of 120, 396 where 120 is the lead time and 396 is the total initial time.
- Prediction data has dimension of 120, 396, 10 where first two dimensions are same as obs data dimension and the third dimension is of ensemble member.
Also, I already removed daily climatology mean from my data. To get probabilistic skill, I need to change my obs data into binary data set and prediction data into probabilities. For that I need to use the verify function in the verification
package in R (I think my understanding is right). But when I apply this function, it gives some error as
If baseline is not included, baseline values will be calculated from the sample obs.
Error in e1[[1L]] : subscript out of bounds
In addition:
Warning messages:
In is.finite(obs) & is.finite(pred) :
longer object length is not a multiple of shorter object lengthIn max(pred) : no non-missing arguments to max; returning -Inf
In min(pred) : no non-missing arguments to min; returning Inf
I do not know how to solve this function. Can anyone help me in this regard?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否尝试过使用小插图?
Have you tried working through the vignette?
我解决了读取数据的问题,并从
R
的验证包中得到了一些图。现在我想知道如何在 R 中排列数据,即我将观察数据排列为 (120, 396),其中 120 是前置时间,396 是总初始时间。预测数据有一个额外的集合成员维度,如 (120, 396,10)。在将这些数据集放入验证包的验证功能之前,我确实喜欢这样,我不知道为什么这个过程是必要的以及它的作用,但在放入验证功能之前这是必要的。然后使用我使用的验证函数,
然后一切正常,我可以将验证函数的结果用于其他事情。但我不知道验证包是如何工作的以及我的数据排列是否正确?上述数据集120、396中取哪个维度作为样本维度?
I solved the problem of reading the data and got some plots from verification package of
R
. Now I want to know that how to arrange data inR
i.e. I arranged the observation data like (120, 396) where 120 is the lead time and 396 is the total initial time. The forecast data has one extra dimension of ensemble member like (120, 396,10). Before putting these data sets into verify function of verification package, I do like thisI do not know why this process is necessary and what it does but it is necessary before putting into verify function. Then to use verify function I use,
Then everything is OK and I can use the result of verify function to other things. But I do not know how verification package works and my data arrangement is correct? Which dimension is taken as sample dimension in above data set 120, 396?