Example #1
0
def pfunc2d_4in(f1,f2,f3,f4,ftit,x,y,dirname,fsizemat,sponge,symm,optit1='Upper Layer',optit2='Lower Layer',optyt1='Time Averaged ',optyt2='Instantaneous ',optit3='',optit4='',suptit=''):

      # from pylab import *
      # plt.rcParams['image.cmap'] = 'RdYlBu'
      from pfunc2d import plotsame
      ion()

      predir='/data/ilebras/twolayer-jets-climate/'
    
      figure(figsize=fsizemat)
      ax=subplot(2,2,1)
      plotsame(f1,sponge,x,y,symm)
      if optyt1=='Time Averaged ':
            ylabel(optyt1+ftit)
      else:
            ylabel(optyt1)
      title(optit1)
      ax.set_xticklabels([])	

      ax=subplot(2,2,2)
      plotsame(f2,sponge,x,y,symm)
      title(optit2)
      ax.set_xticklabels([])
      ax.set_yticklabels([])

      ax=subplot(2,2,3)
      plotsame(f3,sponge,x,y,symm)
      if optyt1=='Instantaneous ':
            ylabel(optyt2+ftit)
      else:
            ylabel(optyt2)
      xlabel('x position (km)')
      title(optit3)

      ax=subplot(2,2,4)
      plotsame(f4,sponge,x,y,symm)
      xlabel('x position (km)')
      title(optit4)
      ax.set_yticklabels([])
      plt.tight_layout

      suptitle(suptit,fontsize=20)

      savefig(predir+'plots/'+dirname+dirname[6:]+'_'+ftit+'.png')
Example #2
0
def pfunc2d_6in(f1,f2,f3,f4,f5,f6,ftit,x,y,dirname,fsizemat,sponge,symm,optit1='',optit2='',optit3='',optit4='',optit5='',optit6='',optyt1='position (km)',optyt2='position (km)',optyt3='position (km)',suptit=''):

      from pfunc2d import plotsame

      predir='/data/ilebras/twolayer-jets-climate/'
    
      figure(figsize=fsizemat)
      ax=subplot(3,2,1)
      plotsame(f1,sponge,x,y,symm)
      ylabel(optyt1)
      title(optit1)
      ax.set_xticklabels([])	

      ax=subplot(3,2,2)
      plotsame(f2,sponge,x,y,symm)
      title(optit2)
      ax.set_xticklabels([])
      ax.set_yticklabels([])

      ax=subplot(3,2,3)
      plotsame(f3,sponge,x,y,symm)
      ylabel(optyt2)
      title(optit3)
      ax.set_xticklabels([])

      ax=subplot(3,2,4)
      plotsame(f4,sponge,x,y,symm)
      ax.set_xticklabels([])
      ax.set_yticklabels([])
      title(optit4)
      plt.tight_layout

      ax=subplot(3,2,5)
      plotsame(f5,sponge,x,y,symm)
      xlabel('position (km)')
      ylabel(optyt3)
      title(optit5)

      ax=subplot(3,2,6)
      plotsame(f6,sponge,x,y,symm)
      ax.set_yticklabels([])
      title(optit6)
      xlabel('position (km)')
      plt.tight_layout

      suptitle(suptit,fontsize=20)

      savefig(predir+'plots/'+dirname+dirname[6:]+'_'+ftit+'.png')