登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
各位大佬好,我想计算T-N波活动通量,但是画出来的图不是我想要的效果。因此想检验下我的ncl程序是不是有错。 对着公式看了好久,把气象家园的帖子翻遍了,心好累。
主要的疑问:1.流函数的扰动量 是用u v计算所得,还是用g*z/f算出来?
2.数据格式是38年 x 183天 x 73纬度 x 144经度。求 流函数相对于气候场的扰动,是用 流函数减去多年平均,还是先减去出每个月的气候态,再减去多年平均?我在找到的程序中 还有先对 天数做10天低通滤波?
begin
dir = "/***"
f1 = addfile(dir + "/data/ncep/17u200_0401_0930.nc","r")
f2 = addfile(dir + "/data/ncep/17v200_0401_0930.nc","r")
f5 = addfile(dir + "/data/ncep/17hgt200_0401_0930.nc","r")
u := f1 ->u (0:37,:,:,:) ;38年 x 183天 x 73纬度 x 经度
v := f2 ->v (0:37,:,:,:)
hgt = f5 ->hgt(0:37,:,:,:)
lat = hgt&lat
lon = hgt&lon
nlat = dimsizes(lat)
nlon = dimsizes(lon)
a = 6.37122e06 ; radius of the earth
PI = atan(1.0)*4.
phi = lat*PI/180.0 ; latitude in radians
lambda = lon*PI/180.0
omega = 7.2921e-5
ga=9.80665 ; Gravitational acceleration
coslat = conform(hgt,cos(lat*PI/180.),2) ; cosine f = 2*omega*sin(phi) ; 地转参数
f!0 = "lat"
f&lat = lat
f@_FillValue = u@_FillValue
do ilat = 0, nlat-1
if (abs(lat(ilat) ).lt. 10. ) then
f(ilat)= f@_FillValue
end if
end do
uave = conform(u,dim_avg_n_Wrap(u,0),(/1,2,3/))
vave = conform(u,dim_avg_n_Wrap(u,0),(/1,2,3/))
cumag = wind_speed(uave, vave) have = dim_avg_n_Wrap(hgt,0)
ha = hgt-conform(hgt,have,(/1,2,3/)) ;;
; QG steam function for anomaly
psia = ha*ga /conform(ha,f,2)
psia_x =center_finite_diff_n(psia,lambda,True,0,3)
psia_y =center_finite_diff_n(psia,phi,False,0,2)
psia_xx =center_finite_diff_n(psia_x,lambda,True,0,3)
psia_xy =center_finite_diff_n(psia_x,phi,False,0,2)
psia_yy =center_finite_diff_n(psia_y,phi,False,0,2)
xu = psia_x^2-psia*psia_xx
xv = psia_x*psia_y-psia*psia_xy
yv = psia_y^2-psia*psia_yy
level = 200
Fx = level/(2000.*cumag*a*a)*(uave/coslat*xu+vave*xv)
Fy = level/(2000.*cumag*a*a)*(uave*xv+vave*coslat*yv)
end
|