file = filepath + filename
fileinfo = ncinfo(file)
ght = ncread(file, 'var7') %JRA55
size(hgt) %查看各维度大小,发现是lon,lat,plev,time
z500 = ght(:,:,2,:) %维度lon,lat,lev(1),time
z500 = permute(z500,[4,2,1,3]) %维度 time,lat,lon
z200 = permute(ght(:,:,1,:),[4,2,1,3])
[nyr,nlat,nlon] = size(z500)
x=reshape(z500,nyr*nlat*nlon,1)
y=reshape(z200,nyr*nlat*nlon,1)
plot(x,y,'.') %散点图 , mesh(x,y,z) & surf(x,y,z) 三维曲面,hold on : 一个图形界面同时多个plot组合
cftool %曲线拟合工具,print to figure 进行图形编辑