请选择 进入手机版 | 继续访问电脑版
爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 5369|回复: 3

[作图] NCL画剖面图,如何把垂直方向差值为高度km

[复制链接]

新浪微博达人勋

发表于 2017-3-31 10:29:19 | 显示全部楼层 |阅读模式

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

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

x
刚学NCL,想用它做一个垂直剖面图,数据为WRFOUT数据。但是美好的事情一旦遇到了但是就不美好了,我垂直方向差值出现了问题,模式是35层,可我插值chu了100层。另外我想把垂直方向设为高度NCL,可以如何操作呢?希望大神指教!!!感激涕零脚本如下:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"  
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"   
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
;-------------------------------------------------------------------
begin
f = addfile("/nuist/scratch/Zl623/wrf31/WRFV3/test/em_real/wrfout_d04_2014-05-23_18:00:00.nc","r")
wks = gsn_open_wks("eps","weiwen")
times = wrf_user_getvar(f,"times",-1) ; get all times in the file
printVarSummary(times)
ntimes = dimsizes(times)            ; number of times in the file                 
; Get variables
theta=wrf_user_getvar(f,"theta",37)
printVarSummary(theta)
z=wrf_user_getvar(f,"z",37)
printVarSummary(z)
lon=wrf_user_getvar(f,"XLONG",0)
lat=wrf_user_getvar(f,"XLAT",0)
;-------------------------------chazhi---------------------------------------
  lat1 = 19.1
  lon1 = 108.2
  llres = True
  llres@ReturnInt = True   ; Return integer values
  loc1ij = wrf_user_ll_to_ij(f, lon1, lat1, llres)
  loc1ij = loc1ij-1        ; array pointers in NCL space
  loc1X = loc1ij(0)
  loc1Y = loc1ij(1)
delete(llres)
angle=  90
plane=(/loc1Y,loc1X/)
printVarSummary(plane)
opts=False
theta_plane=wrf_user_intrp3d(theta,z,"v",plane,angle,opts)
theta_plane!0="high"
;high@units="m"
theta_plane!1="lon"
;theta_plane&lon=lon
printVarSummary(theta_plane)
;print(theta_plane)
delete(opts)

;Set some basic resources
  res = True
  res@MainTitle = "REAL-TIME WRF"
  res@TimeLabel = times(37)
  res@Footer = False

  pltres = True
;options for theta
opts= res
opts@cnLinesOn=True
opts@cnLineThicknessF=0.5
;-----------------------huatu-----------------------------------
contour=wrf_contour(f,wks,theta_plane,opts)
plot = wrf_overlays(f,wks,contour,pltres)

end




搜狗截图17年03月31日1033_1.png
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-3-30 16:23:41 | 显示全部楼层
请问楼主问题解决了么?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2018-3-30 20:45:31 | 显示全部楼层
mffl1008 发表于 2018-3-30 16:23
请问楼主问题解决了么?

没有,现在在用Grads画
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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