【发布时间】:2018-06-13 21:21:10
【问题描述】:
我想创建风玫瑰(实际上是洋流玫瑰),我正在尝试圆形和露天包的功能。使用 windrose(openair) 函数时,我得到了我期望的结果(我手动检查了它们),但是当我使用 windrose(circular) 时,我得到了我期望的一个数据集的结果,而不是另一个数据集的结果。我知道气象学家会绘制出风的方向,而我们在海洋学中会绘制出水流的方向。起初,我尝试添加 180°(或 pi,如果我使用弧度),它适用于一个数据集,但不适用于另一个数据集。我知道两个数据集的主要方向,因为我还使用方差椭圆和平均方向向量。我实际上注意到来自风玫瑰(圆形)和椭圆的玫瑰不同意。 我想使用 windrose(圆形)而不是 windrose(openair),因为我已经修改了函数以在某些经度、纬度点上创建带有玫瑰的地图。 我有一个包含数据集的 .RData 文件,但我找不到将它上传到这篇文章的方法。
非常感谢任何帮助。 干杯。
#dataset1, $t is theta (direction) and $r is radius (magnitude)
windrose(data.frame(dir=circular(pol.ex$t, units="degrees"),
mag=pol.ex$r), template="geographics") #in this dataset, predominant
#direction is around 120°, windrose is not accurate.
rose <- windRose(mydata=data.frame(wd=pol.ex$t, ws=pol.ex$r), cols="jet",
paddle=F) #this rose is accurate.
#dataset2, $t is theta (direction) and $r is radius (magnitude)
windrose(data.frame(dir=circular(pol.noex$t, units="degrees"),
mag=pol.noex$r), template="geographics") #now, this one is accurate.
rose <- windRose(mydata=data.frame(wd=pol.noex$t, ws=pol.noex$r),
cols="jet", paddle=F)#also accurate, dominant direction is ~ 220°
【问题讨论】: