SCALE-Analysis
Loading...
Searching...
No Matches
Functions | Variables
HorizSelect_SurfaceUpper Namespace Reference

水平指定地点近傍の地表面変数・高層大気変数 More...

Functions

 ll2dist (lat1, lon1, lat2, lon2)
 

Variables

str dir1 = "./sampledata/scale-5.4.5/scale-rm/test/tutorial/real/experiment/run/"
 
str domainlabel = "_d01"
 
str timelabel = ""
 
int PRC_NUM_X = 2
 
int PRC_NUM_Y = 2
 
str dir_out = "./fig/"
 
bool savefig = True
 
str sfcvarname = "MSLP"
 
str sfcvarunit = "(hPa)"
 
int sfcvarfact = 1e-2
 
str uppvarname = "RH"
 
str uppvarunit = "(%)"
 
int uppvarfact = 1
 
 uppvarlevels = np.linspace(0,100,21)
 
str uppvarcmap = "BrBG"
 
float lon0 = 135.2207105
 
float lat0 = 34.6533937
 
int dist0 = 50
 
list xticks = [130,135,140]
 
list yticks = [30,35,40]
 
 xticks_f = np.array([tmp for tmp in np.linspace(np.floor(lon0)-2,np.floor(lon0)+2,5)])
 
 yticks_f = np.array([tmp for tmp in np.linspace(np.floor(lat0)-2,np.floor(lat0)+2,5)])
 
 fpathlist = get_fpathlist(dir1,"history",domainlabel,timelabel,PRC_NUM_X,PRC_NUM_Y)
 
 xrvar = get_xrvar(fpathlist)
 
 time = xrvar.coords["time"]
 
 tsize = len(time)
 
 lon = xrvar.coords["lon"]
 
 lat = xrvar.coords["lat"]
 
 z = xrvar.coords["z"]
 
 dist = ll2dist(lat0,lon0,lat,lon)
 
 lon_lim = lon.values[dist<dist0]
 
 lat_lim = lat.values[dist<dist0]
 
 argmin_dist = np.argmin(dist.values.reshape(-1))
 
 lon_nn = lon.values.reshape(-1)[argmin_dist]
 
 lat_nn = lat.values.reshape(-1)[argmin_dist]
 
 fig = plt.figure(figsize=(12,5))
 
list axes = [fig.add_subplot(121,projection=ccrs.PlateCarree()), fig.add_subplot(122,projection=ccrs.PlateCarree())]
 
 color
 
 levels1 = np.linspace(0,1000,11)
 
 xlocs
 
 ylocs
 
 crs
 
 cax = ax.contourf(lon,lat,dist,levels=levels1)
 
 cbar = plt.colorbar(cax,ax=ax,fraction=0.02)
 
 marker
 
 s
 
 sfcvar = xrvar[sfcvarname]
 
 sfcvar_nn = sfcvar.values.reshape(time.size,-1)[:,argmin_dist]
 
 sfcvar_lim = sfcvar.values[:,dist<dist0]
 
 uppvar = xrvar[uppvarname]
 
 uppvar_nn = uppvar.values.reshape(time.size,z.size,-1)[:,:,argmin_dist]
 
 uppvar_lim = uppvar.values[:,:,dist<dist0]
 
 ax = axes[0]
 
 label
 
 linewidth
 
 linestyle
 
 alpha
 
 facecolor
 
 fontsize
 
 figsize
 

Detailed Description

水平指定地点近傍の地表面変数・高層大気変数

モデル出力からある指定した水平地点の近くのデータを抽出・描画

Author
Tomoro Yanase, Team SCALE

Note

Function Documentation

◆ ll2dist()

ll2dist ( lat1,
lon1,
lat2,
lon2 )

Variable Documentation

◆ alpha

alpha

◆ argmin_dist

argmin_dist = np.argmin(dist.values.reshape(-1))

◆ ax

list ax = axes[0]

◆ axes

list axes = [fig.add_subplot(121,projection=ccrs.PlateCarree()), fig.add_subplot(122,projection=ccrs.PlateCarree())]

◆ cax

cax = ax.contourf(lon,lat,dist,levels=levels1)

◆ cbar

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

◆ color

color

◆ crs

crs

◆ dir1

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

◆ dir_out

str dir_out = "./fig/"

◆ dist

dist = ll2dist(lat0,lon0,lat,lon)

◆ dist0

int dist0 = 50

◆ domainlabel

str domainlabel = "_d01"

◆ facecolor

facecolor

◆ fig

fig = plt.figure(figsize=(12,5))

◆ figsize

figsize

◆ fontsize

fontsize

◆ fpathlist

fpathlist = get_fpathlist(dir1,"history",domainlabel,timelabel,PRC_NUM_X,PRC_NUM_Y)

◆ label

label

◆ lat

lat = xrvar.coords["lat"]

◆ lat0

lat0 = 34.6533937

◆ lat_lim

lat_lim = lat.values[dist<dist0]

◆ lat_nn

lat_nn = lat.values.reshape(-1)[argmin_dist]

◆ levels1

levels1 = np.linspace(0,1000,11)

◆ linestyle

linestyle

◆ linewidth

linewidth

◆ lon

lon = xrvar.coords["lon"]

◆ lon0

lon0 = 135.2207105

◆ lon_lim

lon_lim = lon.values[dist<dist0]

◆ lon_nn

lon_nn = lon.values.reshape(-1)[argmin_dist]

◆ marker

marker

◆ PRC_NUM_X

int PRC_NUM_X = 2

◆ PRC_NUM_Y

int PRC_NUM_Y = 2

◆ s

s

◆ savefig

bool savefig = True

◆ sfcvar

sfcvar = xrvar[sfcvarname]

◆ sfcvar_lim

sfcvar_lim = sfcvar.values[:,dist<dist0]

◆ sfcvar_nn

sfcvar_nn = sfcvar.values.reshape(time.size,-1)[:,argmin_dist]

◆ sfcvarfact

sfcvarfact = 1e-2

◆ sfcvarname

str sfcvarname = "MSLP"

◆ sfcvarunit

str sfcvarunit = "(hPa)"

◆ time

time = xrvar.coords["time"]

◆ timelabel

str timelabel = ""

◆ tsize

tsize = len(time)

◆ uppvar

uppvar = xrvar[uppvarname]

◆ uppvar_lim

uppvar_lim = uppvar.values[:,:,dist<dist0]

◆ uppvar_nn

uppvar_nn = uppvar.values.reshape(time.size,z.size,-1)[:,:,argmin_dist]

◆ uppvarcmap

str uppvarcmap = "BrBG"

◆ uppvarfact

int uppvarfact = 1

◆ uppvarlevels

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

◆ uppvarname

str uppvarname = "RH"

◆ uppvarunit

str uppvarunit = "(%)"

◆ xlocs

xlocs

◆ xrvar

xrvar = get_xrvar(fpathlist)

◆ xticks

xticks = [130,135,140]

◆ xticks_f

xticks_f = np.array([tmp for tmp in np.linspace(np.floor(lon0)-2,np.floor(lon0)+2,5)])

◆ ylocs

ylocs

◆ yticks

yticks = [30,35,40]

◆ yticks_f

yticks_f = np.array([tmp for tmp in np.linspace(np.floor(lat0)-2,np.floor(lat0)+2,5)])

◆ z

z = xrvar.coords["z"]