- 积分
- 544
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2015-4-17
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
不是到什么原因,会出现空白的地方,位温和位涡都是没有缺失值的
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/contrib/time_axis_labels.ncl"
;;;;;load data
air=addfile("/home/fangj/datazhou/ncep2.5daily/air.2015.nc","r")
hgt=addfile("/home/fangj/datazhou/ncep2.5daily/hgt.2015.nc","r")
omega=addfile("/home/fangj/datazhou/ncep2.5daily/omega.2015.nc","r")
fileu=addfile("/home/fangj/datazhou/ncep2.5daily/uwnd.2015.nc","r")
filev=addfile("/home/fangj/datazhou/ncep2.5daily/vwnd.2015.nc","r")
airt=air->air;;;;;(time,level,lat,lon)
level=air->level
u=fileu->uwnd
v=filev->vwnd
;;;;;potential vorticity
lev = air->level ; hPa
lev = lev*100 ; convert units
lev@units = "Pa"
u = u(:,:,::-1,:) ; reorder to South -> North
u = v(:,:,::-1,:)
t = airt(:,:,::-1,:)
lat = t&lat
gridType = 0 ; gaussin grid
opt = 0
PV = pot_vort_isobaric(lev,u,v,t,lat, gridType, opt) ; Potential Vorticity
PV=PV*10^6
;;;;;;;potential temperature
ph=new(dimsizes(airt),float)
do i=0,dimsizes(level)-1
ph(:,i,:,:)=level(i)
end do
pt=airt*(1000/ph)^0.286
copy_VarMeta(airt, pt)
pt=pt(:,:,::-1,:)
pt@long_name = "potential temperature"
;;;;;;interpolate
lvl = ispan(330,300,10)*1. ;isentropicl potential temperature
lvl@units = pt@units
xlvl = int2p (pt(time|:,lat|:,lon|:,level|:),PV(time|:,lat|:,lon|:,level|:), lvl, 1)
xlvl!0 = "time" ; name dimensions
xlvl!1 = "lat"
xlvl!2 = "lon"
xlvl!3 = "level"
xlvl&time =PV&time
xlvl&lat =PV&lat
xlvl&lon =PV&lon
xlvl&level =lvl
;;;;;plot
res=True
res@mpMaxLatF=60
res@mpMinLatF =-30
res@mpMaxLonF =180
res@mpMinLonF =60
res@gsnAddCyclic =False
res@cnFillOn =True
timec=cd_calendar(xlvl&time, -2)
wks=gsn_open_wks("pdf", "isopv1")
plot=gsn_csm_contour_map(wks, xlvl(1,:,:,1), res) |
|