爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 10496|回复: 19

[作图] fnl1×1格点资料画天气图

[复制链接]
发表于 2015-4-25 14:01:33 | 显示全部楼层 |阅读模式

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

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

x
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
fnl_file=addfile("/gpfshome/fupj/wrf/data/nc/fnl_20130615_18_00.grib2.nc","r")
u=fnl_file->UGRD_P0_L100_GLL0(13,89:144,59:139)
v=fnl_file->VGRD_P0_L100_GLL0(13,89:144,59:139)
temp=fnl_file->TMP_P0_L100_GLL0(13,89:144,59:139)
temp=temp-273.15
ght=fnl_file->HGT_P0_L100_GLL0(13,89:144,59:139)
wks=gsn_open_wks("x11","PressureLevel")


res                             = True                 ; plot mods desired
res@mpFillOn                  = False             ; turn off map fill
res@mpOutlineSpecifiers      = (/"Continents"/)
  res@mpDataSetName         = "Earth..4"   ; This database contains
                                           ; divisions for other countries.
  res@mpDataBaseVersion     = "MediumRes"  ; Medium resolution database
  res@mpMinLatF = 0.
  res@mpMaxLatF = 55.
  res@mpMinLonF = 60.
  res@mpMaxLonF = 140.

  res@mpGeophysicalLineThicknessF= 1.      ; double the thickness of geophysical boundaries
  res@mpNationalLineThicknessF= 1.         ; double the thickness of national boundaries
  delete(res@mpOutlineSpecifiers)          ; about to change size of attribute, must delete
  res@mpOutlineSpecifiers = (/"China:states","Philippines","India","Nepal","Bhutan","Bangladesh","Myanmar", \
                                    "Thailand","Cambodia","Vietnam","Taiwan"/)
;map = gsn_csm_map_ce(wks,res)

;temp
opts=True
  opts@ContourParameters      = (/5.0/) ; set the contour levels
  opts@tiMainString = "T/U @500hPa"            ; set the main title
  opts@cnLineColor="Red"
plot_temp=gsn_contour(wks,temp,opts)


;ght
opts_z = res
opts_z@cnLineColor = "Blue"
opts_z@gsnContourLineThicknessesScale = 3.0
plot_ght= gsn_contour(wks,ght,opts_z)

;wind vector
;  sres                      = True              ; set up a second resource list
;  sres@gsnDraw              = False             ; do not draw the plot
;  sres@gsnFrame             = False             ; do not advance the frame
;  sres@cnLevelSelectionMode = "ExplicitLevels"  ; use explicit levels
;  sres@cnLevels             = ispan(-5,35,5 )   ; set the contour levels
  plot_v = gsn_vector(wks,u,v,False)

plot=wrf_map_overlays(wks,(/plot_temp,plot_ght,plot_v/),res)
end


想画天气图,不得解。跪求大神帮忙改下程序。

密码修改失败请联系微信:mofangbao
发表于 2015-4-26 11:21:31 | 显示全部楼层
南宫蓝天 发表于 2015-4-26 09:36
求叠加函数,gsn_contour_map,gsn_csm_contour_map_overlay只找到这俩,用哪个?

看函数说明,根据需求选择。
两个contour,一个vector,用overlay。
密码修改失败请联系微信:mofangbao
回复 支持 1 反对 0

使用道具 举报

发表于 2015-4-25 14:11:41 | 显示全部楼层
谢谢~谢谢~
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

发表于 2015-4-25 14:46:46 | 显示全部楼层
提示 有什么问题?
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2015-4-25 14:48:10 | 显示全部楼层
兰北 发表于 2015-4-25 14:46
提示 有什么问题?

上面木有叠加到一张图上
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2015-4-25 14:48:28 | 显示全部楼层

这是半成品,要改
密码修改失败请联系微信:mofangbao
发表于 2015-4-25 18:09:45 | 显示全部楼层

看错了。。。我还以为是贡献程序的~
密码修改失败请联系微信:mofangbao
发表于 2015-4-25 21:37:14 | 显示全部楼层
fnl数据,却用的wrf的叠加函数!
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2015-4-26 09:36:53 | 显示全部楼层
longlivehj 发表于 2015-4-25 21:37
fnl数据,却用的wrf的叠加函数!

求叠加函数,gsn_contour_map,gsn_csm_contour_map_overlay只找到这俩,用哪个?
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2015-4-26 12:47:22 | 显示全部楼层
上面问题已解决
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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