ERA5的数据,
有上届留下的代码
begin
f=addfile("D:/用户目录/下载/秋季/uvtz91011.nc","r")
u=short2flt(f->u(:,{200:400},{25:40},{74:104})) ;纬度在25-40
v=short2flt(f->v(:,{200:400},{25:40},{74:104})) ;经度在74-104
t=short2flt(f->t(:,{200:400},{25:40},{74:104}))
z=short2flt(f->z(:,{200:400},{25:40},{74:104}))
fout=addfile("C:/Users/Administrator/Desktop/maxqzs1.nc", "c")
lat=u&latitude
lon=u&longitude
nlat=dimsizes(lat)
nlon=dimsizes(lon)
g=9.80
theta1 = t
theta1=0
theta2 = t
theta2=0
theta3 = t
theta3=0
deltaz = t
deltaz=0
n2 = t
n2 =0
xia1 = t
xia1 =0
xia2 = t
xia2 =0
xia = t
xia =0
ri = t
ri =0
m=new(91,float)
do n=0,90
m(n)=1e10
end do
do l=0,90;天
do k=0,23;小时
do j=1,nlat-2
do i=1,nlon-2
t0=l*24+k
theta1(t0,{400},j,i)=t(t0,{400},j,i)*((1000./400.)^0.286)
theta2(t0,{300},j,i)=t(t0,{300},j,i)*((1000./300.)^0.286)
theta3(t0,{200},j,i)=t(t0,{200},j,i)*((1000./200.)^0.286)
deltaz(t0,{300},j,i)=(z(t0,{200},j,i)-z(t0,{400},j,i))/9.8
n2(t0,{300},j,i) =g/theta2(t0,{300},j,i)*(theta3(t0,{200},j,i)-theta1(t0,{400},j,i))/deltaz(t0,{300},j,i)
xia1(t0,{300},j,i) =((u(t0,{200},j,i)-u(t0,{400},j,i))/deltaz(t0,{300},j,i))^2
xia2(t0,{300},j,i) =((v(t0,{200},j,i)-v(t0,{400},j,i))/deltaz(t0,{300},j,i))^2
xia(t0,{300},j,i) =xia1(t0,{300},j,i)+xia2(t0,{300},j,i)
ri(t0,{300},j,i) =n2(t0,{300},j,i)/xia(t0,{300},j,i)
if ri(t0,{300},j,i) .lt. m(l) then
m(l)=ri(t0,{300},j,i)
end if
end do
end do
end do
end do
print(m)
fout->m1=m
end