- 积分
- 2817
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-9-28
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
求助,很多研究水汽输送文章里面都用了整层大气势函数和流函数,ncl中虽然有对应的函数,但是求出的是(t,z,y,x)也就是单个时次单个层次固定点的值,请问如何求整层大气中的势函数和流函数呢,如何积分?
PS:我之前认为把所有层次结果都加起来,以下是错误的程序,运行时还有错误提示,劳烦高手看下哪里错了,不胜感激
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
a=addfile("/home/Administrator/uwnd.2015.nc","r")
b=addfile("/home/Administrator/vwnd.2015.nc","r")
sf=new((/73,144/),float)
vp=new((/73,144/),float)
sfall=new((/17,73,144/),float);定义流函数势函数对应的三维数组,时次为304
vpall=new((/17,73,144/),float)
do z=0,16
u=a->uwnd(304,z,:,:)
v=b->vwnd(304,z,:,:)
;计算势函数,流函数
uv2sfvpf(u,v,sf,vp)
sfall(z,:,:)=sf(:,:) ;将所有层次流函数值放入sfall
vpall(z,:,:)=vp(:,:)
end do
;对所有层次求和
ssf=new((/73,144/),float)
vvp=new((/73,144/),float)
do z=0,16
ssf(:,:)=ssf(:,:)+sfall(z,:,:)
vvp(:,:)=vvp(:,:)+vpall(z,:,:)
end do
;画图
wks = gsn_open_wks("ps","sfs")
res = True ; plot mods desired
res@mpOutlineOn = True ; turn on map outline
res@tiMainString = "stream function" ; title
plot=gsn_csm_contour_map_ce(wks,ssf,res) ; create plot
; plot=gsn_csm_contour_map_ce(wks,,res) ; create plot
end
错误显示
0) check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn't contain one at all.
(0) A valid latitude coordinate array should have a 'units' attribute equal to one of the following values:
(0) 'degrees_north' 'degrees-north' 'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'
(0) check_for_lon_coord: Warning: Data either does not contain a valid longitude coordinate array or doesn't contain one at all.
(0) A valid longitude coordinate array should have a 'units' attribute equal to one of the following values:
(0) 'degrees_east' 'degrees-east' 'degree_east' 'degrees east' 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'
|
|