爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 3488|回复: 0

[脚本编辑] 求助,關於任意兩點剖面報錯

[复制链接]

新浪微博达人勋

发表于 2017-2-21 11:43:10 | 显示全部楼层 |阅读模式

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

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

x
本帖最后由 ml11178 于 2017-2-21 14:24 编辑

版上各位大大好:

最近正處理WRF3.8的資料,想看某兩點的垂直剖面,參考版上大神的腳本後,自己改了一下,但是一直報錯

找不到原因...希望有大神能幫幫忙...小弟將感謝萬分ORZ
附上GRADS的gs
PS:以補充第2張圖,是我將d maskout(coll2gr(1,-u),-coll2gr(3,-u));maskout(coll2gr(2,-u),-coll2gr(3,-u)),-u都去掉之後,就可以產出第2張圖,

但還是很奇怪,不太理解那些黑洞是怎麼產生的...求大神ORZ

再次補充:第三張圖為我使用v2.0.a9版的grads畫出來的,看起來是很OK的,但是使用2.1.a3畫就會變成第二張圖那樣...我想使用2.1版...出圖比較漂亮阿...

  1. 'set grads off'
  2. 'set grid off'
  3. 'set zlog on'
  4. 'set csmooth on'
  5. *lon1 = 121.465597
  6. *lon2 = 121.524955
  7. *lat1 = 25.109584
  8. *lat2 = 24.959727
  9. lon1 = 121.410183
  10. lon2 = 121.524967
  11. lat1 = 25.200059
  12. lat2 = 24.959107
  13. 'define alfa=atan2('lat2-lat1','lon2-lon1')'
  14. 'set x 1'
  15. 'set y 1'
  16. 'set lev 1000 800'
  17. lon = lon1
  18. 'collect 1 free'
  19. 'collect 2 free'
  20. 'collect 3 free'
  21. 'collect 4 free'
  22. while (lon <= lon2)
  23.    lat = lat1+(lat2-lat1)*(lon-lon1)/(lon2-lon1)
  24.   'collect 1 gr2stn(u*cos(alfa)+v*sin(alfa),'lon','lat')'
  25.   'collect 2 gr2stn(w*4,'lon','lat')'
  26.   'collect 3 gr2stn(hgt,'lon','lat')'
  27.   'collect 4 gr2stn(qvapor*1000,'lon','lat')'
  28.   lon = lon + 0.1
  29. endwhile
  30. 'set lon 121.465597 121.524955'
  31. 'set clab on'
  32. 'set gxout shaded'
  33. 'set bargap 1'
  34. 'set clab off'
  35. 'set clevs 20'
  36. 'set ccols 0 3 0'
  37. ****'d coll2gr(3,-u)'

  38. 'set gxout shaded'
  39. *****'d coll2gr(4)'
  40. 'set rgb 16 255 0 0'
  41. 'set rgb 17 255 42 42'
  42. 'set rgb 18 255 85 85'
  43. 'set rgb 19 255 128 128'
  44. 'set rgb 20 255 170 170'
  45. 'set rgb 21 255 212 212'
  46. 'set rgb 22 234 212 255'
  47. 'set rgb 23 213 170 255'
  48. 'set rgb 24 191 128 255'
  49. 'set rgb 25 170 85 255'
  50. 'set rgb 26 149 42 255'
  51. 'set rgb 27 128 0 255'
  52. 'set ccols 16 17 18 19 20 21 22 23 24 25 26 27'
  53. 'set clevs 10 11 12 13 14 15 16 17 18 19 20'
  54. 'd maskout(coll2gr(4,-u),-coll2gr(3,-u))'
  55. 'cbarn.gs 0.6 1 10.65 5.75'

  56. 'set gxout stream'
  57. 'set strmden 5'
  58. 'set cthick 5'
  59. 'set ccolor 1'
  60. 'set arrscl 0.15 5'
  61. 'set clab on'
  62. *'d coll2gr(1);coll2gr(3);coll2gr(2);coll2gr(3)'
  63. 'd maskout(coll2gr(1,-u),-coll2gr(3,-u));maskout(coll2gr(2,-u),-coll2gr(3,-u))'
  64. *'d maskout(coll2gr(1,-u),-coll2gr(3,-u));maskout(coll2gr(2,-u),-coll2gr(3,-u));coll2gr(1,-u);coll2gr(2,-u)'
  65. *'d maskout(coll2gr(1,-u),-coll2gr(3,-u))'
  66. 'set font 0'
  67. 'draw ylab Pressure(hPa)'
  68. 'draw xlab SZ->HT      Shaded:Qvapor(g/kg)                     (m/s)'
复制代码





報錯圖

報錯圖
未命名2.png
TsWRF38-2012081204Verticle.png
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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