예제 #1
0
# Specify parameters

path = './data/'

variable = "P"

p = collect(variable, path=path)

period = 15

grid = '../cbm18_dens8.grid_nx68ny64.nc'

########################################################
# Call plotpolslice once to get extended poloidal grid

r, z, fun = plotpolslice(p[0, :, :, :], grid, period=period, rz=1)

nx = r.shape[0]  # number of points in r
ny = r.shape[1]  # number of points in z
nt = p.shape[0]  # time intervals

fm = np.zeros(
    (nt, nx,
     ny))  # array to store the time sequence of the poloidal cross section

#Compute all time frames

for k in range(nt):
    fm[k, :, :] = plotpolslice(p[k, :, :, :], grid, period=period, rz=0)

np.savez('pslice', fm=fm, z=z, r=r)
예제 #2
0
fig=figure(figsize=(10, 8))
plot(np.gradient(np.log(rmsp_f0[:,34,32])), color='k',linewidth=3)
plot(np.gradient(np.log(rmsp_f[:,34,32])),color='red',linewidth=3)

ylabel('$\gamma / \omega_A$',fontsize=25)
xlabel('Time$(\\tau_A)$',fontsize=25)
annotate('w/o flow', xy=(.5, .7),  xycoords='axes fraction',horizontalalignment='center', verticalalignment='center', size=30)
annotate('w/ flow', xy=(.5, .4),  xycoords='axes fraction',horizontalalignment='center', verticalalignment='center', color='r', size=30)
ylim([0,0.5])
xlim([0,100])
fig.set_tight_layout(True)
show(block=False)



plotpolslice(p_f0[50,:,:,:],gfile,period=period, fig=1)
mlab.text(.01,.99,"w/o flow")

plotpolslice(p_f[50,:,:,:],gfile,period=period, fig=1)
mlab.text(.01,.99,"w/ flow")

fig=figure()
mode_structure(p_f0[50,:,:,:], g, period=period)
plot([40,40],[0,.014],'k--',linewidth=5)
annotate('w/o flow', xy=(.3, .7),  xycoords='axes fraction',horizontalalignment='center', verticalalignment='center', size=30)
ylim([0,0.014])
xlim([0,80])
fig.set_tight_layout(True)
show(block=False)

예제 #3
0

path='./data/'

variable="P"

p = collect(variable, path=path)

period=15

grid='../cbm18_dens8.grid_nx68ny64.nc'

########################################################
# Call plotpolslice once to get extended poloidal grid 

r,z,fun=plotpolslice(p[0,:,:,:],grid,period=period,rz=1)

nx=r.shape[0] # number of points in r
ny=r.shape[1] # number of points in z
nt=p.shape[0] # time intervals


fm=np.zeros((nt,nx,ny)) # array to store the time sequence of the poloidal cross section

#Compute all time frames

for k in range(nt):
    fm[k,:,:]=plotpolslice(p[k,:,:,:],grid,period=period,rz=0)
    
np.savez('pslice',fm=fm, z=z, r=r)
예제 #4
0
         horizontalalignment='center',
         verticalalignment='center',
         size=30)
annotate('w/ flow',
         xy=(.5, .4),
         xycoords='axes fraction',
         horizontalalignment='center',
         verticalalignment='center',
         color='r',
         size=30)
ylim([0, 0.5])
xlim([0, 100])
fig.set_tight_layout(True)
show(block=False)

plotpolslice(p_f0[50, :, :, :], gfile, period=period, fig=1)
mlab.text(.01, .99, "w/o flow")

plotpolslice(p_f[50, :, :, :], gfile, period=period, fig=1)
mlab.text(.01, .99, "w/ flow")

fig = figure()
mode_structure(p_f0[50, :, :, :], g, period=period)
plot([40, 40], [0, .014], 'k--', linewidth=5)
annotate('w/o flow',
         xy=(.3, .7),
         xycoords='axes fraction',
         horizontalalignment='center',
         verticalalignment='center',
         size=30)
ylim([0, 0.014])