爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 29147|回复: 38

[源程序] 泰勒图的做法(Taylor Diagram)

[复制链接]

新浪微博达人勋

发表于 2015-9-6 14:57:08 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
本帖最后由 addison 于 2015-9-10 08:48 编辑

看到有人求泰勒图(Taylor diagram)用Grapher软件作图,分享自己写的代码,适合Grapher10/11
输入数据格式:
'file format: for example "xy2.dat"
'1st line: referenced point value (x0,0.0) in x axis, here x0 should be the std of referenced/observed value


'2nd line: std*cos(fai), std*sin(fai)   where std is one of the standard deviation of input model to compare with the referenced value, and cos(fai)==correlation coefficients, fai =acos(correlation_coefficient)


'3rd line: std*cos(fai), std*sin(fai)   another model result like 2nd line


'contents of xy2.dat as test0.7 0
1.0 0
0.95 0.2
1.2 0.3



运行程序需修改的4个参数:


' to run the program correctly, please modify below lines

File_path="G:\xy2.dat"  'x and y coordinate (Note: NOT radian and angle in Taylor (2001), x=r*cos(fai), y=r*sin(fai))

x_col=1  : y_col=2  'colonum to be used for plotR=1.5  'the maximum x and y axis value, R is the maximum std, and should be choice suitable by your self (e.g. a suitable value larger than maxi. std for easy read)

X0=0.7 'reference point at x axis (0<X0<R)==the 1st line value, this is used to mark reference point in the plot corretly.

axis_step=0.3 'axis increase step length, this value also the 1st raidan circle radius



运行方法:如果你装了Grapher,双击附件,并点击运行(类似play的一个小三角)



当然,运行完了,还需要进行手工美化(主要是线型、颜色等调整,很容易的事情了。这些本来可以在bas文件中设置,线型要自己定义好再用,请看bas程序相关内容自行修改,但颜色在grapher11中好像不起作用,不知是否是bug)。

Taylor Diagram

Taylor Diagram







Taylor.diagram.BAS

10.17 KB, 下载次数: 69, 下载积分: 金钱 -5

售价: 1 贡献  [记录]

评分

参与人数 1金钱 +15 贡献 +5 收起 理由
mofangbao + 15 + 5

查看全部评分

密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2015-9-7 08:38:30 | 显示全部楼层
xy2.dat是我给的例子的输入数据,自己作图要换成自己的数据文件。xy2.dat中,第一个点对应图中的referenced点,其他三点对应图中的三个黑圆点。

数据格式:
第1行: x和y坐标分别为参考点的std和0.0   (std_ref,0.0)
第2行: x和y坐标分别为其他model的std和与参考时间序列的相关系数的组合。这里x=std*cos(fai);cos(fai)==相关系数。 y=std*sin(fai)。  fai这个角度总会求吧。
第3行:与第2行类似,是另外model的对应数据
第n行: 第n-1个model对应值。

xy2.dat as test
0.7 0
1.0 0
0.95 0.2
1.2 0.3
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-9-7 08:17:38 | 显示全部楼层
楼主您好,感谢您的分享,对您辛苦的付出深表感谢,我昨天有个提问,想再问问您,文中所提的xy2.dat是个什么文件呢?该文件需要如何操作呢?谢谢!
密码修改失败请联系微信:mofangbao
回复 支持 1 反对 0

使用道具 举报

新浪微博达人勋

发表于 2015-9-6 15:37:25 | 显示全部楼层
主题不售贡献,楼主可以改成附件收费...
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-9-6 15:37:29 | 显示全部楼层
主题不售贡献,楼主可以改成附件收费...
密码修改失败请联系微信:mofangbao

新浪微博达人勋

0
早起挑战累计收入
发表于 2015-9-6 15:39:03 | 显示全部楼层
已修改为附件收费主题不收费
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-9-6 18:37:36 | 显示全部楼层
高手啊。学习了,谢谢分享。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-9-6 19:54:05 | 显示全部楼层
暂时用不到,收藏一下  谢谢分享
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-9-6 21:50:01 | 显示全部楼层
哇塞,牛人!
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

新浪微博达人勋

发表于 2015-9-6 21:52:38 | 显示全部楼层
呵呵 刚想下载 突然发现好贵哟
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-9-6 22:00:48 | 显示全部楼层
看了半天也没有看懂xy2.dat是个什么文件?该文件需要如何操作?
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表