使用windrose(圆形)和windRose(openair)时的差异

时间:2018-06-12 18:43:46

标签: r gis

我想制作风玫瑰(实际上是洋洋玫瑰),我正在尝试圆形和露天包的功能。当使用windRose(openair)函数时,我得到了我期望的结果(我手动检查了它们),但是当我使用windrose(圆形)时,我得到的结果是我期望的一个数据集,但不是另一个数据集。我知道气象学家绘制了风吹的方向,我们在海洋学中绘制了电流的方向。起初,我尝试添加180°(或pi,如果我在弧度下工作),它适用于一个数据集,但不适用于另一个数据集。我知道两个数据集的主要方向,因为我也使用方差椭圆和平均方向向量。我实际上注意到来自windrose(圆形)和椭圆形的玫瑰不同意。 我想使用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°

1 个答案:

答案 0 :(得分:0)

我发现了我的错误,模板是CIRCULAR的参数,而不是WINDROSE:

windrose(data.frame(dir = circular(pol.ex $ t,units =&#34; degrees&#34;,template =&#34; geographics&#34;),    mag = pol.ex $ r))#this working

谢谢。