コード例 #1
0
  s,sigma = np.meshgrid(specx,spect)

  p.f = sigma*np.nan # trick to make it transparent
  p.clev = [0.]
  p.ccol = "white"
  p.ccol = "red"
  p.x = specx
  p.y = spect / opt.dt  # /25000. Saturne
  p.invert = True

  for nnn in nutab:
   for n2n2 in n2tab:
     p.c = mypl.dispeqw(s,sigma,nu=nnn,lz=lz,N2=n2n2)
     p.make()

if opt.output is None: ppplot.show()
else: ppplot.save(mode="png",filename=opt.output)

####################################
# save a .sh file with the command #
####################################
command = ""
for arg in sys.argv: command = command + arg + ' '
if opt.output is not None:
  try:
    f = open(opt.output+'.sh', 'w')
    f.write(command)
  except IOError:
    print "!! WARNING !! not saved. Probably do not have permission to write here."

コード例 #2
0
        fig.add_subplot(subv, subh, 1)
        pl.f = mmc_trans
        # get highest value and highest power
        absmax = np.abs(pl.f).mean()
        exponent = int(round(np.log10(absmax)))
        norm = 10.**exponent
        pl.f = pl.f / norm
        pl.x = lat
        pl.y = pniv
        pl.units = '$10^{' + str(exponent) + '}$ s$^{-1}$'
        pl.title = "MMC transport"
        pl.make()
        fig.add_subplot(subv, subh, 2)

    pl.f = eddy_trans
    pl.f = -dETdy
    # get highest value and highest power
    absmax = np.abs(pl.f).mean()
    exponent = int(round(np.log10(absmax)))
    norm = 10.**exponent
    pl.f = ppcompute.smooth2d(pl.f, window=10) / norm
    pl.c = ppcompute.smooth2d(meanu2D, window=10)
    pl.x = lat
    pl.y = pniv
    pl.title = "Eddy transport"
    #pl.xmax = 60.
    #pl.xmin = 0.
    pl.make()
    ppplot.show()
    #pl.makesave(mode="png",filename="transport",includedate=False)
コード例 #3
0
ファイル: spectra.py プロジェクト: olivierfarges/planetoplot
    p.f = sigma * np.nan  # trick to make it transparent
    p.clev = [0.0]
    p.ccol = "white"
    p.ccol = "red"
    p.x = specx
    p.y = spect / opt.dt  # /25000. Saturne
    p.invert = True

    for nnn in nutab:
        for n2n2 in n2tab:
            p.c = mypl.dispeqw(s, sigma, nu=nnn, lz=lz, N2=n2n2)
            p.make()

if opt.output is None:
    ppplot.show()
else:
    ppplot.save(mode="png", filename=opt.output)

####################################
# save a .sh file with the command #
####################################
command = ""
for arg in sys.argv:
    command = command + arg + " "
if opt.output is not None:
    try:
        f = open(opt.output + ".sh", "w")
        f.write(command)
    except IOError:
        print "!! WARNING !! not saved. Probably do not have permission to write here."