- 积分
- 28
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2018-12-28
- 最后登录
- 1970-1-1
|
发表于 2020-5-6 09:32:23
|
显示全部楼层
function TempAdvection(T,u0,v0,tau,lev,lat,lon) ;计算温度平流
begin
ntau = dimsizes(tau)
nlon = dimsizes(lon)
nlat = dimsizes(lat)
nlev = dimsizes(lev)
Tadv = T
dlon = (lon(2)-lon(1))*0.0174533 ; convert to radians
dTdX = new((/ntau,nlev,nlat,nlon/), typeof(T), T@_FillValue)
do nl=0,nlat-1 ; loop over each latitude
dX = 6378388.*cos(0.0174533*lat(nl))*dlon ; constant at this latitude
dTdX(:,:,nl:nl,:) = center_finite_diff_n (T(:,:,nl:nl,:), dX ,False,0,3)
end do
dlat = (lat(2)-lat(1))*0.0174533 ; convert to radians
dTdY = new((/ntau,nlev,nlat,nlon/), typeof(T), T@_FillValue)
do ml=0,nlon-1
dY = 6378388.*dlat ; constant at this latitude
dTdY(:,:,:,ml:ml) = center_finite_diff_n(T(:,:,:,ml:ml),dY,False,0,2)
end do
Tadv = -(/ u0*dTdX + v0*dTdY /)
Tadv = (/ Tadv * 1e5 /)
return(Tadv)
end |
|