爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 4859|回复: 2

MeteoInfoLab脚本示例:计算K指数

[复制链接]

新浪微博达人勋

发表于 2016-1-28 14:43:22 | 显示全部楼层 |阅读模式

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

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

x
本帖最后由 MeteoInfo 于 2017-3-7 22:59 编辑

利用FNL数据计算K指数的例子,计算方法参考了此贴:http://bbs.06climate.com/forum.php?mod=viewthread&tid=1854

  1. #Add file
  2. f = addfile('D:/Temp/grib/fnl_20110416_00_00')
  3. #Calculate K index
  4. #850hPa
  5. T850 = f['Temperature_isobaric'][0,'85000.0','10:35','90:125'] - 273.16
  6. rh = f['Relative_humidity_isobaric'][0,'85000.0','10:35','90:125']
  7. Td850 = T850-((14.55+0.114*T850)*(1-0.01*rh) + pow((2.5+0.007*T850)*(1-0.01*rh),3) + (15.9+0.117*T850)*pow((1-0.01*rh),14))
  8. #700hPa
  9. T700 = f['Temperature_isobaric'][0,'70000.0','10:35','90:125'] - 273.16
  10. rh = f['Relative_humidity_isobaric'][0,'70000.0','10:35','90:125']
  11. Td700 = T700-((14.55+0.114*T700)*(1-0.01*rh) + pow((2.5+0.007*T700)*(1-0.01*rh),3) + (15.9+0.117*T700)*pow((1-0.01*rh),14))
  12. #500hPa
  13. T500 = f['Temperature_isobaric'][0,'50000.0','10:35','90:125'] - 273.16
  14. K = T850-T500+Td850-(T700-Td700)
  15. #Plot
  16. axesm()
  17. lworld = shaperead('D:/Temp/Map/country1.shp')
  18. geoshow(lworld, edgecolor='k')
  19. levs = arange(-40,36,2.5)
  20. layer = contourm(K, levs)
  21. clabel(layer)
  22. colorbar(layer)
  23. t = f.gettime(0)
  24. title('K index (' + t.strftime('%Y-%m-%d %H:00') + ')')


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

新浪微博达人勋

发表于 2016-8-23 20:50:14 | 显示全部楼层
很好的帖子,留下来了。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-4-28 11:17:33 | 显示全部楼层
感谢分享     
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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