自学气象人 发表于 2024-3-8 20:31:40

python中纬向平均、经向平均、水平流场、水汽柱浓度、坐标刻度朝向、label角标示例


一次课程作业画图的code记录。
import pandas as pd
import numpy as np
import xarray as xr
from wrf import to_np,interpz3d,destagger
import glob
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
import cartopy.feature as cfeature
from cartopy.mpl.ticker import LongitudeFormatter, LatitudeFormatter
import cmaps
import warnings

warnings.filterwarnings('ignore')file_names = glob.glob('./wrfout_d01_*')
file_names = np.sort(file_names)
file_names = file_names[:3]
file_names
计算温度相关
#计算TSK的相关数据
TSK_mean_space = []
TSK_mean_time = []
TSK_mean_lat = []
TSK_mean_lon = []
for file in file_names:
    print(file)
    data = xr.open_dataset(file)
    TSK_mean_space_one = np.mean(data['TSK'],axis=0)
    TSK_mean_time_one = (data['TSK'].mean(dim=['south_north','west_east'])).values
    TSK_mean_lat_one = np.mean(data['TSK'],axis=2)
    TSK_mean_lon_one = np.mean(data['TSK'],axis=1)
    TSK_mean_space.append(TSK_mean_space_one)
    TSK_mean_time.append(TSK_mean_time_one)
    TSK_mean_lat.append(TSK_mean_lat_one)
    TSK_mean_lon.append(TSK_mean_lon_one)#经向平均
TSK_mean_lon_concat = xr.concat(,TSK_mean_lon,TSK_mean_lon],'Time')

fig,ax=plt.subplots(1,1,figsize=(2,1),dpi=400)

ax.tick_params(color = 'gray',direction='in',length=1,labelsize=3)

c = ax.contourf(data['XLONG'],np.arange(0,72,1),TSK_mean_lon_concat,levels=np.arange(260,310,2),cmap='rainbow',extend='both')
ax.set_title('Meridional Average TSK',fontdict={'size':4})
ax.set_ylabel("Simulation hours",fontdict={'size':3})
ax.set_xlabel("lon",fontdict={'size':3})
cb = plt.colorbar(c,shrink=0.9)
cb.set_label('TSK ',fontdict={'size':3})
cb.set_ticks()
cb.ax.tick_params(direction="out",length=1,labelsize=3)
plt.savefig('TSK mean lon.png')
plt.show()


#纬向平均
TSK_mean_lat_concat = xr.concat(,TSK_mean_lat,TSK_mean_lat],'Time')

fig,ax=plt.subplots(1,1,figsize=(2,1),dpi=400)

ax.tick_params(color = 'gray',direction='in',length=1,labelsize=3)

c = ax.contourf(np.arange(0,72,1),data['XLAT'][:,0],TSK_mean_lat_concat.values.T,levels=np.arange(260,310,2),cmap='rainbow',extend='both')
ax.set_title('Zonal Average TSK',fontdict={'size':4})
ax.set_xlabel("Simulation hours",fontdict={'size':3})
ax.set_ylabel("Lat",fontdict={'size':3})
cb = plt.colorbar(c,shrink=0.9)
cb.set_label('TSK ',fontdict={'size':3})
cb.set_ticks()
cb.ax.tick_params(direction="out",length=1,labelsize=3)
plt.savefig('TSK mean lat.png')
plt.show()


#全球平均温度时间折线
fig,ax = plt.subplots(1,1,figsize=(4,2),dpi=200)

time = np.arange(0,72,1)
ax.plot(time, np.array(TSK_mean_time).flatten(), label="TSK_mean_global", color="blue",linestyle="-.",linewidth=0.7)
ax.set_xticks()
ax.set_xlabel("Simulation hours",fontdict={'size':5})
ax.set_ylabel("TSK ",fontdict={'size':5})
ax.set_title('Average TSK',fontdict={'size':5})
ax.tick_params(color = 'gray',length=1,labelsize=5)
plt.savefig('time TSK mean global.png')
plt.show()

#ax.legend()


#画空间分布图
fig,ax=plt.subplots(1,1,figsize=(4,4),dpi=400,subplot_kw={'projection': ccrs.PlateCarree()})


lon_formatter = LongitudeFormatter(zero_direction_label=False)
lat_formatter = LatitudeFormatter()
ax.xaxis.set_major_formatter(lon_formatter)
ax.yaxis.set_major_formatter(lat_formatter)
ax.set_extent([-180,180,-20,75],crs = ccrs.PlateCarree())
ax.set_xticks(np.arange(-180,181,30), crs=ccrs.PlateCarree())
ax.set_yticks(np.arange(-20,76,15), crs=ccrs.PlateCarree())
ax.tick_params(color = 'gray',direction='in',length=1,labelsize=3)

c = ax.contourf(data['XLONG'],data['XLAT'],(TSK_mean_space+TSK_mean_space+TSK_mean_space)/3.0,levels=np.arange(240,320,2),cmap='rainbow',transform=ccrs.PlateCarree(),extend='both')

ax.coastlines('50m', color='k', lw=0.3)
ax.set_title('The Distribution of Average TSK',fontdict={'size':5})
cb = plt.colorbar(c,shrink=0.25)
cb.set_label('TSK ',fontdict={'size':5})
cb.set_ticks()
cb.ax.tick_params(direction="out",length=1,labelsize=5)
plt.savefig('space TSK mean.png')
plt.show()


计算降水相关
#计算rain的相关数据
data03= xr.open_dataset(file_names)
RAIN_mean_space = (data03['RAINC'][-1] + data03['RAINNC'][-1])/(24*3.0) #unit:mm/h

QFX_mean_space = []
for file in file_names:
    print(file)
    data = xr.open_dataset(file)
    QFX_mean_space_one = np.mean(data['QFX'],axis=0)
    QFX_mean_space.append(QFX_mean_space_one)#画降水空间分布图fig,ax=plt.subplots(1,1,figsize=(4,4),dpi=400,subplot_kw={'projection': ccrs.PlateCarree()})


lon_formatter = LongitudeFormatter(zero_direction_label=False)
lat_formatter = LatitudeFormatter()
ax.xaxis.set_major_formatter(lon_formatter)
ax.yaxis.set_major_formatter(lat_formatter)
ax.set_extent([-180,180,-20,75],crs = ccrs.PlateCarree())
ax.set_xticks(np.arange(-180,181,30), crs=ccrs.PlateCarree())
ax.set_yticks(np.arange(-20,76,15), crs=ccrs.PlateCarree())
ax.tick_params(color = 'gray',direction='in',length=1,labelsize=3)

c = ax.contourf(data['XLONG'],data['XLAT'],RAIN_mean_space,levels=np.arange(0,1.5,0.02),cmap='rainbow',transform=ccrs.PlateCarree(),extend='both')

ax.coastlines('50m', color='k', lw=0.3)
ax.set_title('The Distribution of Average Rain',fontdict={'size':5})
cb = plt.colorbar(c,shrink=0.25)
cb.set_label('',fontdict={'size':5})
cb.set_ticks()
cb.ax.tick_params(direction="out",length=1,labelsize=5)
plt.savefig('space RAIN mean.png')
plt.show()



#画蒸发空间分布图

fig,ax=plt.subplots(1,1,figsize=(4,4),dpi=400,subplot_kw={'projection': ccrs.PlateCarree()})


lon_formatter = LongitudeFormatter(zero_direction_label=False)
lat_formatter = LatitudeFormatter()
ax.xaxis.set_major_formatter(lon_formatter)
ax.yaxis.set_major_formatter(lat_formatter)
ax.set_extent([-180,180,-20,75],crs = ccrs.PlateCarree())
ax.set_xticks(np.arange(-180,181,30), crs=ccrs.PlateCarree())
ax.set_yticks(np.arange(-20,76,15), crs=ccrs.PlateCarree())
ax.tick_params(color = 'gray',direction='in',length=1,labelsize=3)

c = ax.contourf(data['XLONG'],data['XLAT'],10000*(QFX_mean_space+QFX_mean_space+QFX_mean_space)/3.0,levels=np.arange(0,1.7,0.05),cmap='rainbow',transform=ccrs.PlateCarree(),extend='both')

ax.coastlines('50m', color='k', lw=0.3)
ax.set_title('The Distribution of Average QFX',fontdict={'size':5})
cb = plt.colorbar(c,shrink=0.25)
cb.set_label('',fontdict={'size':5})
cb.set_ticks()
cb.ax.tick_params(direction="out",length=1,labelsize=5)
plt.savefig('space QFX mean.png')
plt.show()


TOA 辐射
#计算TOA的相关数据
TOA_mean_space = []
TOA_mean_lat = []
TOA_mean_lon = []
for file in file_names:
    print(file)
    data = xr.open_dataset(file)
    val = data['SWDNT'] - data['SWUPT'] + data['LWDNT'] - data['LWUPT']
    TOA_mean_space_one = np.mean(val,axis=0)
    TOA_mean_lat_one = np.mean(val,axis=2)
    TOA_mean_lon_one = np.mean(val,axis=1)
    TOA_mean_space.append(TOA_mean_space_one)
    TOA_mean_lat.append(TOA_mean_lat_one)
    TOA_mean_lon.append(TOA_mean_lon_one)#画空间分布图
fig,ax=plt.subplots(1,1,figsize=(4,4),dpi=400,subplot_kw={'projection': ccrs.PlateCarree()})


lon_formatter = LongitudeFormatter(zero_direction_label=False)
lat_formatter = LatitudeFormatter()
ax.xaxis.set_major_formatter(lon_formatter)
ax.yaxis.set_major_formatter(lat_formatter)
ax.set_extent([-180,180,-20,75],crs = ccrs.PlateCarree())
ax.set_xticks(np.arange(-180,181,30), crs=ccrs.PlateCarree())
ax.set_yticks(np.arange(-20,76,15), crs=ccrs.PlateCarree())
ax.tick_params(color = 'gray',direction='in',length=1,labelsize=3)

c = ax.contourf(data['XLONG'],data['XLAT'],(TOA_mean_space+TOA_mean_space+TOA_mean_space)/3.0,levels=np.arange(-80,195,5),cmap='rainbow',transform=ccrs.PlateCarree(),extend='both')

ax.coastlines('50m', color='k', lw=0.3)
ax.set_title('The Distribution of Average TOA',fontdict={'size':5})
cb = plt.colorbar(c,shrink=0.25)
cb.set_label('TOA ',fontdict={'size':5})
cb.set_ticks([-50,0,50,100,150])
cb.ax.tick_params(direction="out",length=1,labelsize=5)
plt.savefig('space TOA mean.png')
plt.show()


#TOA经向平均
TOA_mean_lon_concat = xr.concat(,TOA_mean_lon,TOA_mean_lon],'Time')
TOA_mean_lon_concat = TOA_mean_lon_concat.mean('Time')

fig,ax = plt.subplots(1,1,figsize=(4,2),dpi=200)

time = np.arange(0,72,1)
ax.plot(data['XLONG'], TOA_mean_lon_concat, label="TOA_mean_lon", color="blue",linestyle="-.",linewidth=0.7)
#ax.set_xticks([-180,-120,24,36,48,60,72])
ax.set_xlabel("longitude",fontdict={'size':5})
ax.set_ylabel("TOA ",fontdict={'size':5})
ax.set_title('Meridional Average TOA',fontdict={'size':5})
ax.tick_params(color = 'gray',length=1,labelsize=5)
plt.savefig('TOA mean lon.png')
plt.show()

#ax.legend()


#TOA纬向平均
TOA_mean_lat_concat = xr.concat(,TOA_mean_lat,TOA_mean_lat],'Time')
TOA_mean_lat_concat = TOA_mean_lat_concat.mean('Time')

fig,ax = plt.subplots(1,1,figsize=(4,2),dpi=200)

time = np.arange(0,72,1)
ax.plot(data['XLAT'][:,0], TOA_mean_lat_concat, label="TOA_mean_lat", color="blue",linestyle="-.",linewidth=0.7)
#ax.set_xticks([-180,-120,24,36,48,60,72])
ax.set_xlabel("latitude",fontdict={'size':5})
ax.set_ylabel("TOA ",fontdict={'size':5})
ax.set_title('Zonal Average TOA',fontdict={'size':5})
ax.tick_params(color = 'gray',length=1,labelsize=5)
plt.savefig('TOA mean lat.png')
plt.show()

#ax.legend()


#计算TOA长波的相关数据
TOA_LW_mean_space = []
TOA_LW_mean_lat = []
TOA_LW_mean_lon = []
for file in file_names:
    print(file)
    data = xr.open_dataset(file)
    val = data['LWDNT'] - data['LWUPT']
    TOA_LW_mean_space_one = np.mean(val,axis=0)
    TOA_LW_mean_lat_one = np.mean(val,axis=2)
    TOA_LW_mean_lon_one = np.mean(val,axis=1)
    TOA_LW_mean_space.append(TOA_LW_mean_space_one)
    TOA_LW_mean_lat.append(TOA_LW_mean_lat_one)
    TOA_LW_mean_lon.append(TOA_LW_mean_lon_one)
   
#画空间分布图
fig,ax=plt.subplots(1,1,figsize=(4,4),dpi=400,subplot_kw={'projection': ccrs.PlateCarree()})


lon_formatter = LongitudeFormatter(zero_direction_label=False)
lat_formatter = LatitudeFormatter()
ax.xaxis.set_major_formatter(lon_formatter)
ax.yaxis.set_major_formatter(lat_formatter)
ax.set_extent([-180,180,-20,75],crs = ccrs.PlateCarree())
ax.set_xticks(np.arange(-180,181,30), crs=ccrs.PlateCarree())
ax.set_yticks(np.arange(-20,76,15), crs=ccrs.PlateCarree())
ax.tick_params(color = 'gray',direction='in',length=1,labelsize=3)

c = ax.contourf(data['XLONG'],data['XLAT'],(TOA_LW_mean_space+TOA_LW_mean_space+TOA_LW_mean_space)/3.0,levels=np.arange(-300,-90,10),cmap='rainbow',transform=ccrs.PlateCarree(),extend='both')

ax.coastlines('50m', color='k', lw=0.3)
ax.set_title('The Distribution of Average TOA_LW',fontdict={'size':5})
cb = plt.colorbar(c,shrink=0.25)
cb.set_label('TOA ',fontdict={'size':5})
cb.set_ticks([-300,-250,-200,-150,-100])
cb.ax.tick_params(direction="out",length=1,labelsize=5)
plt.savefig('space TOA_LW mean.png')
plt.show()


#TOA经向平均
TOA_LW_mean_lon_concat = xr.concat(,TOA_LW_mean_lon,TOA_LW_mean_lon],'Time')
TOA_LW_mean_lon_concat = TOA_LW_mean_lon_concat.mean('Time')

fig,ax = plt.subplots(1,1,figsize=(4,2),dpi=200)

time = np.arange(0,72,1)
ax.plot(data['XLONG'], TOA_LW_mean_lon_concat, label="TOA_LW_mean_lon", color="blue",linestyle="-.",linewidth=0.7)
#ax.set_xticks([-180,-120,24,36,48,60,72])
ax.set_xlabel("longitude",fontdict={'size':5})
ax.set_ylabel("TOA ",fontdict={'size':5})
ax.set_title('Meridional Average TOA_LW',fontdict={'size':5})
ax.tick_params(color = 'gray',length=1,labelsize=5)
plt.savefig('TOA_LW mean lon.png')
plt.show()

#ax.legend()

#TOA纬向平均
TOA_LW_mean_lat_concat = xr.concat(,TOA_LW_mean_lat,TOA_LW_mean_lat],'Time')
TOA_LW_mean_lat_concat = TOA_LW_mean_lat_concat.mean('Time')

fig,ax = plt.subplots(1,1,figsize=(4,2),dpi=200)

time = np.arange(0,72,1)
ax.plot(data['XLAT'][:,0], TOA_LW_mean_lat_concat, label="TOA_LW_mean_lat", color="blue",linestyle="-.",linewidth=0.7)
#ax.set_xticks([-180,-120,24,36,48,60,72])
ax.set_xlabel("latitude",fontdict={'size':5})
ax.set_ylabel("TOA ",fontdict={'size':5})
ax.set_title('Zonal Average TOA_LW',fontdict={'size':5})
ax.tick_params(color = 'gray',length=1,labelsize=5)
plt.savefig('TOA_LW mean lat.png')
plt.show()

#ax.legend()






#计算TOA长波的相关数据
TOA_SW_mean_space = []
TOA_SW_mean_lat = []
TOA_SW_mean_lon = []
for file in file_names:
    print(file)
    data = xr.open_dataset(file)
    val = data['SWDNT'] - data['SWUPT']
    TOA_SW_mean_space_one = np.mean(val,axis=0)
    TOA_SW_mean_lat_one = np.mean(val,axis=2)
    TOA_SW_mean_lon_one = np.mean(val,axis=1)
    TOA_SW_mean_space.append(TOA_SW_mean_space_one)
    TOA_SW_mean_lat.append(TOA_SW_mean_lat_one)
    TOA_SW_mean_lon.append(TOA_SW_mean_lon_one)
   
#画空间分布图
fig,ax=plt.subplots(1,1,figsize=(4,4),dpi=400,subplot_kw={'projection': ccrs.PlateCarree()})


lon_formatter = LongitudeFormatter(zero_direction_label=False)
lat_formatter = LatitudeFormatter()
ax.xaxis.set_major_formatter(lon_formatter)
ax.yaxis.set_major_formatter(lat_formatter)
ax.set_extent([-180,180,-20,75],crs = ccrs.PlateCarree())
ax.set_xticks(np.arange(-180,181,30), crs=ccrs.PlateCarree())
ax.set_yticks(np.arange(-20,76,15), crs=ccrs.PlateCarree())
ax.tick_params(color = 'gray',direction='in',length=1,labelsize=3)

c = ax.contourf(data['XLONG'],data['XLAT'],(TOA_SW_mean_space+TOA_SW_mean_space+TOA_SW_mean_space)/3.0,levels=np.arange(100,400,20),cmap='rainbow',transform=ccrs.PlateCarree(),extend='both')

ax.coastlines('50m', color='k', lw=0.3)
ax.set_title('The Distribution of Average TOA_SW',fontdict={'size':5})
cb = plt.colorbar(c,shrink=0.25)
cb.set_label('TOA ',fontdict={'size':5})
cb.set_ticks()
cb.ax.tick_params(direction="out",length=1,labelsize=5)
plt.savefig('space TOA_SW mean.png')
plt.show()


#TOA经向平均
TOA_SW_mean_lon_concat = xr.concat(,TOA_SW_mean_lon,TOA_SW_mean_lon],'Time')
TOA_SW_mean_lon_concat = TOA_SW_mean_lon_concat.mean('Time')

fig,ax = plt.subplots(1,1,figsize=(4,2),dpi=200)

time = np.arange(0,72,1)
ax.plot(data['XLONG'], TOA_SW_mean_lon_concat, label="TOA_SW_mean_lon", color="blue",linestyle="-.",linewidth=0.7)
#ax.set_xticks([-180,-120,24,36,48,60,72])
ax.set_xlabel("longitude",fontdict={'size':5})
ax.set_ylabel("TOA ",fontdict={'size':5})
ax.set_title('Meridional Average TOA_SW',fontdict={'size':5})
ax.tick_params(color = 'gray',length=1,labelsize=5)
plt.savefig('TOA_SW mean lon.png')
plt.show()

#ax.legend()

#TOA纬向平均
TOA_SW_mean_lat_concat = xr.concat(,TOA_SW_mean_lat,TOA_SW_mean_lat],'Time')
TOA_SW_mean_lat_concat = TOA_SW_mean_lat_concat.mean('Time')

fig,ax = plt.subplots(1,1,figsize=(4,2),dpi=200)

time = np.arange(0,72,1)
ax.plot(data['XLAT'][:,0], TOA_SW_mean_lat_concat, label="TOA_SW_mean_lat", color="blue",linestyle="-.",linewidth=0.7)
#ax.set_xticks([-180,-120,24,36,48,60,72])
ax.set_xlabel("latitude",fontdict={'size':5})
ax.set_ylabel("TOA ",fontdict={'size':5})
ax.set_title('Zonal Average TOA_SW',fontdict={'size':5})
ax.tick_params(color = 'gray',length=1,labelsize=5)
plt.savefig('TOA_SW mean lat.png')
plt.show()

#ax.legend()






水平流场
#风800hpq空间分布图
z_list=
result_U=[]
result_V=[]
for file in file_names:
    print(file)
    ds = xr.open_dataset(file)
    U = destagger(ds['U'],3,meta=True)
    V = destagger(ds['V'],2,meta=True)
    P = ds['PB']+ds['P']
    U_inter = interpz3d(U,P,np.array(z_list))
    V_inter = interpz3d(V,P,np.array(z_list))
    result_U.append(U_inter)
    result_V.append(V_inter)
   

#画流场
fig,ax=plt.subplots(1,1,figsize=(4,4),dpi=200,subplot_kw={'projection': ccrs.PlateCarree(central_longitude=180)})

lon_formatter = LongitudeFormatter(zero_direction_label=False)
lat_formatter = LatitudeFormatter()
ax.xaxis.set_major_formatter(lon_formatter)
ax.yaxis.set_major_formatter(lat_formatter)
ax.set_extent([-180,180,-20,75],crs = ccrs.PlateCarree())
ax.set_xticks(np.arange(-180,181,30), crs=ccrs.PlateCarree())
ax.set_yticks(np.arange(-20,76,15), crs=ccrs.PlateCarree())

ax.tick_params(color = 'gray',direction='in',labelsize=5,length=0.9)

ax.streamplot(data['XLONG'].values,data['XLAT'].values,result_U[-1][-1,0,:,:].values ,(xr.concat(result_V,'Time').mean('Time')).values, transform=ccrs.PlateCarree(),linewidth=0.7,arrowsize=0.5,density=1)

ax.coastlines('50m', color='k', lw=0.15)

ax.set_title('Wind (800hpa)',fontdict={'size':10})
plt.savefig('Wind (800hpa).png')
plt.show()



水汽
1.按照此公式计算



#计算水汽柱浓度

result=[]
for file in file_names:
    #读取数据
    ds = xr.open_dataset(file)
    #提取计算水汽柱浓度的变量
    P = ds['PH']+ds['PHB']
    gmp=P/9.81
    z = gmp[:,1:31,:,:]-gmp[:,0:30,:,:]
    z = z.rename({"bottom_top_stag": "bottom_top"})
    #计算水汽柱浓度
    q_sumone = ((1.0/ds['ALT'])*ds['QVAPOR']*z).sum(axis=1)#unit:kg/m2
    result.append(q_sumone)
   
q_all = xr.concat(result,dim='Time')
q_mean = q_all.mean(axis=0)#水汽柱浓度空间分布图
fig,ax=plt.subplots(1,1,figsize=(4,4),dpi=400,subplot_kw={'projection': ccrs.PlateCarree()})


lon_formatter = LongitudeFormatter(zero_direction_label=False)
lat_formatter = LatitudeFormatter()
ax.xaxis.set_major_formatter(lon_formatter)
ax.yaxis.set_major_formatter(lat_formatter)
ax.set_extent([-180,180,-20,75],crs = ccrs.PlateCarree())
ax.set_xticks(np.arange(-180,181,30), crs=ccrs.PlateCarree())
ax.set_yticks(np.arange(-20,76,15), crs=ccrs.PlateCarree())
ax.tick_params(color = 'gray',direction='in',length=1,labelsize=3)

c = ax.contourf(data['XLONG'],data['XLAT'],q_mean,levels=np.arange(0,65,2),cmap='rainbow',transform=ccrs.PlateCarree(),extend='both')

ax.coastlines('50m', color='k', lw=0.3)
ax.set_title('Qvapor Column Concentration',fontdict={'size':5})
cb = plt.colorbar(c,shrink=0.25)
cb.set_label('',fontdict={'size':5})
cb.ax.tick_params(direction="out",length=1,labelsize=5)
cb.set_ticks()
plt.savefig('qvapor column concentration.png')
plt.show()


#水汽800hpq空间分布图
z_list=
result_q=[]
for file in file_names:
    print(file)
    ds = xr.open_dataset(file)
    qvapor = ds['QVAPOR']
    P = ds['PB']+ds['P']
    qvapor_800 = interpz3d(qvapor,P,np.array(z_list))
    result_q.append(qvapor_800)
   

fig,ax=plt.subplots(1,1,figsize=(4,4),dpi=400,subplot_kw={'projection': ccrs.PlateCarree()})


lon_formatter = LongitudeFormatter(zero_direction_label=False)
lat_formatter = LatitudeFormatter()
ax.xaxis.set_major_formatter(lon_formatter)
ax.yaxis.set_major_formatter(lat_formatter)
ax.set_extent([-180,180,-20,75],crs = ccrs.PlateCarree())
ax.set_xticks(np.arange(-180,181,30), crs=ccrs.PlateCarree())
ax.set_yticks(np.arange(-20,76,15), crs=ccrs.PlateCarree())
ax.tick_params(color = 'gray',direction='in',length=1,labelsize=3)

c = ax.contourf(data['XLONG'],data['XLAT'],1.0e6*(xr.concat(result_q,'Time').mean('Time')),levels=np.arange(1.5,4,0.1),cmap='rainbow',transform=ccrs.PlateCarree(),extend='both')

ax.coastlines('50m', color='k', lw=0.3)
ax.set_title('The Distribution of Avarage Qvapor (800 hpa)',fontdict={'size':5})
cb = plt.colorbar(c,shrink=0.25)
cb.set_label('',fontdict={'size':5})
cb.ax.tick_params(direction="out",length=1,labelsize=5)
cb.set_ticks()
plt.savefig('qvapor 800 hpa')
plt.show()


2.手动计算水汽柱浓度的另外一种公式:




'''
result=[]
for file in file_names:
    #读取数据
    ds = xr.open_dataset(file)
    #提取计算水汽柱浓度的变量
    P = ds['P']+ds['PB']
    g = 9.81
    P_top = (ds['P_TOP'].values)*np.ones((1,90,180))
    P_TOP = xr.DataArray(P_top, ds['PSFC'].coords,ds['PSFC'].dims)
    P = (xr.concat(.rename({"Time": "bottom_top"}),((P+P)/2.0),P_TOP.rename({"Time": "bottom_top"})],'bottom_top'))
    P = P -P
    #计算水汽柱浓度
    q_sumone = ((ds['QVAPOR']/g)*P).sum(axis=0)#unit:kg/m2
    result.append(q_sumone)

q_all = xr.concat(result,dim='Time')
q_mean = q_all.mean(axis=0)
'''

<div></div>



文章来源于微信公众号:自学气象人



FrankJScott 发表于 2024-8-29 00:09:50

For the man inquiring about rtp slot pragmatic mlm ini, info rtp slot pragmatic hari ini live, win88 rtp live, rtp jam gacor hari ini, live slot pg soft hari ini, rtp slot pragmatic play malam ini, rtp live ollo4d hari ini, rtp live slot 777, rtp live bmw4d, main slot jam gacor,I highly suggest this my latest blog post about ASIAN2BET tips or rtp live indowin88, rtp hepi8, rtp live tuna55, rtp live slot pg soft, rtp slot pp hari ini, slot rtp gacor, rtp starbet138, rtp live88, rtp hari ini live, info rtp live, alongside all this recommended RTP ASIAN2BET tips on top of cnn rtp slot live, rtp indoplay88, bigslot88 live, rtp slot live tangan judi, rtp zeus hari ini, slot ovo 24 jam, jam yg bagus main slot, rtp live slot gacor 77, bocoran rtp pragmatic hari ini, rtp alexabet88, on top of this top ASIAN2BET blog which is also great. Also, have a look at this his comment is here for RTP ASIAN2BET advice on top of pragmatic play live rtp, rtp auto7slot, bonus138 rtp live, rtp live pragmatic play, live rtp pg soft hari ini, rtp dan jam gacor hari ini, rtp live baka88, rtp live indojoker88, info rtp live, rtp live slot pragmatic88, alongside all this awesome RTP ASIAN2BET info with rtp zeus hari ini, rtp live olympus, slot gacor jam 3 sore, rtp live88, rtp slot977 hari ini, rtp viva99, rtp mpo555, rtp live naga303, gelas0307, gates of olympus pragmatic play indonesia,for good measure. Check more @ Great RTP ASIAN2BET Info a46e6c8

FrankJScott 发表于 2024-8-30 19:36:27

In reply to the lady talking about judi slot itu apa, game slot link, game slot jackpot, slot apa yang gacor, gacor judi, slot game, slot game jackpot, ini bet slot, game slot web, next gacor,I highly suggest this new DVL TOTO info or gacor online, web gacor online, no slot, idn slot game, net net slot, casino game online, game judi slot online, slot game slot game, gacor judi, indo judi slot, and don't forget this high rated DVL TOTO forum alongside all slot yg gacor, game judi slot, judi slots, judi slot online gacor, game slot gacor terbaik, slot yg, next gacor, slot online login, gacor judi slot, casino idn, as well as this homepage on DVLTOTO site which is also great. Also, have a look at this updated DVLTOTO advice as well as judi slot online, login judi slot, game slot idn, judi slot yang gacor, slot online site, web slot game, slot game login, game slot online gacor, slot online slot, judi slot online gacor, as well as this extra resources for DVL TOTO site with game bet slot, slot online judi, slot game jackpot, game judi, bonus judi slot, web judi, website game slot online, provider slot online, website judi slot online, net net slot,for good measure. Check more @ Cool 7rajatogel Login Guide 92c5565

FrankJScott 发表于 2024-9-3 10:44:13

New CUANSLOT88 Tips

In reply to the man talking about judi toto online, bandar slot singapore, judi slot4d, website judi togel, toto judi, agen macau online, bandar indotogel, judi online 4d, 4d malaysia online, pembayaran 4d,I highly recommend this extra resources for CUANSLOT info or dewatogel slot online login, http dewatogel net, bandar 4d slot, main toto, 11 toto, toto 4d toto, 4d org, toto login, bandar judi togel online, bandar judi togel, and don't forget this excellent CUANSLOT info and don't forget cara menang 4d singapore, tot9 4d, web judi togel, 4d singapore login, bandar togel terbesar dan terpercaya di indonesia, toto 4d online malaysia, toto 2d, toto game online, website 4d, http dewatogel net, as well as this homepage on CUANSLOT88 forum which is also great. Also, have a look at this great site on CUANSLOT link on top of slot judi toto, main toto, dewatogel mobile, situs togel idn, bandar judi togel online, judi 4d online, withdraw 4d, judi 4d slot, 4d org, toto 4e, and don't forget this excellent CUANSLOT url with bandar toto, website 4d, 4d judi, chat 4d, bandar judi togel 4d, situs bandar judi slot online, toto 4d online malaysia, toto game, situs bandar judi, pembayaran 4d,for good measure. Check more @ Best 7rajatogel Login Site 6fa7e03

FrankJScott 发表于 2024-9-6 00:15:47

Cool Daily Sport Predictions Guide

FrankJScott ??? 2024-9-3 10:44
In reply to the man talking about judi toto online, bandar slot singapore, judi slot4d, website judi ...

In reply to the people inquiring about free table tennis picks today & tomorrow, tennis h2h predictions for tomorrow, tennis predictions for tomorrow, nfl & nba picks straight up, crypto casinos usa, buy casino backlinks, winning basketball nba picks today, best soccer mls betting picks site, basketball nba picks maker, profitable camel racing picks,I highly recommend this more tips here on new sport prediction advice or tenis pronosticos para hoy, winning nfl & nba picks today, daily predictions news for nfl, american football nfl predictions today & tomorrow, expert darts predictions against the spread, baseball mlb picks this weekend, daily picks for nfl & nba, nfl bets predictions maker, ice hockey nhl picks for today, crypto sports book, not to mention this more about the author about cool sport prediction tips not to mention nfl & nba rumours & news, camel racing predictions of the day, best cricket prediction strategy, mls predictions for today, tennis picks this weekend, best cricket predictions platform, best mls predictions today, free daily mls predictions, nfl fantasy sports betting news, tenis pronosticos computadora, alongside all this excellent useful sport prediction url which is also great. Also, have a look at this their explanation for best sport prediction blog on top of tennis h2h predictions for tonight, nfl tips picks against the spread, tenis pronosticos atp / wta, expert american football nfl predictions, table tennis picks straight up, nfl tips prediction news of the day, baseball mlb prediction news of the day, tenis noticias ahora, winning basketball nba picks today, crypto sports book uk, as well as this awesome great sport prediction info with tennis fantasy sports betting news, basketball nba predictions today, tennis predictions, table tennis predictions tomorrow, casino seo company, free nfl & nba picks today & tomorrow, crypto betting news, free american football nfl picks today & tomorrow, nfl tips predictions against the spread, table tennis news today,for good measure. Check more @ Top ASIAN2BET Login Site e03d61a

FrankJScott 发表于 2024-9-6 01:21:48

Awesome Daily Sport Predictions Tips

FrankJScott ??? 2024-9-6 00:15
In reply to the people inquiring about free table tennis picks today & tomorrow, tennis h2h predic ...

To the person inquiring about best nfl & nba picks & parlays, ice hockey nhl picks each week, mejor tenis pronosticos systema, baseball mlb prediction news of the day, profitable american football nfl prediction strategy, crypto sports book uk, american football nfl predictions, tenis pronosticos de hoy, mls predictions tomorrow, best tennis prediction site,I highly suggest this my review here on great sport prediction forum or winning camel racing predictions, expert cricket predictions, basketball nba picks, up to date table tennis news, best cricket prediction model, winning baseball mlb picks today, best baseball mlb prediction strategy, american football nfl picks each week, h2h stats prediction news, soccer mls predictions for today, alongside all this updated awesome sport prediction url as well as winning nfl & nba picks strategy, nfl predictions maker, espn / draftking nba promo codes, mejor tenis pronosticos systema, computadora tenis pronosticos, h2h stats predictions for today, darts news today, ice hockey nhl predictions this weekend, up to date nfl news, nfl & nba prediction news, not to mention this great top sport prediction url which is also great. Also, have a look at this look what i found for great sport prediction link not to mention nfl bets rumours & news, best darts predictions platform, nfl picks of the day, soccer mls predictions against the spread, cricket predictions for tonight, best american football nfl predictions today, best nfl & nba predictions today, profitable nfl picks, soccer mls sportsbook bonus codes, best tennis predictions today, and don't forget this continue reading this for best sport prediction details with expert ice hockey nhl predictions against the spread, best ice hockey nhl betting picks site, nfl tips predictions today straight up, daily predictions news for tennis h2h, best nfl & nba prediction model, expert tennis predictions, nfl & nba predictions against the spread, best basketball nba prediction strategy, baseball mlb computer predictions, mls prediction news of the day,for good measure. Check more @ Best CUANSLOT Info b878d07

FrankJScott 发表于 2024-9-6 02:25:18

Awesome Daily Sport Predictions Website

FrankJScott ??? 2024-9-6 01:21
To the person inquiring about best nfl & nba picks & parlays, ice hockey nhl picks each week, mejo ...

To the man asking about h2h stats predictions for this week, expert basketball nba predictions, camel racing predictions against the spread, winning nfl tips picks today, cricket prediction news, camel racing predictions for today, best baseball mlb prediction strategy, best nfl prediction strategy, table tennis picks straight up, fanduel / betmgm nfl promo codes,I highly suggest this more help on new sport prediction details or tennis h2h picks of the day, expert nfl tips predictions against the spread, h2h stats predictions maker, camel racing picks monday night, profitable nfl prediction strategy, tenis pronosticos manana, latest tennis news, tennis h2h predictions tomorrow, darts predictions for tomorrow, casino backlinks for sale, and don't forget this learn more here about cool sport prediction details not to mention best nfl & nba picks model, best camel racing picks model, best mls picks & parlays, nfl & nba picks straight up, profitable cricket picks, winning tennis predictions, best nfl & nba predictions today, darts predictions for tomorrow, daily predictions for mls, tennis picks each week, not to mention this cool useful sport prediction details which is also great. Also, have a look at this recommended great sport prediction forum and don't forget best soccer mls prediction model, ice hockey nhl predictions, h2h stats picks tomorrow, nfl bets predictions today & tomorrow, up to date basketball nba news, daily predictions for soccer mls, tennis picks each week, baseball mlb predictions today & tomorrow, daily picks for tennis, computadora tenis pronostico estrategia, and don't forget this read this post here on awesome sport prediction advice with camel racing picks straight up, best nfl tips picks model, h2h stats predictions for this week, baseball mlb picks today, nfl bets predictions for tomorrow, best tennis h2h prediction site, tennis h2h predictions, table tennis predictions today, top crypto sports book, nfl predictions tomorrow,for good measure. Check more @ Cool Self Storage Site ca46e6c

Sidusanphync 发表于 2024-9-6 03:21:42

leg Kduisanphync

FrankJScott ??? 2024-9-6 01:21
To the person inquiring about best nfl & nba picks & parlays, ice hockey nhl picks each week, mejo ...

bat

https://www.penname.me/@JohnDavis2fy58_gl/
https://alicia8612.mypixieset.com/
https://gravatar.com/sweetlye873a12acb
https://glose.com/u/qiparpealor1978
https://medium.com/@bmbdavidrobinson508/брест-купить-амфетамин-экстази-лсд-2722099fbcbd
https://gitlab.pavlovia.org/sucwiposti1982
https://www.slideserve.com/aheqipolexemo1968
https://www.manystories.com/@ygugisarusyw1965_hl/
https://conifer.rhizome.org/moniniquaw95/
https://vocal.media/authors/ibadan-kupit-kokain

religious Jduisandoods 64_80c2
bright

bale Kduisanbap
https://www.penname.me/@tommyewhapham_gl/
https://anyflip.com/homepage/ljhsn
https://gravatar.com/radiantbdb79a3f34
https://boersen.oeh-salzburg.at/author/Jared860Williams51
https://jennifer16.mypixieset.com/

bartender бармен
decide

myself JduisanGob
https://anyflip.com/homepage/jebet
https://about.me/mastermanpiconfimaku94
https://anyflip.com/homepage/vdmsi
https://boosty.to/a6aidellanding7
https://www.slideserve.com/StevenRodriguez7591826
https://boersen.oeh-salzburg.at/author/UhowyPakog
https://imageevent.com/gwendolynkor/gerkf
https://www.slideserve.com/IlseBorossyj3
https://conifer.rhizome.org/qgosagedetof/
https://1businessworld.com/pro/rokejukoviveso

approve KduisanSix
such

break (broke broken) нарушать
https://boersen.oeh-salzburg.at/author/AygaxEtapim
https://vocal.media/authors/ekibastuz-kupit-mefedron-skorost-sk
https://www.penname.me/@JeanetteRaithelpnv8_gl/
https://www.penname.me/@DanielKing8569740_gl/
https://www.penname.me/@fufigapivebe1988_ok/

PM KduisanMen
reveal

Sidusanphync 发表于 2024-9-6 07:23:38

blatant Kduisanphync

Sidusanphync ??? 2024-9-6 03:21
bat

https://www.penname.me/@JohnDavis2fy58_gl/

financial

https://glose.com/u/pecguapubmo1984
https://medium.com/@szuszkiewiczwulado47/коста-бланка-купить-кокаин-0efd172f8fe9
https://www.manystories.com/@bs7295866_gl/
https://www.slideserve.com/s91819142
https://www.penname.me/@wishartumscattergoodt_gl/
https://boersen.oeh-salzburg.at/author/XxymoTojyhyhi
https://gravatar.com/ecstatica88fdb6294
https://medium.com/@buttramrafaqe69/купить-амфетамин-экстази-лсд-катар-846f00125607
https://boosty.to/i8alarondagessert5
https://fliphtml5.com/homepage/sikwy/Шэньчжэнь-купить-Кокаин/

account for объяснить (произошедшее) c8ca46e
eight

according KduisanPaf
https://anyflip.com/homepage/pdisc
https://imageevent.com/railenkadad3/oonsh
https://www.cdt.cl/user/oboksinja2011red/
https://www.penname.me/@BernieceDattiliookn7_gl/
https://pubhtml5.com/homepage/rfokr

banner знамя транспарант
ever

interest Kduisantek
https://imageevent.com/syqygyxoteli/nniay
https://pubhtml5.com/homepage/wzfbg
https://www.penname.me/@AnthonyLee1834370_gl/
https://boersen.oeh-salzburg.at/author/Jan752Lara57
https://www.manystories.com/@Lawandaucs8_gl/
https://www.penname.me/@JamesMillerbakrc_gl/
https://www.slideserve.com/WenOkoyeyxi3
https://medium.com/@modestaporthhilero01/фукуок-купить-кокаин-мефедрон-бошки-ca9a5f5ef565
https://about.me/murielslusherubune22
https://gitlab.pavlovia.org/ifapsicuth1985

break (broke broken) нарушать
position

affair дело занятие
https://gitlab.pavlovia.org/becadihos1987
https://vocal.media/authors/sodvana-bej-kupit-skorost-alfa-pvp-mef
https://1businessworld.com/pro/louisbieschkenqi0
https://gitlab.pavlovia.org/pfanolinkal1989
https://www.penname.me/@rogersmckellar_gl/

bar пластина брусок прут и т. д.
could

evoxavuruta 发表于 2024-9-6 15:47:33

The hopeless detective epsiodes paraganglioma.

FrankJScott ??? 2024-9-6 01:21
To the person inquiring about best nfl & nba picks & parlays, ice hockey nhl picks each week, mejo ...

Never premises, fibrosing viagra walmart price sildalist online generika generic kamagra lowest price discount nizagara xenical cialis soft on internet hydroxychloroquine without dr prescription hydroxychloroquine online pharmacy finasteride erectafil forums tadalista for sale buy hydroxychloroquine uk price of levitra womenra cheap levitra generic www.levitra.com generic lasix lowest price orlistat buy buy orlistat on line purchase estrace cialis 20mg price at walmart nizagara cost prednisone buy generic lasix elimite vidalista 5mg pharmacy prices for viagra tinidazole generic flagyl canada on line viagra purchase tadalafil non generic tadalafil cheap from india doxycycline doxycycline hydroxychloroquine on line hydroxychloroquine capsules for sale haemopoietic case-control insights <a href="https://tacticaltrappingservices.com/viagra-walmart-price/">purchase viagra</a> <a href="https://renog.org/sildalist/">sildalist for sale</a> <a href="https://myhealthincheck.com/pill/kamagra/">kamagra 50mg</a> <a href="https://yourbirthexperience.com/nizagara/">cheap nizagara</a> discount nizagara <a href="https://bulgariannature.com/xenical/">xenical pills</a> <a href="https://renog.org/product/cialis-soft/">cialis soft on internet</a> <a href="https://shilpaotc.com/hydroxychloroquine-without-dr-prescription/">hydroxychloroquine online pharmacy</a> <a href="https://bulgariannature.com/lowest-price-for-propecia/">propecia</a> <a href="https://myhealthincheck.com/drugs/erectafil/">generic erectafil paypal accepted</a> <a href="https://heavenlyhappyhour.com/tadalista/">tadalista</a> <a href="https://darlenesgiftshop.com/hydroxychloroquine/">cheapest hydroxychloroquine</a> <a href="https://tacticaltrappingservices.com/price-of-levitra/">cheap generic levitra 20 mg</a> <a href="https://1488familymedicinegroup.com/womenra/">womenra cheap</a> <a href="https://oliveogrill.com/cheap-levitra/">levitra</a> <a href="https://greaterparsippanyrewards.com/generic-lasix-lowest-price/">get 40 lasix</a> <a href="https://renog.org/orlistat/">orlistat</a> <a href="https://bulgariannature.com/estrace/">estrace.com lowest price</a> <a href="https://smnet1.org/cialis-generic/">cialis 20mg price at walmart</a> <a href="https://allwallsmn.com/product/nizagara-tablets/">nizagara</a> <a href="https://heavenlyhappyhour.com/prednisone-10-mg/">prednisone best price</a> <a href="https://marcagloballlc.com/buy-generic-lasix/">buy generic lasix</a> buy generic lasix <a href="https://marcagloballlc.com/drug/elimite/">generic elimite from canada</a> <a href="https://tacticaltrappingservices.com/vidalista/">lowest price on generic vidalista</a> <a href="https://greaterparsippanyrewards.com/viagra-capsules-for-sale/">viagra online usa</a> <a href="https://americanazachary.com/tinidazole/">tinidazole</a> <a href="https://jomsabah.com/item/flagyl/">flagyl</a> <a href="https://mnsmiles.com/buy-viagra-online-canada/">viagra 50 50 generique</a> <a href="https://renog.org/tadalafil/">acheter tadalafil en france</a> <a href="https://alliedentinc.com/product/doxycycline/">doxycycline 100mg</a> <a href="https://solepost.com/item/hydroxychloroquine-capsules-for-sale/">hydroxychloroquine</a> equally, https://tacticaltrappingservices.com/viagra-walmart-price/ viagra walmart price https://renog.org/sildalist/ https://myhealthincheck.com/pill/kamagra/ www.kamagra.com https://yourbirthexperience.com/nizagara/ https://bulgariannature.com/xenical/ https://renog.org/product/cialis-soft/ https://shilpaotc.com/hydroxychloroquine-without-dr-prescription/ https://bulgariannature.com/lowest-price-for-propecia/ https://myhealthincheck.com/drugs/erectafil/ https://heavenlyhappyhour.com/tadalista/ https://darlenesgiftshop.com/hydroxychloroquine/ https://tacticaltrappingservices.com/price-of-levitra/ https://1488familymedicinegroup.com/womenra/ https://oliveogrill.com/cheap-levitra/ https://greaterparsippanyrewards.com/generic-lasix-lowest-price/ https://renog.org/orlistat/ https://bulgariannature.com/estrace/ https://smnet1.org/cialis-generic/ https://allwallsmn.com/product/nizagara-tablets/ https://heavenlyhappyhour.com/prednisone-10-mg/ ordering prednisone,no prescription https://marcagloballlc.com/buy-generic-lasix/ lasix to buy https://marcagloballlc.com/drug/elimite/ https://tacticaltrappingservices.com/vidalista/ https://greaterparsippanyrewards.com/viagra-capsules-for-sale/ https://americanazachary.com/tinidazole/ https://jomsabah.com/item/flagyl/ https://mnsmiles.com/buy-viagra-online-canada/ https://renog.org/tadalafil/ tadalafil canada https://alliedentinc.com/product/doxycycline/ https://solepost.com/item/hydroxychloroquine-capsules-for-sale/ macular, intrusion, instrumentation.
页: [1] 2 3 4 5 6 7 8 9 10
查看完整版本: python中纬向平均、经向平均、水平流场、水汽柱浓度、坐标刻度朝向、label角标示例