- 积分
- 1831
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-5-6
- 最后登录
- 1970-1-1
|
NCL
系统平台: |
linux |
问题截图: |
|
问题概况: |
uv2vrdvg求得的涡度和wrf函数求得的涡度差别很大 |
我看过提问的智慧: |
看过 |
自己思考时长(天): |
2 |
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
我用wrf输出资料求涡度场,分别用了3个不同函数,发现uv2vrdvg和wrf_avo,wrf_pvo差别较大,不知道这是为什么,大家能帮忙看看吗?谢谢!(3幅图取的同一高度、时间)
下面附上脚本:
uv2vrdvg:
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/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
in = addfile("/home/zssapr/WRF3.5.1/20110710/data/wrf_data/wrfout_d01_2011-07-10_00:00:00","r") ; open netcdf file
U = in->U
ua = wrf_user_unstagger(U,U@stagger)
V = in->V
va = wrf_user_unstagger(V,V@stagger)
scale = 1.e05
vort = new ( dimsizes(ua), typeof(ua), ua@_FillValue )
dv = new ( dimsizes(ua), typeof(ua), ua@_FillValue )
; copy_VarCoords(ua, vort )
; copy_VarCoords(ua, dv )
vort@long_name = "vorticity"
vort@units = ua@units
dv@long_name = "divergence"
dv@units = ua@units
uv2vrdvg (ua,va,vort,dv) ; u,v ==> div and vort
DV = new ( dimsizes(ua), typeof(ua), ua@_FillValue )
VORT = new ( dimsizes(ua), typeof(ua), ua@_FillValue )
VORT@long_name = "vorticity"
VORT@units = vort@units
DV@long_name = "divergence"
DV@units = dv@units
DV = dv*scale
VORT =vort*scale
wks = gsn_open_wks("ps","vort4") ; specifies a ps plot
gsn_define_colormap(wks,"BlueWhiteOrangeRed") ; choose colormap
res = True ; plot mods desired
res@cnFillOn = True ; turn on color
res@gsnSpreadColors = True ; use full range of color map
res@lbLabelAutoStride = True ; nice label bar labels
res@cnLinesOn = True ; no contour lines
res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels
res@cnMinLaevelValF = -4 ; set min contour level
res@cnMaxLevelValF = 4 ; set max contour level
res@cnLevelSpacingF = 0.5 ; set contour spacing
printVarSummary(VORT)
plot = gsn_csm_contour(wks,VORT(20,15,:,:),res) ; create plot
end
wrf_avo:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
nc_file = addfile("/home/zssapr/WRF3.5.1/20110710/data/wrf_data/wrfout_d02_2011-07-10_00:00:00","r")
U = nc_file->U
V = nc_file->V
MSFU = nc_file->MAPFAC_U
MSFV = nc_file->MAPFAC_V
MSFM = nc_file->MAPFAC_M
COR = nc_file->F
DX = nc_file@DX
DY = nc_file@DY
wks = gsn_open_wks("ps","vortnew")
gsn_define_colormap(wks,"BlueWhiteOrangeRed")
avo = wrf_avo( U, V, MSFU, MSFV, MSFM, COR, DX, DY, 0)
res =True
res@cnFillOn =True
res@gsnSpreadColors = True ; use full range of color map
res@lbLabelAutoStride = True ; nice label bar labels
res@cnLinesOn = True ; no contour lines
plot = gsn_csm_contour(wks,avo(20,15,:,:),res)
end
wrf_pvo:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
nc_file = addfile("/home/zssapr/WRF3.5.1/20110710/data/wrf_data/wrfout_d02_2011-07-10_00:00:00","r")
U = nc_file->U
V = nc_file->V
THETA= nc_file->T
P = nc_file->P
PB = nc_file->PB
MSFU = nc_file->MAPFAC_U
MSFV = nc_file->MAPFAC_V
MSFM = nc_file->MAPFAC_M
COR = nc_file->F
DX = nc_file@DX
DY = nc_file@DY
THETA = THETA + 300. ; potential temperature in K.
P = P + PB ; full pressure in Pa.
pvo = wrf_pvo( U, V, THETA, P, MSFU, MSFV, MSFM, COR, DX, DY, 0)
wks = gsn_open_wks("ps","vortpvo")
gsn_define_colormap(wks,"BlueWhiteOrangeRed")
res =True
res@cnFillOn =True
res@gsnSpreadColors = True ; use full range of color map
res@lbLabelAutoStride = True ; nice label bar labels
res@cnLinesOn = True ; no contour lines
plot = gsn_csm_contour(wks,pvo(20,15,:,:),res)
end
|
|