- 积分
- 28
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2017-11-2
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 long5269123 于 2017-11-16 21:30 编辑
http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/wrf_Squall_2d_x.htm
这是WRF官网关于NCL的例子
我将官网脚本中我不需要的部分删除了,已成功运行。
; Example script to produce standard plots for a WRF squall run
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
;load "./WRFUserARW.ncl"
begin
;
; The WRF ARW input file.
; This needs to have a ".nc" appended, so just do it.
a = addfile("/home/long/WRFV3/run/wrfout_d02_2006-08-16_12:00:00","r")
; We generate plots, but what kind do we prefer?
; type = "x11"
; type = "pdf"
type = "ps"
; type = "ncgm"
wks = gsn_open_wks(type,"plt_Squall_2d_x")
gsn_define_colormap(wks,"WhBlGrYeRe")
; Set some Basic Plot options
res = True
res@MainTitle = "WRF squall2D_x"
res@InitTime = False
res@Footer = False
pltres = True
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; What times and how many time steps are in the data set?
times = wrf_user_list_times(a) ; get times in the file
ntimes = dimsizes(times) ; number of times in the file
; The specific plane we want to plot data on
plane = (/ 60., 45./) ; (x,y) point for vertical plane
angle = 90.0
pii = 3.14159
aspect_ratio = .7
; This is the big loop over all of the time periods to process.
do it = 1,ntimes-1
time = it
res@TimeLabel = times(it)
res@AspectRatio = aspect_ratio
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; First get the variables we will need
qc = wrf_user_getvar(a,"QCLOUD",time) ; cloud field
qc = qc*1000. ; convert to g/kg
z = wrf_user_getvar(a, "z",time) ; grid point height
qc_plane = wrf_user_intrp3d(qc,z,"v",plane,angle,False)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; QCLOUD
opts_qc = res
opts_qc@FieldTitle = qc@description
opts_qc@UnitLabel = "g/kg"
opts_qc@cnFillOn = True
opts_qc@gsnSpreadColorEnd = -10
opts_qc@PlotOrientation = qc_plane@Orientation
contour_qc = wrf_contour(a,wks,qc_plane,opts_qc)
plot = wrf_overlays(a,wks,(/contour_qc/),pltres)
; ************************************************************
end do ; end of the time loop
end
请问:
1.纵坐标的含义是什么?或者说这段代码的含义是什么
2.我要怎么把纵坐标转为气压或者高度?
谢谢各位大神指点迷津,折腾一天了
|
|