- 积分
- 2547
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2016-3-29
- 最后登录
- 1970-1-1
|
100金钱
file2 = addfile("/mnt/d/nclCX/NECP/MMEAN/sj/uwnd.mon.range.nc","r")
file3 = addfile("/mnt/d/nclCX/NECP/MMEAN/sj/vwnd.mon.range.nc","r")
Ps = asciiread("Ps.txt", -1, "float")
Ps = Ps*-1
;;----------------------------
nlat = dimsizes(U&lat)
nlon = dimsizes(U&lon)
U1 = U(8::12,:,:)
U2 = U(9::12,:,:)
U3 = U(10::12,:,:)
sumU = (U1+ U2 + U3)/3
copy_VarCoords(U1, sumU)
V1 = V(8::12,:,:)
V2 = V(9::12,:,:)
V3 = V(10::12,:,:)
sumV = (V1+ V2 + V3)/3
copy_VarCoords(V1, sumV)
;;-------------------------------------------------
div = uv2dvG_Wrap(sumU,sumV)
VP = ilapsG_Wrap(div, 0)
VP = (/VP/1e6/) ; arbitrary scale
VP@long_name = "velocity potential"
VP@units = "m/s"
;;--------------------------------------------
ud = new (dimsizes(sumU), typeof(sumU), sumU@_FillValue)
vd = new (dimsizes(sumV), typeof(sumV), sumV@_FillValue)
dv2uvg(div,ud,vd) ; div==> divergent wind components
copy_VarCoords(sumU, ud )
copy_VarCoords(sumV, vd )
ud@long_name = "Zonal Divergent Wind"
ud@units = sumU@units
vd@long_name = "Meridional Divergent Wind"
vd@units = sumV@units
;;-----------------------------------------------------------
;;Ps指数进行回归
r1 = regCoef_n(Ps,ud(0:59,:,:),0,0)
copy_VarCoords(sumU(0,:,:), r1)
r2 = regCoef_n(Ps,vd(0:59,:,:),0,0)
copy_VarCoords(sumU(0,:,:), r2)
r3 = regCoef_n(Ps,VP(0:59,:,:),0,0)
copy_VarCoords(sumU(0,:,:), r3)
tval = onedtond(r3@tval , dimsizes(r3))
df = onedtond(r3@nptxy, dimsizes(r3)) - 2
b = tval
b = 0.5
prob3 = betainc(df/(df+tval^2),df/2.0,b)
copy_VarCoords(sumU(0,:,:), prob3 )
;;-------------------------------------------------------最后画出来的速度势和风场对不上
负的速度势对应着辐合风,正的速度势对应着辐散风
|
|