SCALE-Analysis
Loading...
Searching...
No Matches
Variables
Bretherton_PSI Namespace Reference

Bretherton の流線関数 More...

Variables

str dir1 = "./sampledata/scale-5.4.5/scale-rm/test/tutorial/real/experiment/run/"
 
str ftype = "history"
 
str domainlabel = "_d01"
 
str timelabel = ""
 
int PRC_NUM_X = 2
 
int PRC_NUM_Y = 2
 
str dir_out = "./fig/"
 
bool savefig = True
 
str key2dname = "MSLP"
 
str key2dunit = "(Pa)"
 
str var2dname = "PREC"
 
str var2dunit = "(kg/m2/s)"
 
str var3dname = "RH"
 
str var3dunit = "(%)"
 
 levels_var3d1 = np.linspace(0,100,21)
 
str cmap_var3d1 = "BrBG"
 
int blct = 1
 
int blcy = 30
 
int blcx = 30
 
 fpathlist = get_fpathlist(dir1,ftype,domainlabel,timelabel,PRC_NUM_X,PRC_NUM_Y)
 
 xrvar = get_xrvar(fpathlist)
 
 z = xrvar.coords["z"]
 
 time = xrvar.coords["time"]
 
 y = xrvar.coords["y"]
 
 x = xrvar.coords["x"]
 
 index
 
 key2d
 
 weights_sum_sorted
 
 var2d_sorted = get_var2d_sorted_bykey2d(xrvar,var2dname,blct,blcy,blcx,index)
 
 var3d_sorted = get_var3d_sorted_bykey2d(xrvar,var3dname,blct,blcy,blcx,index)
 
 rhow_sorted = get_var3d_sorted_bykey2d(xrvar,"RHOW",blct,blcy,blcx,index)
 
 key2dmean = np.average(key2d,weights=weights_sum_sorted,axis=0)
 
 key2drank = np.arange(int(key2dmean.shape[0]))
 
 psi3dmean = np.cumsum(np.sum(rhow_sorted*weights_sum_sorted[:,:,np.newaxis],axis=0),axis=0) / np.sum(np.sum(weights_sum_sorted[:,:,np.newaxis],axis=0),axis=0)
 
 zsize = var3d_sorted.shape[2]
 
 var3d1mean = np.average(var3d_sorted,weights=np.tile(weights_sum_sorted[:,:,np.newaxis],(1,1,zsize)),axis=0)
 
 var2d1mean = np.average(var2d_sorted,weights=weights_sum_sorted,axis=0)
 
 fig
 
 ax
 
 levels_psi = np.linspace(psi3dmean.min(),psi3dmean.max(),11)
 
 CS = ax.contour(key2drank,z*1e-3,psi3dmean.T,levels=levels_psi)
 
 inline
 
 True
 
 fontsize
 
 cax = ax.contourf(key2drank,z*1e-3,var3d1mean.T,levels=levels_var3d1,cmap=cmap_var3d1)
 
 cbar = plt.colorbar(cax,ax=ax)
 

Detailed Description

Bretherton の流線関数

水平分布した変数(e.g., 可降水量)の水平ブロック平均値をキーに大気カラムを水平ソートし, 仮想的な水平軸に沿った物理量の分布や流れ場を定量化する.

Author
Tomoro Yanase, Team SCALE
Note
Reference
  • Bretherton, C. S., Blossey, P. N., & Khairoutdinov, M. (2005). An energy-balance analysis of deep convective self-aggregation above uniform SST. Journal of the atmospheric sciences, 62(12), 4273-4292.
  • Yanase, T., Nishizawa, S., Miura, H., Takemi, T., & Tomita, H. (2020). New critical length for the onset of self‐aggregation of moist convection.

Geophysical Research Letters, 47(16), e2020GL088763.

Variable Documentation

◆ ax

ax

◆ blct

int blct = 1

◆ blcx

int blcx = 30

◆ blcy

int blcy = 30

◆ cax

cax = ax.contourf(key2drank,z*1e-3,var3d1mean.T,levels=levels_var3d1,cmap=cmap_var3d1)

◆ cbar

cbar = plt.colorbar(cax,ax=ax)

◆ cmap_var3d1

str cmap_var3d1 = "BrBG"

◆ CS

CS = ax.contour(key2drank,z*1e-3,psi3dmean.T,levels=levels_psi)

◆ dir1

str dir1 = "./sampledata/scale-5.4.5/scale-rm/test/tutorial/real/experiment/run/"

◆ dir_out

str dir_out = "./fig/"

◆ domainlabel

str domainlabel = "_d01"

◆ fig

fig

◆ fontsize

fontsize

◆ fpathlist

fpathlist = get_fpathlist(dir1,ftype,domainlabel,timelabel,PRC_NUM_X,PRC_NUM_Y)

◆ ftype

str ftype = "history"

◆ index

index

◆ inline

inline

◆ key2d

key2d

◆ key2dmean

key2dmean = np.average(key2d,weights=weights_sum_sorted,axis=0)

◆ key2dname

str key2dname = "MSLP"

◆ key2drank

key2drank = np.arange(int(key2dmean.shape[0]))

◆ key2dunit

str key2dunit = "(Pa)"

◆ levels_psi

levels_psi = np.linspace(psi3dmean.min(),psi3dmean.max(),11)

◆ levels_var3d1

levels_var3d1 = np.linspace(0,100,21)

◆ PRC_NUM_X

int PRC_NUM_X = 2

◆ PRC_NUM_Y

int PRC_NUM_Y = 2

◆ psi3dmean

psi3dmean = np.cumsum(np.sum(rhow_sorted*weights_sum_sorted[:,:,np.newaxis],axis=0),axis=0) / np.sum(np.sum(weights_sum_sorted[:,:,np.newaxis],axis=0),axis=0)

◆ rhow_sorted

rhow_sorted = get_var3d_sorted_bykey2d(xrvar,"RHOW",blct,blcy,blcx,index)

◆ savefig

bool savefig = True

◆ time

time = xrvar.coords["time"]

◆ timelabel

str timelabel = ""

◆ True

True

◆ var2d1mean

var2d1mean = np.average(var2d_sorted,weights=weights_sum_sorted,axis=0)

◆ var2d_sorted

var2d_sorted = get_var2d_sorted_bykey2d(xrvar,var2dname,blct,blcy,blcx,index)

◆ var2dname

str var2dname = "PREC"

◆ var2dunit

str var2dunit = "(kg/m2/s)"

◆ var3d1mean

var3d1mean = np.average(var3d_sorted,weights=np.tile(weights_sum_sorted[:,:,np.newaxis],(1,1,zsize)),axis=0)

◆ var3d_sorted

var3d_sorted = get_var3d_sorted_bykey2d(xrvar,var3dname,blct,blcy,blcx,index)

◆ var3dname

str var3dname = "RH"

◆ var3dunit

str var3dunit = "(%)"

◆ weights_sum_sorted

weights_sum_sorted

◆ x

x = xrvar.coords["x"]

◆ xrvar

xrvar = get_xrvar(fpathlist)

◆ y

y = xrvar.coords["y"]

◆ z

z = xrvar.coords["z"]

◆ zsize

zsize = var3d_sorted.shape[2]