In [34]:
import imp
imp.load_source('SoundingRoutines', '/nfs/see-fs-01_users/eepdw/python_scripts/Tephigram/Sounding_Routines.py')
from SoundingRoutines import *

import datetime
from dateutil.relativedelta import relativedelta

import datetime
from dateutil.relativedelta import relativedelta

In [33]:
import linecache

def PrintException():
    exc_type, exc_obj, tb = sys.exc_info()
    f = tb.tb_frame
    lineno = tb.tb_lineno
    filename = f.f_code.co_filename
    linecache.checkcache(filename)
    line = linecache.getline(filename, lineno, f.f_globals)
    print 'EXCEPTION IN ({}, LINE {} "{}"): {}'.format(filename, lineno, line.strip(), exc_obj)

In [ ]:
station_list_search='/nfs/a90/eepdw/Data/Observations/Radiosonde_downloaded_from_NOAA_GUAN/igra-stations.txt'

station_metadata=[]
f = open(station_list_search,'r')
for line in f:
     line = line.strip()
     line=re.sub(r'([A-Z])\s([A-Z])', r'\1_\2',line)
     line=re.sub(r'([A-Z])\s\s([A-Z])', r'\1_\2',line)
     station_metadata.append(line.split())
f.close()station_list_search='/nfs/a90/eepdw/Data/Observations/Radiosonde_downloaded_from_NOAA_GUAN/igra-stations.txt'

station_metadata=[]
f = open(station_list_search,'r')
for line in f:
     line = line.strip()
     line=re.sub(r'([A-Z])\s([A-Z])', r'\1_\2',line)
     line=re.sub(r'([A-Z])\s\s([A-Z])', r'\1_\2',line)
     station_metadata.append(line.split())
f.close()

In [222]:
import Image

station_list_cs=[43150, 42867, 43014, 42339, 40990, 43003]

date_min=datetime.datetime(1960,5,1,0,0,0)
date_max=datetime.datetime(2014,10,1,0,0,0)

delta = relativedelta(weeks=+1)    

load_to_get_dates = load('/nfs/a90/eepdw/Data/Observations/Radiosonde_Numpy/Radiosonde_Cross_Section_'
                           'IND_SOUNDING_INTERP_MEAN_Climat_%s_%s_%s_%s.npz'
                           % (date_min.strftime('%Y%m%d'), date_max.strftime('%Y%m%d'), delta, station_list_cs[0]))
    
dates=load_to_get_dates['dates_for_plotting']


out_image = "/nfs/a90/eepdw/Figures/Radiosonde/Tephigrams/Weekly_Climatology/Image_Grid_Skew_T_Plots_ISM_Onset.png"

image_sizes_y=[]

for stat in station_list_cs:
    station_name,la,lo, st_height=station_info_search(stat)
    
    image_sizes_x=[]
    
    for bin in range(dates.shape[0]):
        try:
            skew_t_plot = '/nfs/a90/eepdw/Figures/Radiosonde/Tephigrams/Weekly_Climatology/%s_%s_%s_Skew_T_Vars_To_Right_Barbs.png' \
                        % (station_name.replace('/','_').replace(' ', '_'), stat, dates[bin].strftime('%Y%m%d'))
            image64 = Image.open(skew_t_plot)
            #print image64.size[0]
            image_sizes_x.append(image64.size[0])
            image_sizes_y.append(image64.size[1])
        except Exception:
            exceptPrintException()
            
width=sum(image_sizes_x)
height=max(image_sizes_y) * len(station_list_cs)



print width
print height
        
blank_image = Image.new("RGB", (width,height), "white")

y_pos=0

for stat in station_list_cs:
    x_pos=0
    
    station_name,la,lo, st_height=station_info_search(stat)    
    
    for bin in range(dates.shape[0]):
        
        try:
            skew_t_plot = '/nfs/a90/eepdw/Figures/Radiosonde/Tephigrams/Weekly_Climatology/%s_%s_%s_Skew_T_Vars_To_Right_Barbs.png' \
                        % (station_name.replace('/','_').replace(' ', '_'), stat, dates[bin].strftime('%Y%m%d'))
            image64 = Image.open(open(skew_t_plot, 'rb'))
            blank_image.paste(image64, (x_pos,y_pos))
            #print x_pos
            x_pos+=max(image_sizes_x)
    
        except Exception:
            PrintException()
    y_pos+=max(image_sizes_y)
    #img = Image.open(open("c:\python27\IMG_0707.png", 'rb'))


    #out = out_image + image_num + ".jpg"

#blank_image.paste(image64, (0,0))
#blank_image.paste(image641, (400,0))
#blank_image.paste(image642, (0,300))
#blank_image.paste(image643, (400,300))
blank_image.save(out_image, dpi=(360,360))


EXCEPTION IN (<ipython-input-222-3f16e63746b4>, LINE 29 "image64 = Image.open(skew_t_plot)"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/Radiosonde/Tephigrams/Weekly_Climatology/Visakhapatnam_43150_20110501_Skew_T_Vars_To_Right_Barbs.png'
EXCEPTION IN (<ipython-input-222-3f16e63746b4>, LINE 29 "image64 = Image.open(skew_t_plot)"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/Radiosonde/Tephigrams/Weekly_Climatology/Nagpur_Sonegaon_42867_20110501_Skew_T_Vars_To_Right_Barbs.png'
EXCEPTION IN (<ipython-input-222-3f16e63746b4>, LINE 29 "image64 = Image.open(skew_t_plot)"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/Radiosonde/Tephigrams/Weekly_Climatology/Aurangabad_Chikalthana_43014_20110501_Skew_T_Vars_To_Right_Barbs.png'
EXCEPTION IN (<ipython-input-222-3f16e63746b4>, LINE 29 "image64 = Image.open(skew_t_plot)"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/Radiosonde/Tephigrams/Weekly_Climatology/Jodhpur_42339_20110501_Skew_T_Vars_To_Right_Barbs.png'
EXCEPTION IN (<ipython-input-222-3f16e63746b4>, LINE 29 "image64 = Image.open(skew_t_plot)"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/Radiosonde/Tephigrams/Weekly_Climatology/Kandahar_Airport_40990_20110501_Skew_T_Vars_To_Right_Barbs.png'
EXCEPTION IN (<ipython-input-222-3f16e63746b4>, LINE 29 "image64 = Image.open(skew_t_plot)"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/Radiosonde/Tephigrams/Weekly_Climatology/Bombay_Santa_Cruz_43003_20110501_Skew_T_Vars_To_Right_Barbs.png'
21000
4800
EXCEPTION IN (<ipython-input-222-3f16e63746b4>, LINE 57 "image64 = Image.open(open(skew_t_plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/Radiosonde/Tephigrams/Weekly_Climatology/Visakhapatnam_43150_20110501_Skew_T_Vars_To_Right_Barbs.png'
EXCEPTION IN (<ipython-input-222-3f16e63746b4>, LINE 57 "image64 = Image.open(open(skew_t_plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/Radiosonde/Tephigrams/Weekly_Climatology/Nagpur_Sonegaon_42867_20110501_Skew_T_Vars_To_Right_Barbs.png'
EXCEPTION IN (<ipython-input-222-3f16e63746b4>, LINE 57 "image64 = Image.open(open(skew_t_plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/Radiosonde/Tephigrams/Weekly_Climatology/Aurangabad_Chikalthana_43014_20110501_Skew_T_Vars_To_Right_Barbs.png'
EXCEPTION IN (<ipython-input-222-3f16e63746b4>, LINE 57 "image64 = Image.open(open(skew_t_plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/Radiosonde/Tephigrams/Weekly_Climatology/Jodhpur_42339_20110501_Skew_T_Vars_To_Right_Barbs.png'
EXCEPTION IN (<ipython-input-222-3f16e63746b4>, LINE 57 "image64 = Image.open(open(skew_t_plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/Radiosonde/Tephigrams/Weekly_Climatology/Kandahar_Airport_40990_20110501_Skew_T_Vars_To_Right_Barbs.png'
EXCEPTION IN (<ipython-input-222-3f16e63746b4>, LINE 57 "image64 = Image.open(open(skew_t_plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/Radiosonde/Tephigrams/Weekly_Climatology/Bombay_Santa_Cruz_43003_20110501_Skew_T_Vars_To_Right_Barbs.png'

In [223]:
# Radiosonde Cross Sections

import Image

date_min=datetime.datetime(1960,5,1,0,0,0)
date_max=datetime.datetime(2014,10,1,0,0,0)
Cross_Section_Title='Vizag_to_Kandahar'
#Cross_Section_Title='Thiruvan_to_Bombay'
Cross_Section_Title='Bombay_to_Nagpur'
station_for_dates=43371

plot_vars=['Relative_Humidity', 'thetaeminthetaesat_buoy', 'thetae', 'thetaesat', 'wvmr', 'pottemp']

delta = relativedelta(weeks=+1)    

load_to_get_dates = load('/nfs/a90/eepdw/Data/Observations/Radiosonde_Numpy/Radiosonde_Cross_Section_'
                           'IND_SOUNDING_INTERP_MEAN_Climat_%s_%s_%s_%s.npz'
                           % (date_min.strftime('%Y%m%d'), date_max.strftime('%Y%m%d'), delta, station_for_dates))

dates=load_to_get_dates['dates_for_plotting']


out_image = "/nfs/a90/eepdw/Figures/Radiosonde/Image_Grid_%s_%s_%s_%s.png" \
            % (Cross_Section_Title, date_min.strftime('%Y%m%d'), date_max.strftime('%Y%m%d'), delta)

image_sizes_y=[]

for plot in plot_vars:
    
    image_sizes_x=[]
    
    for bin in range(dates.shape[0]):
        try:
            png_plot = '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/%s_%s_%s_%s_%s.png' \
            % (Cross_Section_Title, date_min.strftime('%Y%m%d'), date_max.strftime('%Y%m%d'), \
               dates[bin].strftime("%d_%B"), plot)
           
            image64 = Image.open(open(png_plot, 'rb'))
            #print image64.size[1]
                
            image_sizes_x.append(image64.size[0])
            image_sizes_y.append(image64.size[1])
        except Exception:
            PrintException()

print image_sizes_y            
width=sum(image_sizes_x)
height=max(image_sizes_y) * len(plot_vars)



print width
print height
        
blank_image = Image.new("RGB", (width,height), "white")

y_pos=0

for plot in plot_vars:
    x_pos=0
    
    station_name,la,lo, st_height=station_info_search(stat)    
    
    for bin in range(dates.shape[0])[1::]:
        
        try:
            png_plot = '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/%s_%s_%s_%s_%s.png' \
            % (Cross_Section_Title, date_min.strftime('%Y%m%d'), date_max.strftime('%Y%m%d'), \
               dates[bin].strftime("%d_%B"), plot)
            image64 = Image.open(open(png_plot, 'rb'))
            blank_image.paste(image64, (x_pos,y_pos))
            #print x_pos
            x_pos+=max(image_sizes_x)
    
        except Exception:
            PrintException()
    y_pos+=max(image_sizes_y)
    #img = Image.open(open("c:\python27\IMG_0707.png", 'rb'))


    #out = out_image + image_num + ".jpg"

#blank_image.paste(image64, (0,0))
#blank_image.paste(image641, (400,0))
#blank_image.paste(image642, (0,300))
#blank_image.paste(image643, (400,300))
blank_image.save(out_image, dpi=(360,360))


[602, 600, 600, 600, 600, 600, 601, 602, 601, 602, 601, 601, 601, 601, 601, 601, 600, 600, 600, 600, 600, 599, 602, 600, 600, 600, 600, 600, 601, 602, 601, 602, 601, 601, 601, 601, 601, 601, 600, 600, 600, 600, 600, 599, 602, 600, 600, 600, 600, 600, 601, 602, 601, 602, 601, 601, 601, 601, 601, 601, 600, 600, 600, 600, 600, 599, 602, 600, 600, 600, 600, 600, 601, 602, 601, 602, 601, 601, 601, 601, 601, 601, 600, 600, 600, 600, 600, 599, 602, 600, 600, 600, 600, 600, 601, 602, 601, 602, 601, 601, 601, 601, 601, 601, 600, 600, 600, 600, 600, 599, 602, 600, 600, 600, 600, 600, 601, 602, 601, 602, 601, 601, 601, 601, 601, 601, 600, 600, 600, 600, 600, 599]
24486
3612

In [38]:
# Radiosonde Cross Sections

import Image

date_min=datetime.datetime(1960,5,1,0,0,0)
date_max=datetime.datetime(2014,10,1,0,0,0)
Cross_Section_Title='Vizag_to_Kandahar'
#Cross_Section_Title='Thiruvan_to_Bombay'
#Cross_Section_Title='Bombay_to_Nagpur'
station_for_dates=43371

plot_vars=['Theta_e_sat_time_axis_diff_plus_minus_1', 'Theta_e_sat_time_axis_diff']

delta = relativedelta(weeks=+1)    

load_to_get_dates = load('/nfs/a90/eepdw/Data/Observations/Radiosonde_Numpy/Radiosonde_Cross_Section_'
                           'IND_SOUNDING_INTERP_MEAN_Climat_%s_%s_%s_%s.npz'
                           % (date_min.strftime('%Y%m%d'), date_max.strftime('%Y%m%d'), delta, station_for_dates))

dates=load_to_get_dates['dates_for_plotting']

out_image = "/nfs/a90/eepdw/Figures/Radiosonde/Image_Grid_%s_%s_%s_%s_theta_e_theta_e_sat_diff.png" \
            % (Cross_Section_Title, date_min.strftime('%Y%m%d'), date_max.strftime('%Y%m%d'), delta)

image_sizes_y=[]

for plot in plot_vars:
    
    image_sizes_x=[]
    
    for bin in range(dates.shape[0]):
        try:
            png_plot = '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/%s_%s_%s_%s.png' \
            % (Cross_Section_Title, dates[bin].strftime('%y'), dates[bin].strftime('%d_%B'), \
               plot)
           
            image64 = Image.open(open(png_plot, 'rb'))
            #print image64.size[1]
                
            image_sizes_x.append(image64.size[0])
            image_sizes_y.append(image64.size[1])
        except Exception:
            PrintException()

print image_sizes_y            
width=sum(image_sizes_x)
height=max(image_sizes_y) * len(plot_vars)



print width
print height
        
blank_image = Image.new("RGB", (width,height), "white")

y_pos=0

for plot in plot_vars:
    x_pos=0
    
    for bin in range(dates.shape[0])[1::]:
        
        try:
            png_plot = '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/%s_%s_%s_%s.png' \
            % (Cross_Section_Title, dates[bin].strftime('%y'), dates[bin].strftime('%d_%B'), \
            plot)
            image64 = Image.open(open(png_plot, 'rb'))
            blank_image.paste(image64, (x_pos,y_pos))
            #print x_pos
            x_pos+=max(image_sizes_x)
    
        except Exception:
            PrintException()
    y_pos+=max(image_sizes_y)
    #img = Image.open(open("c:\python27\IMG_0707.png", 'rb'))


    #out = out_image + image_num + ".jpg"

#blank_image.paste(image64, (0,0))
#blank_image.paste(image641, (400,0))
#blank_image.paste(image642, (0,300))
#blank_image.paste(image643, (400,300))
blank_image.save(out_image, dpi=(360,360))


EXCEPTION IN (<ipython-input-38-023f2c42f065>, LINE 34 "image64 = Image.open(open(png_plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/Vizag_to_Kandahar_11_01_May_Theta_e_sat_time_axis_diff_plus_minus_1.png'
EXCEPTION IN (<ipython-input-38-023f2c42f065>, LINE 34 "image64 = Image.open(open(png_plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/Vizag_to_Kandahar_11_08_May_Theta_e_sat_time_axis_diff_plus_minus_1.png'
EXCEPTION IN (<ipython-input-38-023f2c42f065>, LINE 34 "image64 = Image.open(open(png_plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/Vizag_to_Kandahar_11_01_May_Theta_e_sat_time_axis_diff.png'
EXCEPTION IN (<ipython-input-38-023f2c42f065>, LINE 34 "image64 = Image.open(open(png_plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/Vizag_to_Kandahar_11_08_May_Theta_e_sat_time_axis_diff.png'
[602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602]
22260
1204
EXCEPTION IN (<ipython-input-38-023f2c42f065>, LINE 62 "image64 = Image.open(open(png_plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/Vizag_to_Kandahar_11_08_May_Theta_e_sat_time_axis_diff_plus_minus_1.png'
EXCEPTION IN (<ipython-input-38-023f2c42f065>, LINE 62 "image64 = Image.open(open(png_plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/Vizag_to_Kandahar_11_08_May_Theta_e_sat_time_axis_diff.png'

In [224]:
# CAPE CIN file list
import Image
import glob

plot_files = glob.glob('/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/*20110501_20111001_CAPE_CIN_Climatology_Station_Time_Plot.png')
print plot_files
out_image = "/nfs/a90/eepdw/Figures/Radiosonde/CAPE_CIN_line_plot_together_%s_%s.png" \
            % (date_min.strftime('%Y%m%d'), date_max.strftime('%Y%m%d'), )

image_sizes_y=[]
image_sizes_x=[]

for plot in plot_files:
    
    
    
    try:
            
            image64 = Image.open(open(plot, 'rb'))
            #print image64.size[1]
                
            image_sizes_x.append(image64.size[0])
            image_sizes_y.append(image64.size[1])
    except Exception:
            PrintException()

print image_sizes_y            
#width=sum(image_sizes_x)
width=max(image_sizes_x)
height=max(image_sizes_y) * len(plot_files)



print width
print height
        
blank_image = Image.new("RGB", (width,height), "white")

y_pos=0

for plot in plot_files:
    x_pos=0
        
    try:
            
            image64 = Image.open(open(plot, 'rb'))
            blank_image.paste(image64, (x_pos,y_pos))
            #print x_pos
            #x_pos+=max(image_sizes_x)
    
    except Exception:
            PrintException()
    y_pos+=max(image_sizes_y)
    #img = Image.open(open("c:\python27\IMG_0707.png", 'rb'))


    #out = out_image + image_num + ".jpg"

#blank_image.paste(image64, (0,0))
#blank_image.paste(image641, (400,0))
#blank_image.paste(image642, (0,300))
#blank_image.paste(image643, (400,300))
blank_image.save(out_image, dpi=(360,360))


['/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/43003_20110501_20111001_CAPE_CIN_Climatology_Station_Time_Plot.png', '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/43014_20110501_20111001_CAPE_CIN_Climatology_Station_Time_Plot.png', '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/42867_20110501_20111001_CAPE_CIN_Climatology_Station_Time_Plot.png', '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/43371_20110501_20111001_CAPE_CIN_Climatology_Station_Time_Plot.png', '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/43353_20110501_20111001_CAPE_CIN_Climatology_Station_Time_Plot.png', '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/43285_20110501_20111001_CAPE_CIN_Climatology_Station_Time_Plot.png', '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/43192_20110501_20111001_CAPE_CIN_Climatology_Station_Time_Plot.png', '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/43150_20110501_20111001_CAPE_CIN_Climatology_Station_Time_Plot.png', '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/42339_20110501_20111001_CAPE_CIN_Climatology_Station_Time_Plot.png', '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/40990_20110501_20111001_CAPE_CIN_Climatology_Station_Time_Plot.png', '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/40948_20110501_20111001_CAPE_CIN_Climatology_Station_Time_Plot.png']
[278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278]
378
3058

In [225]:
# PBL etc file list
import Image
import glob

plot_files = glob.glob('/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/*20110501_20111001_PBL_etc_Climatology_Station_Time_Plot.png')
print plot_files
out_image = "/nfs/a90/eepdw/Figures/Radiosonde/PBL_etc_line_plot_together_%s_%s.png" \
            % (date_min.strftime('%Y%m%d'), date_max.strftime('%Y%m%d'), )

image_sizes_y=[]
image_sizes_x=[]
for plot in plot_files:
    
    
    
    try:
            
            image64 = Image.open(open(plot, 'rb'))
            #print image64.size[1]
                
            image_sizes_x.append(image64.size[0])
            image_sizes_y.append(image64.size[1])
    except Exception:
            PrintException()

print image_sizes_y            
#width=sum(image_sizes_x)
width=max(image_sizes_x)
height=max(image_sizes_y) * len(plot_files)



print width
print height
        
blank_image = Image.new("RGB", (width,height), "white")

y_pos=0

for plot in plot_files:
    x_pos=0
        
    try:
            
            image64 = Image.open(open(plot, 'rb'))
            blank_image.paste(image64, (x_pos,y_pos))
            #print x_pos
            #x_pos+=max(image_sizes_x)
    
    except Exception:
            PrintException()
    y_pos+=max(image_sizes_y)
    #img = Image.open(open("c:\python27\IMG_0707.png", 'rb'))


    #out = out_image + image_num + ".jpg"

#blank_image.paste(image64, (0,0))
#blank_image.paste(image641, (400,0))
#blank_image.paste(image642, (0,300))
#blank_image.paste(image643, (400,300))
blank_image.save(out_image, dpi=(360,360))


['/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/43003_20110501_20111001_PBL_etc_Climatology_Station_Time_Plot.png', '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/43014_20110501_20111001_PBL_etc_Climatology_Station_Time_Plot.png', '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/42867_20110501_20111001_PBL_etc_Climatology_Station_Time_Plot.png', '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/43371_20110501_20111001_PBL_etc_Climatology_Station_Time_Plot.png', '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/43353_20110501_20111001_PBL_etc_Climatology_Station_Time_Plot.png', '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/43285_20110501_20111001_PBL_etc_Climatology_Station_Time_Plot.png', '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/43192_20110501_20111001_PBL_etc_Climatology_Station_Time_Plot.png', '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/43150_20110501_20111001_PBL_etc_Climatology_Station_Time_Plot.png', '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/42339_20110501_20111001_PBL_etc_Climatology_Station_Time_Plot.png', '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/40990_20110501_20111001_PBL_etc_Climatology_Station_Time_Plot.png', '/nfs/a90/eepdw/Figures/Radiosonde/Cross_Sections/40948_20110501_20111001_PBL_etc_Climatology_Station_Time_Plot.png']
[278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278]
389
3058

In [35]:
# EMBRACE Rainfall Map

import glob

import imp
import math

import PIL
from PIL import ImageFont
from PIL import Image
from PIL import ImageDraw

font = ImageFont.truetype("/usr/share/fonts/dejavu-lgc/DejaVuLGCSerif.ttf",50)

model_name_convert_legend = imp.load_source('util', '/nfs/see-fs-01_users/eepdw/python_scripts/modules/model_name_convert_legend.py')

no_of_images_across=7
experiment_ids_p = ['djznw', 'djzny', 'djznq', 'dklzq', 'dkmbq', 'dkjxq' ] # Most of Params
experiment_ids_e = ['dklwu', 'dklyu', 'djzns', 'dkbhu', 'djznu', 'dkhgu'] # Most of Explicit
    
#experiment_ids = ['djznw', 'djzny', 'djznq', 'djzns', 'dkjxq', 'dklyu', 'dkmbq', 'dklwu', 'dklzq', 'dkbhu', 'djznu', 'dkhgu' ] # All 12

for experiment_id in experiment_ids_p:
    
   try:    
    
    plot_files = glob.glob('/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_day/%s_rain_mean_by_day_*_short_title.png' % (experiment_id, experiment_id))
    print plot_files
    out_image = "/nfs/a90/eepdw/Figures/EMBRACE/%s/%s_daily_rainfall_plot_grid.png" % (experiment_id, experiment_id)

    image_sizes_y=[]
    image_sizes_x=[]
    
    import pdb
    pdb.set_trace()
    for plot in plot_files:
    
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            #print image64.size[1]
                
            image_sizes_x.append(image64.size[0])
            image_sizes_y.append(image64.size[1])
        except Exception:
            PrintException()

    print image_sizes_y            
#width=sum(image_sizes_x)
    width=max(image_sizes_x)*no_of_images_across
    height=max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across)))
    
    #print width
    #print height
        
    blank_image = Image.new("RGB", (width,height), "white")

    y_pos=0
    x_pos=0
    across_count=0

    for plot in plot_files:
    
        across_count+=1        
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            blank_image.paste(image64, (x_pos,y_pos))
            #print x_pos
            #x_pos+=max(image_sizes_x)
    
        except Exception:
            PrintException()
    
        x_pos+=max(image_sizes_x)
    
        if across_count==no_of_images_across:
            y_pos+=max(image_sizes_y)
            x_pos=0
            across_count=0
        
    draw = ImageDraw.Draw(blank_image)
    model_info='%s Parametrised' % (model_name_convert_title.main(experiment_id))

    draw.text((x_pos, y_pos+max(image_sizes_y)/2), model_info, (0,0,0), font=font)

    blank_image.save(out_image, dpi=(360,360))
    
   except Exception:
            PrintException()

    
for experiment_id in experiment_ids_e:
    
   try: 
    
    plot_files = glob.glob('/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_day/%s_rain_mean_by_day_*_short_title.png' % (experiment_id, experiment_id))
    print plot_files
    out_image = "/nfs/a90/eepdw/Figures/EMBRACE/%s/%s_daily_rainfall_plot_grid.png" % (experiment_id, experiment_id)

    image_sizes_y=[]
    image_sizes_x=[]
    for plot in plot_files:
    
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            #print image64.size[1]
                
            image_sizes_x.append(image64.size[0])
            image_sizes_y.append(image64.size[1])
        except Exception:
            PrintException()

    #print image_sizes_y            
#width=sum(image_sizes_x)
    width=max(image_sizes_x)*no_of_images_across
    height=max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across)))

    print width
    print height
        
    blank_image = Image.new("RGB", (width,height), "white")

    y_pos=0
    x_pos=0
    across_count=0

    for plot in plot_files:
    
        across_count+=1        
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            blank_image.paste(image64, (x_pos,y_pos))
            #print x_pos
            #x_pos+=max(image_sizes_x)
    
        except Exception:
            PrintException()
    
        x_pos+=max(image_sizes_x)
    
        if across_count==no_of_images_across:
            y_pos+=max(image_sizes_y)
            x_pos=0
            across_count=0
        
    draw = ImageDraw.Draw(blank_image)
        
    model_info='%s Explicit' % (model_name_convert_title.main(experiment_id))

    draw.text((x_pos, y_pos+max(image_sizes_y)/2), model_info, (0,0,0), font=font)

    blank_image.save(out_image, dpi=(360,360))
    
   except Exception:
            PrintException()
import os  
os.system("\cp /nfs/a90/eepdw/Figures/EMBRACE/*/*_daily_rainfall_plot_grid.png /nfs/a90/eepdw/Figures/EMBRACE/Daily_Rainfall_Maps/")


['/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_day/djznw_rain_mean_by_day_Aug19-Aug20_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_day/djznw_rain_mean_by_day_Aug20-Aug21_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_day/djznw_rain_mean_by_day_Aug21-Aug22_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_day/djznw_rain_mean_by_day_Aug22-Aug23_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_day/djznw_rain_mean_by_day_Aug23-Aug24_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_day/djznw_rain_mean_by_day_Aug24-Aug25_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_day/djznw_rain_mean_by_day_Aug25-Aug26_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_day/djznw_rain_mean_by_day_Aug26-Aug26_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_day/djznw_rain_mean_by_day_Aug27-Aug28_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_day/djznw_rain_mean_by_day_Aug28-Aug29_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_day/djznw_rain_mean_by_day_Aug29-Aug30_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_day/djznw_rain_mean_by_day_Aug30-Aug31_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_day/djznw_rain_mean_by_day_Aug31-Sep01_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_day/djznw_rain_mean_by_day_Sep01-Sep01_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_day/djznw_rain_mean_by_day_Sep02-Sep03_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_day/djznw_rain_mean_by_day_Sep03-Sep04_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_day/djznw_rain_mean_by_day_Sep04-Sep05_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_day/djznw_rain_mean_by_day_Sep05-Sep06_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_day/djznw_rain_mean_by_day_Sep06-Sep07_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_day/djznw_rain_mean_by_day_Sep07-Sep07_short_title.png']
> <ipython-input-35-2e8fbfc5d36e>(36)<module>()
-> for plot in plot_files:
---------------------------------------------------------------------------
KeyboardInterrupt                         Traceback (most recent call last)
<ipython-input-35-2e8fbfc5d36e> in <module>()
     34     import pdb
     35     pdb.set_trace()
---> 36     for plot in plot_files:
     37 
     38         try:

<ipython-input-35-2e8fbfc5d36e> in <module>()
     34     import pdb
     35     pdb.set_trace()
---> 36     for plot in plot_files:
     37 
     38         try:

/apps/canopy-1.4.1/appdata/canopy-1.4.1.1975.rh5-x86_64/lib/python2.7/bdb.pyc in trace_dispatch(self, frame, event, arg)
     47             return # None
     48         if event == 'line':
---> 49             return self.dispatch_line(frame)
     50         if event == 'call':
     51             return self.dispatch_call(frame, arg)

/apps/canopy-1.4.1/appdata/canopy-1.4.1.1975.rh5-x86_64/lib/python2.7/bdb.pyc in dispatch_line(self, frame)
     65     def dispatch_line(self, frame):
     66         if self.stop_here(frame) or self.break_here(frame):
---> 67             self.user_line(frame)
     68             if self.quitting: raise BdbQuit
     69         return self.trace_dispatch

/apps/canopy-1.4.1/appdata/canopy-1.4.1.1975.rh5-x86_64/lib/python2.7/pdb.pyc in user_line(self, frame)
    156             self._wait_for_mainpyfile = 0
    157         if self.bp_commands(frame):
--> 158             self.interaction(frame, None)
    159 
    160     def bp_commands(self,frame):

/apps/canopy-1.4.1/appdata/canopy-1.4.1.1975.rh5-x86_64/lib/python2.7/pdb.pyc in interaction(self, frame, traceback)
    208         self.setup(frame, traceback)
    209         self.print_stack_entry(self.stack[self.curindex])
--> 210         self.cmdloop()
    211         self.forget()
    212 

/apps/canopy-1.4.1/appdata/canopy-1.4.1.1975.rh5-x86_64/lib/python2.7/cmd.pyc in cmdloop(self, intro)
    128                     if self.use_rawinput:
    129                         try:
--> 130                             line = raw_input(self.prompt)
    131                         except EOFError:
    132                             line = 'EOF'

/apps/canopy-1.4.1/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/kernel/zmq/ipkernel.py in <lambda>(prompt)
    361         # raw_input in the user namespace.
    362         if content.get('allow_stdin', False):
--> 363             raw_input = lambda prompt='': self._raw_input(prompt, ident, parent)
    364             input = lambda prompt='': eval(raw_input(prompt))
    365         else:

/apps/canopy-1.4.1/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/kernel/zmq/ipkernel.py in _raw_input(self, prompt, ident, parent)
    763             except KeyboardInterrupt:
    764                 # re-raise KeyboardInterrupt, to truncate traceback
--> 765                 raise KeyboardInterrupt
    766             else:
    767                 break

KeyboardInterrupt: 

In [40]:
# EMBRACE Rainfall and 925 height Map

import glob

import imp
import math

import PIL
from PIL import ImageFont
from PIL import Image
from PIL import ImageDraw

font = ImageFont.truetype("/usr/share/fonts/dejavu-lgc/DejaVuLGCSerif.ttf",50)

model_name_convert_legend = imp.load_source('util', '/nfs/see-fs-01_users/eepdw/python_scripts/modules/model_name_convert_legend.py')
model_name_convert_title = imp.load_source('util', '/nfs/see-fs-01_users/eepdw/python_scripts/modules/model_name_convert_title.py')

no_of_images_across=5

import datetime

dtmin = datetime.datetime(2011,8,18,0,0,0)
dtmax = datetime.datetime(2011,9,8,0,0,0)
date_list = [(dtmin + datetime.timedelta(days=x)).strftime('%d%b') for x in range(0, (dtmax-dtmin).days)]


p_lev=925
    
experiment_ids = ['djznw', 'djzny', 'djznq', 'djzns', 'dkjxq', 'dklyu', 'dkmbq', 'dklwu', 'dklzq', 'dkbhu', 'djznu', 'dkhgu' ] # All 12
#experiment_ids = ['dkbhu']
for experiment_id in experiment_ids:
    
   plot_files_append = []
    
   plot_files = glob.glob(\
    '/nfs/a90/eepdw/Figures/EMBRACE/%s/408_and_rain_mean_by_day/%s_408_and_rain_mean_by_day_%s_hPa_and_geop_height_*_short_title.png' \
    % (experiment_id, experiment_id, p_lev))
    
   try:    
    
    for d in date_list:
        if d in ' '.join(plot_files):
            plot_files_append.append(\
            '/nfs/a90/eepdw/Figures/EMBRACE/%s/408_and_rain_mean_by_day/%s_408_and_rain_mean_by_day_%s_hPa_and_geop_height_%s_short_title.png' \
    % (experiment_id, experiment_id, p_lev, d)) 
            
        
    print plot_files_append
    out_image = "/nfs/a90/eepdw/Figures/EMBRACE/%s/%s_408_and_rain_mean_by_day_%s_hPa_plot_grid.png" \
                % (experiment_id, experiment_id, p_lev)

    image_sizes_y=[]
    image_sizes_x=[]
    
    import pdb
    #pdb.set_trace()
    
    for plot in plot_files_append:
    
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            #print image64.size[1]
                
            image_sizes_x.append(image64.size[0])
            image_sizes_y.append(image64.size[1])
        except Exception:
            PrintException()

    print image_sizes_y            
#width=sum(image_sizes_x)
    width=max(image_sizes_x)*no_of_images_across
    height=max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across)))
    
    #print width
    #print height
        
    blank_image = Image.new("RGB", (width,height), "white")

    y_pos=0
    x_pos=0
    across_count=0

    for plot in plot_files_append:
    
        across_count+=1        
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            blank_image.paste(image64, (x_pos,y_pos))
            #print x_pos
            #x_pos+=max(image_sizes_x)
    
        except Exception:
            PrintException()
    
        x_pos+=max(image_sizes_x)
    
        if across_count==no_of_images_across:
            y_pos+=max(image_sizes_y)
            x_pos=0
            across_count=0
        
    draw = ImageDraw.Draw(blank_image)
    model_info='%s' % (model_name_convert_title.main(experiment_id))

    draw.text((x_pos, y_pos+max(image_sizes_y)/2), model_info, (0,0,0), font=font)

    blank_image.save(out_image, dpi=(360,360))
    

    
   except Exception:
            PrintException()
import os  
os.system("\cp /nfs/a90/eepdw/Figures/EMBRACE/*/*_daily_rainfall__and408_%splot_grid.png /nfs/a90/eepdw/Figures/EMBRACE/Daily_Rainfall_Maps/")


['/nfs/a90/eepdw/Figures/EMBRACE/djznw/408_and_rain_mean_by_day/djznw_408_and_rain_mean_by_day_925_hPa_and_geop_height_18Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/408_and_rain_mean_by_day/djznw_408_and_rain_mean_by_day_925_hPa_and_geop_height_19Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/408_and_rain_mean_by_day/djznw_408_and_rain_mean_by_day_925_hPa_and_geop_height_20Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/408_and_rain_mean_by_day/djznw_408_and_rain_mean_by_day_925_hPa_and_geop_height_21Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/408_and_rain_mean_by_day/djznw_408_and_rain_mean_by_day_925_hPa_and_geop_height_22Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/408_and_rain_mean_by_day/djznw_408_and_rain_mean_by_day_925_hPa_and_geop_height_23Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/408_and_rain_mean_by_day/djznw_408_and_rain_mean_by_day_925_hPa_and_geop_height_24Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/408_and_rain_mean_by_day/djznw_408_and_rain_mean_by_day_925_hPa_and_geop_height_25Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/408_and_rain_mean_by_day/djznw_408_and_rain_mean_by_day_925_hPa_and_geop_height_26Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/408_and_rain_mean_by_day/djznw_408_and_rain_mean_by_day_925_hPa_and_geop_height_27Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/408_and_rain_mean_by_day/djznw_408_and_rain_mean_by_day_925_hPa_and_geop_height_28Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/408_and_rain_mean_by_day/djznw_408_and_rain_mean_by_day_925_hPa_and_geop_height_29Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/408_and_rain_mean_by_day/djznw_408_and_rain_mean_by_day_925_hPa_and_geop_height_30Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/408_and_rain_mean_by_day/djznw_408_and_rain_mean_by_day_925_hPa_and_geop_height_31Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/408_and_rain_mean_by_day/djznw_408_and_rain_mean_by_day_925_hPa_and_geop_height_01Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/408_and_rain_mean_by_day/djznw_408_and_rain_mean_by_day_925_hPa_and_geop_height_02Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/408_and_rain_mean_by_day/djznw_408_and_rain_mean_by_day_925_hPa_and_geop_height_03Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/408_and_rain_mean_by_day/djznw_408_and_rain_mean_by_day_925_hPa_and_geop_height_04Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/408_and_rain_mean_by_day/djznw_408_and_rain_mean_by_day_925_hPa_and_geop_height_05Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/408_and_rain_mean_by_day/djznw_408_and_rain_mean_by_day_925_hPa_and_geop_height_06Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/408_and_rain_mean_by_day/djznw_408_and_rain_mean_by_day_925_hPa_and_geop_height_07Sep_short_title.png']
[669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669]
EXCEPTION IN (<ipython-input-40-8ab4495b8b8b>, LINE 100 "model_info='%s' % (model_name_convert_title.main(experiment_id))"): not all arguments converted during string formatting
['/nfs/a90/eepdw/Figures/EMBRACE/djzny/408_and_rain_mean_by_day/djzny_408_and_rain_mean_by_day_925_hPa_and_geop_height_18Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/408_and_rain_mean_by_day/djzny_408_and_rain_mean_by_day_925_hPa_and_geop_height_19Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/408_and_rain_mean_by_day/djzny_408_and_rain_mean_by_day_925_hPa_and_geop_height_20Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/408_and_rain_mean_by_day/djzny_408_and_rain_mean_by_day_925_hPa_and_geop_height_21Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/408_and_rain_mean_by_day/djzny_408_and_rain_mean_by_day_925_hPa_and_geop_height_22Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/408_and_rain_mean_by_day/djzny_408_and_rain_mean_by_day_925_hPa_and_geop_height_23Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/408_and_rain_mean_by_day/djzny_408_and_rain_mean_by_day_925_hPa_and_geop_height_24Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/408_and_rain_mean_by_day/djzny_408_and_rain_mean_by_day_925_hPa_and_geop_height_25Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/408_and_rain_mean_by_day/djzny_408_and_rain_mean_by_day_925_hPa_and_geop_height_26Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/408_and_rain_mean_by_day/djzny_408_and_rain_mean_by_day_925_hPa_and_geop_height_27Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/408_and_rain_mean_by_day/djzny_408_and_rain_mean_by_day_925_hPa_and_geop_height_28Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/408_and_rain_mean_by_day/djzny_408_and_rain_mean_by_day_925_hPa_and_geop_height_29Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/408_and_rain_mean_by_day/djzny_408_and_rain_mean_by_day_925_hPa_and_geop_height_30Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/408_and_rain_mean_by_day/djzny_408_and_rain_mean_by_day_925_hPa_and_geop_height_31Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/408_and_rain_mean_by_day/djzny_408_and_rain_mean_by_day_925_hPa_and_geop_height_01Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/408_and_rain_mean_by_day/djzny_408_and_rain_mean_by_day_925_hPa_and_geop_height_02Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/408_and_rain_mean_by_day/djzny_408_and_rain_mean_by_day_925_hPa_and_geop_height_03Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/408_and_rain_mean_by_day/djzny_408_and_rain_mean_by_day_925_hPa_and_geop_height_04Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/408_and_rain_mean_by_day/djzny_408_and_rain_mean_by_day_925_hPa_and_geop_height_05Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/408_and_rain_mean_by_day/djzny_408_and_rain_mean_by_day_925_hPa_and_geop_height_06Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/408_and_rain_mean_by_day/djzny_408_and_rain_mean_by_day_925_hPa_and_geop_height_07Sep_short_title.png']
[669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669]
EXCEPTION IN (<ipython-input-40-8ab4495b8b8b>, LINE 100 "model_info='%s' % (model_name_convert_title.main(experiment_id))"): not all arguments converted during string formatting
['/nfs/a90/eepdw/Figures/EMBRACE/djznq/408_and_rain_mean_by_day/djznq_408_and_rain_mean_by_day_925_hPa_and_geop_height_18Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/408_and_rain_mean_by_day/djznq_408_and_rain_mean_by_day_925_hPa_and_geop_height_19Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/408_and_rain_mean_by_day/djznq_408_and_rain_mean_by_day_925_hPa_and_geop_height_20Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/408_and_rain_mean_by_day/djznq_408_and_rain_mean_by_day_925_hPa_and_geop_height_21Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/408_and_rain_mean_by_day/djznq_408_and_rain_mean_by_day_925_hPa_and_geop_height_22Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/408_and_rain_mean_by_day/djznq_408_and_rain_mean_by_day_925_hPa_and_geop_height_23Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/408_and_rain_mean_by_day/djznq_408_and_rain_mean_by_day_925_hPa_and_geop_height_24Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/408_and_rain_mean_by_day/djznq_408_and_rain_mean_by_day_925_hPa_and_geop_height_25Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/408_and_rain_mean_by_day/djznq_408_and_rain_mean_by_day_925_hPa_and_geop_height_26Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/408_and_rain_mean_by_day/djznq_408_and_rain_mean_by_day_925_hPa_and_geop_height_27Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/408_and_rain_mean_by_day/djznq_408_and_rain_mean_by_day_925_hPa_and_geop_height_28Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/408_and_rain_mean_by_day/djznq_408_and_rain_mean_by_day_925_hPa_and_geop_height_29Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/408_and_rain_mean_by_day/djznq_408_and_rain_mean_by_day_925_hPa_and_geop_height_30Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/408_and_rain_mean_by_day/djznq_408_and_rain_mean_by_day_925_hPa_and_geop_height_31Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/408_and_rain_mean_by_day/djznq_408_and_rain_mean_by_day_925_hPa_and_geop_height_01Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/408_and_rain_mean_by_day/djznq_408_and_rain_mean_by_day_925_hPa_and_geop_height_02Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/408_and_rain_mean_by_day/djznq_408_and_rain_mean_by_day_925_hPa_and_geop_height_03Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/408_and_rain_mean_by_day/djznq_408_and_rain_mean_by_day_925_hPa_and_geop_height_04Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/408_and_rain_mean_by_day/djznq_408_and_rain_mean_by_day_925_hPa_and_geop_height_05Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/408_and_rain_mean_by_day/djznq_408_and_rain_mean_by_day_925_hPa_and_geop_height_06Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/408_and_rain_mean_by_day/djznq_408_and_rain_mean_by_day_925_hPa_and_geop_height_07Sep_short_title.png']
[669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669]
EXCEPTION IN (<ipython-input-40-8ab4495b8b8b>, LINE 100 "model_info='%s' % (model_name_convert_title.main(experiment_id))"): not all arguments converted during string formatting
['/nfs/a90/eepdw/Figures/EMBRACE/djzns/408_and_rain_mean_by_day/djzns_408_and_rain_mean_by_day_925_hPa_and_geop_height_18Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzns/408_and_rain_mean_by_day/djzns_408_and_rain_mean_by_day_925_hPa_and_geop_height_19Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzns/408_and_rain_mean_by_day/djzns_408_and_rain_mean_by_day_925_hPa_and_geop_height_20Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzns/408_and_rain_mean_by_day/djzns_408_and_rain_mean_by_day_925_hPa_and_geop_height_21Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzns/408_and_rain_mean_by_day/djzns_408_and_rain_mean_by_day_925_hPa_and_geop_height_22Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzns/408_and_rain_mean_by_day/djzns_408_and_rain_mean_by_day_925_hPa_and_geop_height_23Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzns/408_and_rain_mean_by_day/djzns_408_and_rain_mean_by_day_925_hPa_and_geop_height_24Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzns/408_and_rain_mean_by_day/djzns_408_and_rain_mean_by_day_925_hPa_and_geop_height_25Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzns/408_and_rain_mean_by_day/djzns_408_and_rain_mean_by_day_925_hPa_and_geop_height_26Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzns/408_and_rain_mean_by_day/djzns_408_and_rain_mean_by_day_925_hPa_and_geop_height_27Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzns/408_and_rain_mean_by_day/djzns_408_and_rain_mean_by_day_925_hPa_and_geop_height_28Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzns/408_and_rain_mean_by_day/djzns_408_and_rain_mean_by_day_925_hPa_and_geop_height_29Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzns/408_and_rain_mean_by_day/djzns_408_and_rain_mean_by_day_925_hPa_and_geop_height_30Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzns/408_and_rain_mean_by_day/djzns_408_and_rain_mean_by_day_925_hPa_and_geop_height_31Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzns/408_and_rain_mean_by_day/djzns_408_and_rain_mean_by_day_925_hPa_and_geop_height_01Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzns/408_and_rain_mean_by_day/djzns_408_and_rain_mean_by_day_925_hPa_and_geop_height_02Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzns/408_and_rain_mean_by_day/djzns_408_and_rain_mean_by_day_925_hPa_and_geop_height_03Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzns/408_and_rain_mean_by_day/djzns_408_and_rain_mean_by_day_925_hPa_and_geop_height_04Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzns/408_and_rain_mean_by_day/djzns_408_and_rain_mean_by_day_925_hPa_and_geop_height_05Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzns/408_and_rain_mean_by_day/djzns_408_and_rain_mean_by_day_925_hPa_and_geop_height_06Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzns/408_and_rain_mean_by_day/djzns_408_and_rain_mean_by_day_925_hPa_and_geop_height_07Sep_short_title.png']
[669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669]
EXCEPTION IN (<ipython-input-40-8ab4495b8b8b>, LINE 100 "model_info='%s' % (model_name_convert_title.main(experiment_id))"): not all arguments converted during string formatting
[]
[]
EXCEPTION IN (<ipython-input-40-8ab4495b8b8b>, LINE 67 "width=max(image_sizes_x)*no_of_images_across"): max() arg is an empty sequence
['/nfs/a90/eepdw/Figures/EMBRACE/dklyu/408_and_rain_mean_by_day/dklyu_408_and_rain_mean_by_day_925_hPa_and_geop_height_18Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/408_and_rain_mean_by_day/dklyu_408_and_rain_mean_by_day_925_hPa_and_geop_height_19Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/408_and_rain_mean_by_day/dklyu_408_and_rain_mean_by_day_925_hPa_and_geop_height_20Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/408_and_rain_mean_by_day/dklyu_408_and_rain_mean_by_day_925_hPa_and_geop_height_21Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/408_and_rain_mean_by_day/dklyu_408_and_rain_mean_by_day_925_hPa_and_geop_height_22Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/408_and_rain_mean_by_day/dklyu_408_and_rain_mean_by_day_925_hPa_and_geop_height_23Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/408_and_rain_mean_by_day/dklyu_408_and_rain_mean_by_day_925_hPa_and_geop_height_24Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/408_and_rain_mean_by_day/dklyu_408_and_rain_mean_by_day_925_hPa_and_geop_height_25Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/408_and_rain_mean_by_day/dklyu_408_and_rain_mean_by_day_925_hPa_and_geop_height_26Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/408_and_rain_mean_by_day/dklyu_408_and_rain_mean_by_day_925_hPa_and_geop_height_27Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/408_and_rain_mean_by_day/dklyu_408_and_rain_mean_by_day_925_hPa_and_geop_height_28Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/408_and_rain_mean_by_day/dklyu_408_and_rain_mean_by_day_925_hPa_and_geop_height_29Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/408_and_rain_mean_by_day/dklyu_408_and_rain_mean_by_day_925_hPa_and_geop_height_30Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/408_and_rain_mean_by_day/dklyu_408_and_rain_mean_by_day_925_hPa_and_geop_height_31Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/408_and_rain_mean_by_day/dklyu_408_and_rain_mean_by_day_925_hPa_and_geop_height_01Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/408_and_rain_mean_by_day/dklyu_408_and_rain_mean_by_day_925_hPa_and_geop_height_02Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/408_and_rain_mean_by_day/dklyu_408_and_rain_mean_by_day_925_hPa_and_geop_height_03Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/408_and_rain_mean_by_day/dklyu_408_and_rain_mean_by_day_925_hPa_and_geop_height_04Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/408_and_rain_mean_by_day/dklyu_408_and_rain_mean_by_day_925_hPa_and_geop_height_05Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/408_and_rain_mean_by_day/dklyu_408_and_rain_mean_by_day_925_hPa_and_geop_height_06Sep_short_title.png']
[669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669]
EXCEPTION IN (<ipython-input-40-8ab4495b8b8b>, LINE 100 "model_info='%s' % (model_name_convert_title.main(experiment_id))"): not all arguments converted during string formatting
['/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_and_rain_mean_by_day/dkmbq_408_and_rain_mean_by_day_925_hPa_and_geop_height_18Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_and_rain_mean_by_day/dkmbq_408_and_rain_mean_by_day_925_hPa_and_geop_height_19Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_and_rain_mean_by_day/dkmbq_408_and_rain_mean_by_day_925_hPa_and_geop_height_20Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_and_rain_mean_by_day/dkmbq_408_and_rain_mean_by_day_925_hPa_and_geop_height_21Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_and_rain_mean_by_day/dkmbq_408_and_rain_mean_by_day_925_hPa_and_geop_height_22Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_and_rain_mean_by_day/dkmbq_408_and_rain_mean_by_day_925_hPa_and_geop_height_23Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_and_rain_mean_by_day/dkmbq_408_and_rain_mean_by_day_925_hPa_and_geop_height_24Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_and_rain_mean_by_day/dkmbq_408_and_rain_mean_by_day_925_hPa_and_geop_height_25Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_and_rain_mean_by_day/dkmbq_408_and_rain_mean_by_day_925_hPa_and_geop_height_26Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_and_rain_mean_by_day/dkmbq_408_and_rain_mean_by_day_925_hPa_and_geop_height_27Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_and_rain_mean_by_day/dkmbq_408_and_rain_mean_by_day_925_hPa_and_geop_height_28Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_and_rain_mean_by_day/dkmbq_408_and_rain_mean_by_day_925_hPa_and_geop_height_29Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_and_rain_mean_by_day/dkmbq_408_and_rain_mean_by_day_925_hPa_and_geop_height_30Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_and_rain_mean_by_day/dkmbq_408_and_rain_mean_by_day_925_hPa_and_geop_height_31Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_and_rain_mean_by_day/dkmbq_408_and_rain_mean_by_day_925_hPa_and_geop_height_01Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_and_rain_mean_by_day/dkmbq_408_and_rain_mean_by_day_925_hPa_and_geop_height_02Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_and_rain_mean_by_day/dkmbq_408_and_rain_mean_by_day_925_hPa_and_geop_height_03Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_and_rain_mean_by_day/dkmbq_408_and_rain_mean_by_day_925_hPa_and_geop_height_04Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_and_rain_mean_by_day/dkmbq_408_and_rain_mean_by_day_925_hPa_and_geop_height_05Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_and_rain_mean_by_day/dkmbq_408_and_rain_mean_by_day_925_hPa_and_geop_height_06Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_and_rain_mean_by_day/dkmbq_408_and_rain_mean_by_day_925_hPa_and_geop_height_07Sep_short_title.png']
[669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669]
EXCEPTION IN (<ipython-input-40-8ab4495b8b8b>, LINE 100 "model_info='%s' % (model_name_convert_title.main(experiment_id))"): not all arguments converted during string formatting
['/nfs/a90/eepdw/Figures/EMBRACE/dklwu/408_and_rain_mean_by_day/dklwu_408_and_rain_mean_by_day_925_hPa_and_geop_height_18Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklwu/408_and_rain_mean_by_day/dklwu_408_and_rain_mean_by_day_925_hPa_and_geop_height_19Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklwu/408_and_rain_mean_by_day/dklwu_408_and_rain_mean_by_day_925_hPa_and_geop_height_20Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklwu/408_and_rain_mean_by_day/dklwu_408_and_rain_mean_by_day_925_hPa_and_geop_height_21Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklwu/408_and_rain_mean_by_day/dklwu_408_and_rain_mean_by_day_925_hPa_and_geop_height_22Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklwu/408_and_rain_mean_by_day/dklwu_408_and_rain_mean_by_day_925_hPa_and_geop_height_23Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklwu/408_and_rain_mean_by_day/dklwu_408_and_rain_mean_by_day_925_hPa_and_geop_height_24Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklwu/408_and_rain_mean_by_day/dklwu_408_and_rain_mean_by_day_925_hPa_and_geop_height_25Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklwu/408_and_rain_mean_by_day/dklwu_408_and_rain_mean_by_day_925_hPa_and_geop_height_26Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklwu/408_and_rain_mean_by_day/dklwu_408_and_rain_mean_by_day_925_hPa_and_geop_height_27Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklwu/408_and_rain_mean_by_day/dklwu_408_and_rain_mean_by_day_925_hPa_and_geop_height_28Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklwu/408_and_rain_mean_by_day/dklwu_408_and_rain_mean_by_day_925_hPa_and_geop_height_29Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklwu/408_and_rain_mean_by_day/dklwu_408_and_rain_mean_by_day_925_hPa_and_geop_height_30Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklwu/408_and_rain_mean_by_day/dklwu_408_and_rain_mean_by_day_925_hPa_and_geop_height_31Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklwu/408_and_rain_mean_by_day/dklwu_408_and_rain_mean_by_day_925_hPa_and_geop_height_01Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklwu/408_and_rain_mean_by_day/dklwu_408_and_rain_mean_by_day_925_hPa_and_geop_height_02Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklwu/408_and_rain_mean_by_day/dklwu_408_and_rain_mean_by_day_925_hPa_and_geop_height_03Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklwu/408_and_rain_mean_by_day/dklwu_408_and_rain_mean_by_day_925_hPa_and_geop_height_04Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklwu/408_and_rain_mean_by_day/dklwu_408_and_rain_mean_by_day_925_hPa_and_geop_height_05Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklwu/408_and_rain_mean_by_day/dklwu_408_and_rain_mean_by_day_925_hPa_and_geop_height_06Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklwu/408_and_rain_mean_by_day/dklwu_408_and_rain_mean_by_day_925_hPa_and_geop_height_07Sep_short_title.png']
[669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669]
EXCEPTION IN (<ipython-input-40-8ab4495b8b8b>, LINE 100 "model_info='%s' % (model_name_convert_title.main(experiment_id))"): not all arguments converted during string formatting
['/nfs/a90/eepdw/Figures/EMBRACE/dklzq/408_and_rain_mean_by_day/dklzq_408_and_rain_mean_by_day_925_hPa_and_geop_height_18Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/408_and_rain_mean_by_day/dklzq_408_and_rain_mean_by_day_925_hPa_and_geop_height_19Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/408_and_rain_mean_by_day/dklzq_408_and_rain_mean_by_day_925_hPa_and_geop_height_20Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/408_and_rain_mean_by_day/dklzq_408_and_rain_mean_by_day_925_hPa_and_geop_height_21Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/408_and_rain_mean_by_day/dklzq_408_and_rain_mean_by_day_925_hPa_and_geop_height_22Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/408_and_rain_mean_by_day/dklzq_408_and_rain_mean_by_day_925_hPa_and_geop_height_23Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/408_and_rain_mean_by_day/dklzq_408_and_rain_mean_by_day_925_hPa_and_geop_height_24Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/408_and_rain_mean_by_day/dklzq_408_and_rain_mean_by_day_925_hPa_and_geop_height_25Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/408_and_rain_mean_by_day/dklzq_408_and_rain_mean_by_day_925_hPa_and_geop_height_26Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/408_and_rain_mean_by_day/dklzq_408_and_rain_mean_by_day_925_hPa_and_geop_height_27Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/408_and_rain_mean_by_day/dklzq_408_and_rain_mean_by_day_925_hPa_and_geop_height_28Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/408_and_rain_mean_by_day/dklzq_408_and_rain_mean_by_day_925_hPa_and_geop_height_29Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/408_and_rain_mean_by_day/dklzq_408_and_rain_mean_by_day_925_hPa_and_geop_height_30Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/408_and_rain_mean_by_day/dklzq_408_and_rain_mean_by_day_925_hPa_and_geop_height_31Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/408_and_rain_mean_by_day/dklzq_408_and_rain_mean_by_day_925_hPa_and_geop_height_01Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/408_and_rain_mean_by_day/dklzq_408_and_rain_mean_by_day_925_hPa_and_geop_height_02Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/408_and_rain_mean_by_day/dklzq_408_and_rain_mean_by_day_925_hPa_and_geop_height_03Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/408_and_rain_mean_by_day/dklzq_408_and_rain_mean_by_day_925_hPa_and_geop_height_04Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/408_and_rain_mean_by_day/dklzq_408_and_rain_mean_by_day_925_hPa_and_geop_height_05Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/408_and_rain_mean_by_day/dklzq_408_and_rain_mean_by_day_925_hPa_and_geop_height_06Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/408_and_rain_mean_by_day/dklzq_408_and_rain_mean_by_day_925_hPa_and_geop_height_07Sep_short_title.png']
[669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669]
['/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/408_and_rain_mean_by_day/dkbhu_408_and_rain_mean_by_day_925_hPa_and_geop_height_18Aug_short_title.png']
[669]
EXCEPTION IN (<ipython-input-40-8ab4495b8b8b>, LINE 100 "model_info='%s' % (model_name_convert_title.main(experiment_id))"): not all arguments converted during string formatting
[]
[]
EXCEPTION IN (<ipython-input-40-8ab4495b8b8b>, LINE 67 "width=max(image_sizes_x)*no_of_images_across"): max() arg is an empty sequence
[]
[]
EXCEPTION IN (<ipython-input-40-8ab4495b8b8b>, LINE 67 "width=max(image_sizes_x)*no_of_images_across"): max() arg is an empty sequence
Out[40]:
256

In [ ]:
plot_files_append

In [28]:


In [22]:
dtmin.strftime('%d%b')


Out[22]:
'18Aug'

In [29]:
date_list


Out[29]:
['18Aug',
 '19Aug',
 '20Aug',
 '21Aug',
 '22Aug',
 '23Aug',
 '24Aug',
 '25Aug',
 '26Aug',
 '27Aug',
 '28Aug',
 '29Aug',
 '30Aug',
 '31Aug',
 '01Sep',
 '02Sep',
 '03Sep',
 '04Sep',
 '05Sep',
 '06Sep',
 '07Sep']

In [227]:
# TRMM 3 hourly EMBRACE mean Rainfall Map

import glob

import imp
import math

import PIL
from PIL import ImageFont
from PIL import Image
from PIL import ImageDraw

font = ImageFont.truetype("/usr/share/fonts/dejavu-lgc/DejaVuLGCSerif.ttf",50)

no_of_images_across=4
    
try:    
    
    plot_files = glob.glob('/nfs/a90/eepdw/Figures/TRMM/TRMM_mean_EMBRACE_period_??_short_title.png')
    print plot_files
    out_image = "/nfs/a90/eepdw/Figures/TRMM/TRMM_mean_EMBRACE_period_3hourly_plot_grid.png"

    image_sizes_y=[]
    image_sizes_x=[]
    for plot in plot_files:
    
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            #print image64.size[1]
                
            image_sizes_x.append(image64.size[0])
            image_sizes_y.append(image64.size[1])
        except Exception:
            PrintException()

    print image_sizes_y            
#width=sum(image_sizes_x)
    width=max(image_sizes_x)*(no_of_images_across+1)+10
    height=max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across)))
    
    #print width
    #print height
        
    blank_image = Image.new("RGB", (width,height), "white")

    y_pos=0
    x_pos=0
    across_count=0

    for plot in plot_files:
    
        across_count+=1        
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            blank_image.paste(image64, (x_pos,y_pos))
            #print x_pos
            #x_pos+=max(image_sizes_x)
    
        except Exception:
            PrintException()
    
        x_pos+=max(image_sizes_x)
    
        if across_count==no_of_images_across:
            y_pos+=max(image_sizes_y)
            x_pos=0
            across_count=0
         
    draw = ImageDraw.Draw(blank_image)
        
    model_info='TRMM 3B42'

    draw.text((max(image_sizes_x)*(no_of_images_across)+max(image_sizes_x)/4, 
               (max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across))))-max(image_sizes_y)/2), model_info, (0,0,0), font=font)

    blank_image.save(out_image, dpi=(360,360))
except Exception:
    PrintException()

    

import os  
os.system("\cp /nfs/a90/eepdw/Figures/TRMM/TRMM_mean_EMBRACE_period_3hourly_plot_grid.png  /nfs/a90/eepdw/Figures/EMBRACE/3hourly_Rainfall_Maps/")


['/nfs/a90/eepdw/Figures/TRMM/TRMM_mean_EMBRACE_period_00_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_mean_EMBRACE_period_03_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_mean_EMBRACE_period_06_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_mean_EMBRACE_period_09_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_mean_EMBRACE_period_12_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_mean_EMBRACE_period_15_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_mean_EMBRACE_period_18_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_mean_EMBRACE_period_21_short_title.png']
[707, 707, 707, 707, 707, 707, 707, 707]
Out[227]:
0

In [33]:
# TRMM 3 hourly EMBRACE mean Rainfall Map

import glob

import imp
import math

import PIL
from PIL import ImageFont
from PIL import Image
from PIL import ImageDraw

font = ImageFont.truetype("/usr/share/fonts/dejavu-lgc/DejaVuLGCSerif.ttf",50)

no_of_images_across=7
    
try:    
    
    plot_files = glob.glob('/nfs/a90/eepdw/Figures/TRMM/TRMM_daily_mean_EMBRACE_period_????_??_??_short_title.png')
    print plot_files
    out_image = "/nfs/a90/eepdw/Figures/TRMM/TRMM_mean_EMBRACE_period_daily_plot_grid.png"

    image_sizes_y=[]
    image_sizes_x=[]
    for plot in plot_files:
    
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            #print image64.size[1]
                
            image_sizes_x.append(image64.size[0])
            image_sizes_y.append(image64.size[1])
        except Exception:
            PrintException()

    print image_sizes_y            
#width=sum(image_sizes_x)
    width=max(image_sizes_x)*(no_of_images_across+1)+10
    height=max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across)))
    
    #print width
    #print height
        
    blank_image = Image.new("RGB", (width,height), "white")

    y_pos=0
    x_pos=0
    across_count=0

    for plot in plot_files:
    
        across_count+=1        
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            blank_image.paste(image64, (x_pos,y_pos))
            #print x_pos
            #x_pos+=max(image_sizes_x)
    
        except Exception:
            PrintException()
    
        x_pos+=max(image_sizes_x)
    
        if across_count==no_of_images_across:
            y_pos+=max(image_sizes_y)
            x_pos=0
            across_count=0
         
    draw = ImageDraw.Draw(blank_image)
        
    model_info='TRMM 3B42'

    draw.text((max(image_sizes_x)*(no_of_images_across)+max(image_sizes_x)/4, 
               (max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across))))-max(image_sizes_y)/2), model_info, (0,0,0), font=font)

    blank_image.save(out_image, dpi=(360,360))
except Exception:
    PrintException()

    

import os  
os.system("\cp /nfs/a90/eepdw/Figures/TRMM/TRMM_mean_EMBRACE_period_daily_plot_grid.png  /nfs/a90/eepdw/Figures/EMBRACE/Daily_Rainfall_Maps/")


['/nfs/a90/eepdw/Figures/TRMM/TRMM_daily_mean_EMBRACE_period_2011_08_18_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_daily_mean_EMBRACE_period_2011_08_19_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_daily_mean_EMBRACE_period_2011_08_20_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_daily_mean_EMBRACE_period_2011_08_21_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_daily_mean_EMBRACE_period_2011_08_22_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_daily_mean_EMBRACE_period_2011_08_23_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_daily_mean_EMBRACE_period_2011_08_24_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_daily_mean_EMBRACE_period_2011_08_25_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_daily_mean_EMBRACE_period_2011_08_26_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_daily_mean_EMBRACE_period_2011_08_27_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_daily_mean_EMBRACE_period_2011_08_28_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_daily_mean_EMBRACE_period_2011_08_29_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_daily_mean_EMBRACE_period_2011_08_30_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_daily_mean_EMBRACE_period_2011_08_31_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_daily_mean_EMBRACE_period_2011_09_01_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_daily_mean_EMBRACE_period_2011_09_02_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_daily_mean_EMBRACE_period_2011_09_03_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_daily_mean_EMBRACE_period_2011_09_04_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_daily_mean_EMBRACE_period_2011_09_05_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_daily_mean_EMBRACE_period_2011_09_06_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_daily_mean_EMBRACE_period_2011_09_07_short_title.png', '/nfs/a90/eepdw/Figures/TRMM/TRMM_daily_mean_EMBRACE_period_2011_09_08_short_title.png']
[727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727]
Out[33]:
0

In [228]:
# EMBRACE 3 hourly Rainfall Map

import glob

import imp
import math

import PIL
from PIL import ImageFont
from PIL import Image
from PIL import ImageDraw

font = ImageFont.truetype("/usr/share/fonts/dejavu-lgc/DejaVuLGCSerif.ttf",50)

model_name_convert_legend = imp.load_source('util', '/nfs/see-fs-01_users/eepdw/python_scripts/modules/model_name_convert_legend.py')

no_of_images_across=4
experiment_ids_p = ['djznw', 'djzny', 'djznq', 'dklzq', 'dkmbq', 'dkjxq' ] # Most of Params
experiment_ids_e = ['dklwu', 'dklyu', 'djzns', 'dkbhu', 'djznu', 'dkhgu'] # Most of Explicit
    
#experiment_ids = ['djznw', 'djzny', 'djznq', 'djzns', 'dkjxq', 'dklyu', 'dkmbq', 'dklwu', 'dklzq', 'dkbhu', 'djznu', 'dkhgu' ] # All 12


for experiment_id in experiment_ids_p:
    
   plot_files = ['/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_hour/%s_rain_mean_by_hour_0000-0100_short_title.png' % (experiment_id, experiment_id),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_hour/%s_rain_mean_by_hour_0300-0400_short_title.png' % (experiment_id, experiment_id),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_hour/%s_rain_mean_by_hour_0600-0700_short_title.png' % (experiment_id, experiment_id),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_hour/%s_rain_mean_by_hour_0900-1000_short_title.png' % (experiment_id, experiment_id),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_hour/%s_rain_mean_by_hour_1200-1300_short_title.png' % (experiment_id, experiment_id),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_hour/%s_rain_mean_by_hour_1500-1600_short_title.png' % (experiment_id, experiment_id),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_hour/%s_rain_mean_by_hour_1800-1900_short_title.png' % (experiment_id, experiment_id),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_hour/%s_rain_mean_by_hour_2100-2200_short_title.png' % (experiment_id, experiment_id)]
   try:    
    
    #plot_files = glob.glob('/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_day/%s_rain_mean_by_day_[_short_title.png' % (experiment_id, experiment_id))
  
    print plot_files
    out_image = "/nfs/a90/eepdw/Figures/EMBRACE/%s/%s_3hourly_rainfall_plot_grid.png" % (experiment_id, experiment_id)

    image_sizes_y=[]
    image_sizes_x=[]
    for plot in plot_files:
    
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            #print image64.size[1]
                
            image_sizes_x.append(image64.size[0])
            image_sizes_y.append(image64.size[1])
        except Exception:
            PrintException()

    print image_sizes_y            
#width=sum(image_sizes_x)
    width=max(image_sizes_x)*(no_of_images_across+1)
    height=max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across)))
    
    #print width
    #print height
        
    blank_image = Image.new("RGB", (width,height), "white")

    y_pos=0
    x_pos=0
    across_count=0

    for plot in plot_files:
    
        across_count+=1        
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            blank_image.paste(image64, (x_pos,y_pos))
            #print x_pos
            #x_pos+=max(image_sizes_x)
    
        except Exception:
            PrintException()
    
        x_pos+=max(image_sizes_x)
    
        if across_count==no_of_images_across:
            y_pos+=max(image_sizes_y)
            x_pos=0
            across_count=0
        
    draw = ImageDraw.Draw(blank_image)
    model_info='%s Parametrised' % (model_name_convert_title.main(experiment_id))

    draw.text((max(image_sizes_x)*(no_of_images_across), 
               (max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across))))-max(image_sizes_y)/2), 
              model_info, (0,0,0), font=font)


    blank_image.save(out_image, dpi=(360,360))
    
   except Exception:
            PrintException()

    
for experiment_id in experiment_ids_e:
    
   plot_files = ['/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_hour/%s_rain_mean_by_hour_0000-0100_short_title.png' % (experiment_id, experiment_id),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_hour/%s_rain_mean_by_hour_0300-0400_short_title.png' % (experiment_id, experiment_id),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_hour/%s_rain_mean_by_hour_0600-0700_short_title.png' % (experiment_id, experiment_id),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_hour/%s_rain_mean_by_hour_0900-1000_short_title.png' % (experiment_id, experiment_id),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_hour/%s_rain_mean_by_hour_1200-1300_short_title.png' % (experiment_id, experiment_id),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_hour/%s_rain_mean_by_hour_1500-1600_short_title.png' % (experiment_id, experiment_id),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_hour/%s_rain_mean_by_hour_1800-1900_short_title.png' % (experiment_id, experiment_id),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_hour/%s_rain_mean_by_hour_2100-2200_short_title.png' % (experiment_id, experiment_id)]

   try: 
    
    out_image = "/nfs/a90/eepdw/Figures/EMBRACE/%s/%s_3hourly_rainfall_plot_grid.png" % (experiment_id, experiment_id)

    image_sizes_y=[]
    image_sizes_x=[]
    for plot in plot_files:
    
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            #print image64.size[1]
                
            image_sizes_x.append(image64.size[0])
            image_sizes_y.append(image64.size[1])
        except Exception:
            PrintException()

    #print image_sizes_y            
#width=sum(image_sizes_x)
    width=max(image_sizes_x)*(no_of_images_across+1)
    height=max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across)))

    print width
    print height
        
    blank_image = Image.new("RGB", (width,height), "white")

    y_pos=0
    x_pos=0
    across_count=0

    for plot in plot_files:
    
        across_count+=1        
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            blank_image.paste(image64, (x_pos,y_pos))
            #print x_pos
            #x_pos+=max(image_sizes_x)
    
        except Exception:
            PrintException()
    
        x_pos+=max(image_sizes_x)
    
        if across_count==no_of_images_across:
            y_pos+=max(image_sizes_y)
            x_pos=0
            across_count=0
        
    draw = ImageDraw.Draw(blank_image)
        
    model_info='%s Explicit' % (model_name_convert_legend.main(experiment_id))

    draw.text((max(image_sizes_x)*(no_of_images_across), 
               (max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across))))-max(image_sizes_y)/2), model_info, (0,0,0), font=font)

    blank_image.save(out_image, dpi=(360,360))
    
   except Exception:
            PrintException()
import os  
os.system("\cp /nfs/a90/eepdw/Figures/EMBRACE/*/*_3hourly_rainfall_plot_grid.png /nfs/a90/eepdw/Figures/EMBRACE/3hourly_Rainfall_Maps/")


['/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_hour/djznw_rain_mean_by_hour_0000-0100_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_hour/djznw_rain_mean_by_hour_0300-0400_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_hour/djznw_rain_mean_by_hour_0600-0700_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_hour/djznw_rain_mean_by_hour_0900-1000_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_hour/djznw_rain_mean_by_hour_1200-1300_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_hour/djznw_rain_mean_by_hour_1500-1600_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_hour/djznw_rain_mean_by_hour_1800-1900_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/rain_mean_by_hour/djznw_rain_mean_by_hour_2100-2200_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/djzny/rain_mean_by_hour/djzny_rain_mean_by_hour_0000-0100_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/rain_mean_by_hour/djzny_rain_mean_by_hour_0300-0400_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/rain_mean_by_hour/djzny_rain_mean_by_hour_0600-0700_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/rain_mean_by_hour/djzny_rain_mean_by_hour_0900-1000_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/rain_mean_by_hour/djzny_rain_mean_by_hour_1200-1300_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/rain_mean_by_hour/djzny_rain_mean_by_hour_1500-1600_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/rain_mean_by_hour/djzny_rain_mean_by_hour_1800-1900_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/rain_mean_by_hour/djzny_rain_mean_by_hour_2100-2200_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/djznq/rain_mean_by_hour/djznq_rain_mean_by_hour_0000-0100_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/rain_mean_by_hour/djznq_rain_mean_by_hour_0300-0400_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/rain_mean_by_hour/djznq_rain_mean_by_hour_0600-0700_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/rain_mean_by_hour/djznq_rain_mean_by_hour_0900-1000_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/rain_mean_by_hour/djznq_rain_mean_by_hour_1200-1300_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/rain_mean_by_hour/djznq_rain_mean_by_hour_1500-1600_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/rain_mean_by_hour/djznq_rain_mean_by_hour_1800-1900_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/rain_mean_by_hour/djznq_rain_mean_by_hour_2100-2200_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/dklzq/rain_mean_by_hour/dklzq_rain_mean_by_hour_0000-0100_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/rain_mean_by_hour/dklzq_rain_mean_by_hour_0300-0400_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/rain_mean_by_hour/dklzq_rain_mean_by_hour_0600-0700_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/rain_mean_by_hour/dklzq_rain_mean_by_hour_0900-1000_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/rain_mean_by_hour/dklzq_rain_mean_by_hour_1200-1300_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/rain_mean_by_hour/dklzq_rain_mean_by_hour_1500-1600_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/rain_mean_by_hour/dklzq_rain_mean_by_hour_1800-1900_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/rain_mean_by_hour/dklzq_rain_mean_by_hour_2100-2200_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/rain_mean_by_hour/dkmbq_rain_mean_by_hour_0000-0100_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/rain_mean_by_hour/dkmbq_rain_mean_by_hour_0300-0400_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/rain_mean_by_hour/dkmbq_rain_mean_by_hour_0600-0700_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/rain_mean_by_hour/dkmbq_rain_mean_by_hour_0900-1000_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/rain_mean_by_hour/dkmbq_rain_mean_by_hour_1200-1300_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/rain_mean_by_hour/dkmbq_rain_mean_by_hour_1500-1600_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/rain_mean_by_hour/dkmbq_rain_mean_by_hour_1800-1900_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/rain_mean_by_hour/dkmbq_rain_mean_by_hour_2100-2200_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/rain_mean_by_hour/dkjxq_rain_mean_by_hour_0000-0100_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/rain_mean_by_hour/dkjxq_rain_mean_by_hour_0300-0400_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/rain_mean_by_hour/dkjxq_rain_mean_by_hour_0600-0700_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/rain_mean_by_hour/dkjxq_rain_mean_by_hour_0900-1000_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/rain_mean_by_hour/dkjxq_rain_mean_by_hour_1200-1300_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/rain_mean_by_hour/dkjxq_rain_mean_by_hour_1500-1600_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/rain_mean_by_hour/dkjxq_rain_mean_by_hour_1800-1900_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/rain_mean_by_hour/dkjxq_rain_mean_by_hour_2100-2200_short_title.png']
[594, 594, 594, 594, 594, 594, 594, 594]
3200
1302
3200
1302
3200
1302
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/rain_mean_by_hour/dkbhu_rain_mean_by_hour_0000-0100_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/rain_mean_by_hour/dkbhu_rain_mean_by_hour_0300-0400_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/rain_mean_by_hour/dkbhu_rain_mean_by_hour_0600-0700_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/rain_mean_by_hour/dkbhu_rain_mean_by_hour_0900-1000_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/rain_mean_by_hour/dkbhu_rain_mean_by_hour_1200-1300_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/rain_mean_by_hour/dkbhu_rain_mean_by_hour_1500-1600_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/rain_mean_by_hour/dkbhu_rain_mean_by_hour_1800-1900_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/rain_mean_by_hour/dkbhu_rain_mean_by_hour_2100-2200_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 134 "width=max(image_sizes_x)*(no_of_images_across+1)"): max() arg is an empty sequence
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/djznu/rain_mean_by_hour/djznu_rain_mean_by_hour_0000-0100_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/djznu/rain_mean_by_hour/djznu_rain_mean_by_hour_0300-0400_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/djznu/rain_mean_by_hour/djznu_rain_mean_by_hour_0600-0700_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/djznu/rain_mean_by_hour/djznu_rain_mean_by_hour_0900-1000_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/djznu/rain_mean_by_hour/djznu_rain_mean_by_hour_1200-1300_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/djznu/rain_mean_by_hour/djznu_rain_mean_by_hour_1500-1600_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/djznu/rain_mean_by_hour/djznu_rain_mean_by_hour_1800-1900_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/djznu/rain_mean_by_hour/djznu_rain_mean_by_hour_2100-2200_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 134 "width=max(image_sizes_x)*(no_of_images_across+1)"): max() arg is an empty sequence
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/dkhgu/rain_mean_by_hour/dkhgu_rain_mean_by_hour_0000-0100_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/dkhgu/rain_mean_by_hour/dkhgu_rain_mean_by_hour_0300-0400_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/dkhgu/rain_mean_by_hour/dkhgu_rain_mean_by_hour_0600-0700_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/dkhgu/rain_mean_by_hour/dkhgu_rain_mean_by_hour_0900-1000_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/dkhgu/rain_mean_by_hour/dkhgu_rain_mean_by_hour_1200-1300_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/dkhgu/rain_mean_by_hour/dkhgu_rain_mean_by_hour_1500-1600_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/dkhgu/rain_mean_by_hour/dkhgu_rain_mean_by_hour_1800-1900_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 124 "image64 = Image.open(open(plot, 'rb'))"): [Errno 2] No such file or directory: '/nfs/a90/eepdw/Figures/EMBRACE/dkhgu/rain_mean_by_hour/dkhgu_rain_mean_by_hour_2100-2200_short_title.png'
EXCEPTION IN (<ipython-input-228-8291f9707cb7>, LINE 134 "width=max(image_sizes_x)*(no_of_images_across+1)"): max() arg is an empty sequence
Out[228]:
256

In [229]:
# EMBRACE 3 hourly Surface Flux Maps

import glob

import imp
import math

import PIL
from PIL import ImageFont
from PIL import Image
from PIL import ImageDraw

font = ImageFont.truetype("/usr/share/fonts/dejavu-lgc/DejaVuLGCSerif.ttf",50)

model_name_convert_legend = imp.load_source('util', '/nfs/see-fs-01_users/eepdw/python_scripts/modules/model_name_convert_legend.py')

no_of_images_across=4
experiment_ids_p = ['djznw', 'djzny', 'djznq', 'dklzq', 'dkmbq', 'dkjxq' ] # Most of Params
experiment_ids_e = ['dklwu', 'dklyu', 'djzns', 'dkbhu', 'djznu', 'dkhgu'] # Most of Explicit
    
#experiment_ids = ['djznw', 'djzny', 'djznq', 'djzns', 'dkjxq', 'dklyu', 'dkmbq', 'dklwu', 'dklzq', 'dkbhu', 'djznu', 'dkhgu' ] # All 12

diags_to_grid=['1201_mean_by_hour_regrid', '2201_mean_by_hour_regrid', '3217_mean_by_hour_regrid', '3234_mean_by_hour_regrid']
for diag in diags_to_grid:
 for experiment_id in experiment_ids_p:
    
   plot_files = ['/nfs/a90/eepdw/Figures/EMBRACE/%s/%s/%s_%s_00*-*_short_title.png' % (experiment_id, diag, experiment_id, diag),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/%s/%s_%s_03*-*_short_title.png' % (experiment_id, diag, experiment_id, diag),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/%s/%s_%s_06*-*_short_title.png' % (experiment_id, diag, experiment_id, diag),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/%s/%s_%s_09*-*_short_title.png' % (experiment_id, diag, experiment_id, diag),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/%s/%s_%s_12*-*_short_title.png' % (experiment_id, diag, experiment_id, diag),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/%s/%s_%s_15*-*_short_title.png' % (experiment_id, diag, experiment_id, diag),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/%s/%s_%s_18*-*_short_title.png' % (experiment_id, diag, experiment_id, diag),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/%s/%s_%s_21*-*_short_title.png' % (experiment_id, diag, experiment_id, diag)]
   try:    
    
    #plot_files = glob.glob('/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_day/%s_rain_mean_by_day_[_short_title.png' % (experiment_id, experiment_id))
  
    print plot_files
    out_image = "/nfs/a90/eepdw/Figures/EMBRACE/%s/%s_3hourly_rainfall_plot_grid.png" % (experiment_id, experiment_id)

    image_sizes_y=[]
    image_sizes_x=[]
    for plot in plot_files:
    
        plot=glob.glob('%s' % plot)[0]
        
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            #print image64.size[1]
                
            image_sizes_x.append(image64.size[0])
            image_sizes_y.append(image64.size[1])
        except Exception:
            PrintException()

    print image_sizes_y            
#width=sum(image_sizes_x)
    width=max(image_sizes_x)*(no_of_images_across+1)
    height=max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across)))
    
    #print width
    #print height
        
    blank_image = Image.new("RGB", (width,height), "white")

    y_pos=0
    x_pos=0
    across_count=0

    for plot in plot_files:
    
        plot=glob.glob('%s' % plot)[0]
        
        across_count+=1        
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            blank_image.paste(image64, (x_pos,y_pos))
            #print x_pos
            #x_pos+=max(image_sizes_x)
    
        except Exception:
            PrintException()
    
        x_pos+=max(image_sizes_x)
    
        if across_count==no_of_images_across:
            y_pos+=max(image_sizes_y)
            x_pos=0
            across_count=0
        
    draw = ImageDraw.Draw(blank_image)
    model_info='%s Parametrised' % (model_name_convert_legend.main(experiment_id))

    draw.text((max(image_sizes_x)*(no_of_images_across), 
               (max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across))))-max(image_sizes_y)/2), 
              model_info, (0,0,0), font=font)


    blank_image.save(out_image, dpi=(360,360))
    
   except Exception:
            PrintException()

    
 for experiment_id in experiment_ids_e:
    
   plot_files = ['/nfs/a90/eepdw/Figures/EMBRACE/%s/%s/%s_%s_00*-*_short_title.png' % (experiment_id, diag, experiment_id, diag),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/%s/%s_%s_03*-*_short_title.png' % (experiment_id, diag, experiment_id, diag),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/%s/%s_%s_06*-*_short_title.png' % (experiment_id, diag, experiment_id, diag),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/%s/%s_%s_09*-*_short_title.png' % (experiment_id, diag, experiment_id, diag),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/%s/%s_%s_12*-*_short_title.png' % (experiment_id, diag, experiment_id, diag),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/%s/%s_%s_15*-*_short_title.png' % (experiment_id, diag, experiment_id, diag),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/%s/%s_%s_18*-*_short_title.png' % (experiment_id, diag, experiment_id, diag),
                  '/nfs/a90/eepdw/Figures/EMBRACE/%s/%s/%s_%s_21*-*_short_title.png' % (experiment_id, diag, experiment_id, diag)]

   try: 
    
    out_image = "/nfs/a90/eepdw/Figures/EMBRACE/%s/%s/%s_%s_3_hourly_plot_grid.png" % (experiment_id, diag, experiment_id, diag)

    image_sizes_y=[]
    image_sizes_x=[]
    for plot in plot_files:
    
        try:
            plot=glob.glob('%s' % plot)[0]
            
            image64 = Image.open(open(plot, 'rb'))
            #print image64.size[1]
                
            image_sizes_x.append(image64.size[0])
            image_sizes_y.append(image64.size[1])
        except Exception:
            PrintException()

    #print image_sizes_y            
#width=sum(image_sizes_x)
    width=max(image_sizes_x)*(no_of_images_across+1)
    height=max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across)))

    print width
    print height
        
    blank_image = Image.new("RGB", (width,height), "white")

    y_pos=0
    x_pos=0
    across_count=0

    for plot in plot_files:
    
        plot=glob.glob('%s' % plot)[0]
        
        across_count+=1        
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            blank_image.paste(image64, (x_pos,y_pos))
            #print x_pos
            #x_pos+=max(image_sizes_x)
    
        except Exception:
            PrintException()
    
        x_pos+=max(image_sizes_x)
    
        if across_count==no_of_images_across:
            y_pos+=max(image_sizes_y)
            x_pos=0
            across_count=0
        
    draw = ImageDraw.Draw(blank_image)
        
    model_info='%s Explicit' % (model_name_convert_legend.main(experiment_id))

    draw.text((max(image_sizes_x)*(no_of_images_across), 
               (max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across))))-max(image_sizes_y)/2), model_info, (0,0,0), font=font)

    blank_image.save(out_image, dpi=(360,360))
    
   except Exception:
            PrintException()
import os  
os.system("\cp /nfs/a90/eepdw/Figures/EMBRACE/*/*/*3_hourly_plot_grid.png /nfs/a90/eepdw/Figures/EMBRACE/3hourly_Maps/")


['/nfs/a90/eepdw/Figures/EMBRACE/djznw/1201_mean_by_hour_regrid/djznw_1201_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/1201_mean_by_hour_regrid/djznw_1201_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/1201_mean_by_hour_regrid/djznw_1201_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/1201_mean_by_hour_regrid/djznw_1201_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/1201_mean_by_hour_regrid/djznw_1201_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/1201_mean_by_hour_regrid/djznw_1201_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/1201_mean_by_hour_regrid/djznw_1201_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/1201_mean_by_hour_regrid/djznw_1201_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/djzny/1201_mean_by_hour_regrid/djzny_1201_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/1201_mean_by_hour_regrid/djzny_1201_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/1201_mean_by_hour_regrid/djzny_1201_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/1201_mean_by_hour_regrid/djzny_1201_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/1201_mean_by_hour_regrid/djzny_1201_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/1201_mean_by_hour_regrid/djzny_1201_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/1201_mean_by_hour_regrid/djzny_1201_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/1201_mean_by_hour_regrid/djzny_1201_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/djznq/1201_mean_by_hour_regrid/djznq_1201_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/1201_mean_by_hour_regrid/djznq_1201_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/1201_mean_by_hour_regrid/djznq_1201_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/1201_mean_by_hour_regrid/djznq_1201_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/1201_mean_by_hour_regrid/djznq_1201_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/1201_mean_by_hour_regrid/djznq_1201_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/1201_mean_by_hour_regrid/djznq_1201_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/1201_mean_by_hour_regrid/djznq_1201_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/dklzq/1201_mean_by_hour_regrid/dklzq_1201_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/1201_mean_by_hour_regrid/dklzq_1201_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/1201_mean_by_hour_regrid/dklzq_1201_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/1201_mean_by_hour_regrid/dklzq_1201_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/1201_mean_by_hour_regrid/dklzq_1201_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/1201_mean_by_hour_regrid/dklzq_1201_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/1201_mean_by_hour_regrid/dklzq_1201_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/1201_mean_by_hour_regrid/dklzq_1201_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/1201_mean_by_hour_regrid/dkmbq_1201_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/1201_mean_by_hour_regrid/dkmbq_1201_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/1201_mean_by_hour_regrid/dkmbq_1201_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/1201_mean_by_hour_regrid/dkmbq_1201_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/1201_mean_by_hour_regrid/dkmbq_1201_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/1201_mean_by_hour_regrid/dkmbq_1201_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/1201_mean_by_hour_regrid/dkmbq_1201_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/1201_mean_by_hour_regrid/dkmbq_1201_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/1201_mean_by_hour_regrid/dkjxq_1201_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/1201_mean_by_hour_regrid/dkjxq_1201_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/1201_mean_by_hour_regrid/dkjxq_1201_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/1201_mean_by_hour_regrid/dkjxq_1201_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/1201_mean_by_hour_regrid/dkjxq_1201_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/1201_mean_by_hour_regrid/dkjxq_1201_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/1201_mean_by_hour_regrid/dkjxq_1201_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/1201_mean_by_hour_regrid/dkjxq_1201_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
3200
1302
3200
1302
3200
1302
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 140 "width=max(image_sizes_x)*(no_of_images_across+1)"): max() arg is an empty sequence
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 140 "width=max(image_sizes_x)*(no_of_images_across+1)"): max() arg is an empty sequence
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 140 "width=max(image_sizes_x)*(no_of_images_across+1)"): max() arg is an empty sequence
['/nfs/a90/eepdw/Figures/EMBRACE/djznw/2201_mean_by_hour_regrid/djznw_2201_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/2201_mean_by_hour_regrid/djznw_2201_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/2201_mean_by_hour_regrid/djznw_2201_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/2201_mean_by_hour_regrid/djznw_2201_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/2201_mean_by_hour_regrid/djznw_2201_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/2201_mean_by_hour_regrid/djznw_2201_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/2201_mean_by_hour_regrid/djznw_2201_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/2201_mean_by_hour_regrid/djznw_2201_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/djzny/2201_mean_by_hour_regrid/djzny_2201_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/2201_mean_by_hour_regrid/djzny_2201_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/2201_mean_by_hour_regrid/djzny_2201_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/2201_mean_by_hour_regrid/djzny_2201_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/2201_mean_by_hour_regrid/djzny_2201_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/2201_mean_by_hour_regrid/djzny_2201_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/2201_mean_by_hour_regrid/djzny_2201_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/2201_mean_by_hour_regrid/djzny_2201_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/djznq/2201_mean_by_hour_regrid/djznq_2201_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/2201_mean_by_hour_regrid/djznq_2201_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/2201_mean_by_hour_regrid/djznq_2201_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/2201_mean_by_hour_regrid/djznq_2201_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/2201_mean_by_hour_regrid/djznq_2201_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/2201_mean_by_hour_regrid/djznq_2201_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/2201_mean_by_hour_regrid/djznq_2201_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/2201_mean_by_hour_regrid/djznq_2201_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/dklzq/2201_mean_by_hour_regrid/dklzq_2201_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/2201_mean_by_hour_regrid/dklzq_2201_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/2201_mean_by_hour_regrid/dklzq_2201_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/2201_mean_by_hour_regrid/dklzq_2201_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/2201_mean_by_hour_regrid/dklzq_2201_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/2201_mean_by_hour_regrid/dklzq_2201_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/2201_mean_by_hour_regrid/dklzq_2201_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/2201_mean_by_hour_regrid/dklzq_2201_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/2201_mean_by_hour_regrid/dkmbq_2201_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/2201_mean_by_hour_regrid/dkmbq_2201_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/2201_mean_by_hour_regrid/dkmbq_2201_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/2201_mean_by_hour_regrid/dkmbq_2201_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/2201_mean_by_hour_regrid/dkmbq_2201_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/2201_mean_by_hour_regrid/dkmbq_2201_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/2201_mean_by_hour_regrid/dkmbq_2201_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/2201_mean_by_hour_regrid/dkmbq_2201_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/2201_mean_by_hour_regrid/dkjxq_2201_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/2201_mean_by_hour_regrid/dkjxq_2201_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/2201_mean_by_hour_regrid/dkjxq_2201_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/2201_mean_by_hour_regrid/dkjxq_2201_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/2201_mean_by_hour_regrid/dkjxq_2201_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/2201_mean_by_hour_regrid/dkjxq_2201_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/2201_mean_by_hour_regrid/dkjxq_2201_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/2201_mean_by_hour_regrid/dkjxq_2201_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
3200
1302
3200
1302
3200
1302
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 140 "width=max(image_sizes_x)*(no_of_images_across+1)"): max() arg is an empty sequence
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 140 "width=max(image_sizes_x)*(no_of_images_across+1)"): max() arg is an empty sequence
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 140 "width=max(image_sizes_x)*(no_of_images_across+1)"): max() arg is an empty sequence
['/nfs/a90/eepdw/Figures/EMBRACE/djznw/3217_mean_by_hour_regrid/djznw_3217_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/3217_mean_by_hour_regrid/djznw_3217_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/3217_mean_by_hour_regrid/djznw_3217_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/3217_mean_by_hour_regrid/djznw_3217_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/3217_mean_by_hour_regrid/djznw_3217_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/3217_mean_by_hour_regrid/djznw_3217_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/3217_mean_by_hour_regrid/djznw_3217_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/3217_mean_by_hour_regrid/djznw_3217_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/djzny/3217_mean_by_hour_regrid/djzny_3217_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/3217_mean_by_hour_regrid/djzny_3217_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/3217_mean_by_hour_regrid/djzny_3217_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/3217_mean_by_hour_regrid/djzny_3217_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/3217_mean_by_hour_regrid/djzny_3217_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/3217_mean_by_hour_regrid/djzny_3217_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/3217_mean_by_hour_regrid/djzny_3217_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/3217_mean_by_hour_regrid/djzny_3217_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/djznq/3217_mean_by_hour_regrid/djznq_3217_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/3217_mean_by_hour_regrid/djznq_3217_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/3217_mean_by_hour_regrid/djznq_3217_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/3217_mean_by_hour_regrid/djznq_3217_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/3217_mean_by_hour_regrid/djznq_3217_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/3217_mean_by_hour_regrid/djznq_3217_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/3217_mean_by_hour_regrid/djznq_3217_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/3217_mean_by_hour_regrid/djznq_3217_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/dklzq/3217_mean_by_hour_regrid/dklzq_3217_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/3217_mean_by_hour_regrid/dklzq_3217_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/3217_mean_by_hour_regrid/dklzq_3217_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/3217_mean_by_hour_regrid/dklzq_3217_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/3217_mean_by_hour_regrid/dklzq_3217_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/3217_mean_by_hour_regrid/dklzq_3217_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/3217_mean_by_hour_regrid/dklzq_3217_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/3217_mean_by_hour_regrid/dklzq_3217_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/3217_mean_by_hour_regrid/dkmbq_3217_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/3217_mean_by_hour_regrid/dkmbq_3217_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/3217_mean_by_hour_regrid/dkmbq_3217_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/3217_mean_by_hour_regrid/dkmbq_3217_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/3217_mean_by_hour_regrid/dkmbq_3217_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/3217_mean_by_hour_regrid/dkmbq_3217_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/3217_mean_by_hour_regrid/dkmbq_3217_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/3217_mean_by_hour_regrid/dkmbq_3217_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/3217_mean_by_hour_regrid/dkjxq_3217_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/3217_mean_by_hour_regrid/dkjxq_3217_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/3217_mean_by_hour_regrid/dkjxq_3217_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/3217_mean_by_hour_regrid/dkjxq_3217_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/3217_mean_by_hour_regrid/dkjxq_3217_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/3217_mean_by_hour_regrid/dkjxq_3217_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/3217_mean_by_hour_regrid/dkjxq_3217_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/3217_mean_by_hour_regrid/dkjxq_3217_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
3200
1302
3200
1302
3200
1302
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 140 "width=max(image_sizes_x)*(no_of_images_across+1)"): max() arg is an empty sequence
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 140 "width=max(image_sizes_x)*(no_of_images_across+1)"): max() arg is an empty sequence
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 140 "width=max(image_sizes_x)*(no_of_images_across+1)"): max() arg is an empty sequence
['/nfs/a90/eepdw/Figures/EMBRACE/djznw/3234_mean_by_hour_regrid/djznw_3234_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/3234_mean_by_hour_regrid/djznw_3234_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/3234_mean_by_hour_regrid/djznw_3234_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/3234_mean_by_hour_regrid/djznw_3234_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/3234_mean_by_hour_regrid/djznw_3234_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/3234_mean_by_hour_regrid/djznw_3234_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/3234_mean_by_hour_regrid/djznw_3234_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznw/3234_mean_by_hour_regrid/djznw_3234_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/djzny/3234_mean_by_hour_regrid/djzny_3234_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/3234_mean_by_hour_regrid/djzny_3234_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/3234_mean_by_hour_regrid/djzny_3234_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/3234_mean_by_hour_regrid/djzny_3234_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/3234_mean_by_hour_regrid/djzny_3234_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/3234_mean_by_hour_regrid/djzny_3234_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/3234_mean_by_hour_regrid/djzny_3234_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djzny/3234_mean_by_hour_regrid/djzny_3234_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/djznq/3234_mean_by_hour_regrid/djznq_3234_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/3234_mean_by_hour_regrid/djznq_3234_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/3234_mean_by_hour_regrid/djznq_3234_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/3234_mean_by_hour_regrid/djznq_3234_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/3234_mean_by_hour_regrid/djznq_3234_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/3234_mean_by_hour_regrid/djznq_3234_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/3234_mean_by_hour_regrid/djznq_3234_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/djznq/3234_mean_by_hour_regrid/djznq_3234_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/dklzq/3234_mean_by_hour_regrid/dklzq_3234_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/3234_mean_by_hour_regrid/dklzq_3234_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/3234_mean_by_hour_regrid/dklzq_3234_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/3234_mean_by_hour_regrid/dklzq_3234_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/3234_mean_by_hour_regrid/dklzq_3234_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/3234_mean_by_hour_regrid/dklzq_3234_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/3234_mean_by_hour_regrid/dklzq_3234_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklzq/3234_mean_by_hour_regrid/dklzq_3234_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/3234_mean_by_hour_regrid/dkmbq_3234_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/3234_mean_by_hour_regrid/dkmbq_3234_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/3234_mean_by_hour_regrid/dkmbq_3234_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/3234_mean_by_hour_regrid/dkmbq_3234_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/3234_mean_by_hour_regrid/dkmbq_3234_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/3234_mean_by_hour_regrid/dkmbq_3234_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/3234_mean_by_hour_regrid/dkmbq_3234_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/3234_mean_by_hour_regrid/dkmbq_3234_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
['/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/3234_mean_by_hour_regrid/dkjxq_3234_mean_by_hour_regrid_00*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/3234_mean_by_hour_regrid/dkjxq_3234_mean_by_hour_regrid_03*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/3234_mean_by_hour_regrid/dkjxq_3234_mean_by_hour_regrid_06*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/3234_mean_by_hour_regrid/dkjxq_3234_mean_by_hour_regrid_09*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/3234_mean_by_hour_regrid/dkjxq_3234_mean_by_hour_regrid_12*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/3234_mean_by_hour_regrid/dkjxq_3234_mean_by_hour_regrid_15*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/3234_mean_by_hour_regrid/dkjxq_3234_mean_by_hour_regrid_18*-*_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkjxq/3234_mean_by_hour_regrid/dkjxq_3234_mean_by_hour_regrid_21*-*_short_title.png']
[651, 651, 651, 651, 651, 651, 651, 651]
3200
1302
3200
1302
3200
1302
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 140 "width=max(image_sizes_x)*(no_of_images_across+1)"): max() arg is an empty sequence
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 140 "width=max(image_sizes_x)*(no_of_images_across+1)"): max() arg is an empty sequence
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 128 "plot=glob.glob('%s' % plot)[0]"): list index out of range
EXCEPTION IN (<ipython-input-229-f56e94c90da4>, LINE 140 "width=max(image_sizes_x)*(no_of_images_across+1)"): max() arg is an empty sequence
Out[229]:
0

In [1]:
# EMBRACE 3 hourly 8km diff Maps

import glob

import imp
import math

import PIL
from PIL import ImageFont
from PIL import Image
from PIL import ImageDraw

font = ImageFont.truetype("/usr/share/fonts/dejavu-lgc/DejaVuLGCSerif.ttf",50)

model_name_convert_legend = imp.load_source('util', '/nfs/see-fs-01_users/eepdw/python_scripts/modules/model_name_convert_legend.py')

no_of_images_across=4

experiment_id='dklyu'
difference_id='dkmbq'
diag='temp'
p_level='925'
filename_template='/nfs/a90/eepdw/Figures/EMBRACE/%s/%s/%s_%s_%s_diff_from_%s_' \
              % (experiment_id, diag, experiment_id, diag, p_level, difference_id)
filename_ending='_short_title.png'
times=['0000', '0300', '0600', '0900', '1200', '1500', '1800', '2100']

plot_files = ['%s%s%s' % (filename_template, time, filename_ending) for time in times]
                
try:    
    
    #plot_files = glob.glob('/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_day/%s_rain_mean_by_day_[_short_title.png' % (experiment_id, experiment_id))
  
    print plot_files
    out_image = "/nfs/a90/eepdw/Figures/EMBRACE/%s/%s_%s_%s_3hourly_8km_diff_plot_grid.png"\
                    % (experiment_id, experiment_id, diag, p_level)

    image_sizes_y=[]
    image_sizes_x=[]
    for plot in plot_files:
    
        plot=glob.glob('%s' % plot)[0]
        
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            #print image64.size[1]
                
            image_sizes_x.append(image64.size[0])
            image_sizes_y.append(image64.size[1])
        except Exception:
            PrintException()

    print image_sizes_y            
#width=sum(image_sizes_x)
    width=max(image_sizes_x)*(no_of_images_across+1)
    height=max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across)))
    
    #print width
    #print height
        
    blank_image = Image.new("RGB", (width,height), "white")

    y_pos=0
    x_pos=0
    across_count=0

    for plot in plot_files:
    
        plot=glob.glob('%s' % plot)[0]
        
        across_count+=1        
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            blank_image.paste(image64, (x_pos,y_pos))
            #print x_pos
            #x_pos+=max(image_sizes_x)
    
        except Exception:
            PrintException()
    
        x_pos+=max(image_sizes_x)
    
        if across_count==no_of_images_across:
            y_pos+=max(image_sizes_y)
            x_pos=0
            across_count=0
        
    draw = ImageDraw.Draw(blank_image)
    model_info='%s %s %s Diff ' % (model_name_convert_legend.main(experiment_id)[-1], diag, p_level)

    draw.text((max(image_sizes_x)*(no_of_images_across), 
               (max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across))))-max(image_sizes_y)/2), 
              model_info, (0,0,0), font=font)


    blank_image.save(out_image, dpi=(360,360))
    
except Exception:
    PrintException()

    
import os  
os.system("\cp /nfs/a90/eepdw/Figures/EMBRACE/*/*/%s_%s_%s_3hourly_8km_diff_plot_grid.png /nfs/a90/eepdw/Figures/EMBRACE/3hourly_Maps/"\
          % (experiment_id, diag, p_level))


['/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_0000_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_0300_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_0600_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_0900_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_1200_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_1500_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_1800_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_2100_short_title.png']
[650, 650, 650, 650, 650, 650, 650, 650]
Out[1]:
256

In [29]:
# EMBRACE 3 hourly diff Maps pressure level height

import glob

import imp
import math

import PIL
from PIL import ImageFont
from PIL import Image
from PIL import ImageDraw

font = ImageFont.truetype("/usr/share/fonts/dejavu-lgc/DejaVuLGCSerif.ttf",50)

model_name_convert_legend = imp.load_source('util', '/nfs/see-fs-01_users/eepdw/python_scripts/modules/model_name_convert_legend.py')

no_of_images_across=5

experiment_id='dkmbq'
difference_id='djzns'
diag='408_on_p_levs_mean_by_day'
p_level='925'
filename_template='/nfs/a90/eepdw/Figures/EMBRACE/%s/%s/%s_minus_%s_%s_%s_hPa_and_geop_height_*_short_title.png' \
              % (experiment_id, diag, experiment_id, difference_id, diag, p_level)
    
#/dklyu/408_on_p_levs_mean_by_day/dklyu_minus_dkmbq_408_on_p_levs_mean_by_day_925_hPa_and_geop_height_30Aug_short_title.png
    
#filename_ending='_short_title.png'
#times=['0000', '0300', '0600', '0900', '1200', '1500', '1800', '2100']

#plot_files = ['%s%s%s' % (filename_template, time, filename_ending) for time in times]
                
try:    
    
    plot_files = glob.glob(filename_template)
  
    print plot_files
    out_image = "/nfs/a90/eepdw/Figures/EMBRACE/%s/%s_minus_%s_%s_%s_hPa_and_geop_height_daily_grid.png"\
                    % (experiment_id, experiment_id, difference_id, diag, p_level)

    image_sizes_y=[]
    image_sizes_x=[]
    for plot in plot_files:
    
        plot=glob.glob('%s' % plot)[0]
        
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            #print image64.size[1]
                
            image_sizes_x.append(image64.size[0])
            image_sizes_y.append(image64.size[1])
        except Exception:
            PrintException()

    print image_sizes_y            
#width=sum(image_sizes_x)
    width=max(image_sizes_x)*(no_of_images_across+1)
    height=max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across)))
    
    #print width
    #print height
        
    blank_image = Image.new("RGB", (width,height), "white")

    y_pos=0
    x_pos=0
    across_count=0

    for plot in plot_files:
    
        plot=glob.glob('%s' % plot)[0]
        
        across_count+=1        
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            blank_image.paste(image64, (x_pos,y_pos))
            #print x_pos
            #x_pos+=max(image_sizes_x)
    
        except Exception:
            PrintException()
    
        x_pos+=max(image_sizes_x)
    
        if across_count==no_of_images_across:
            y_pos+=max(image_sizes_y)
            x_pos=0
            across_count=0
        
    draw = ImageDraw.Draw(blank_image)
    model_info='%s %s %s Diff ' % (model_name_convert_legend.main(experiment_id)[-1], diag, p_level)

    draw.text((max(image_sizes_x)*(no_of_images_across), 
               (max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across))))-max(image_sizes_y)/2), 
              model_info, (0,0,0), font=font)


    blank_image.save(out_image, dpi=(360,360))
    
except Exception:
    PrintException()

    
import os  
os.system("\cp %s  /nfs/a90/eepdw/Figures/EMBRACE/Daily_Maps/"\
          % (out_image))


['/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_on_p_levs_mean_by_day/dkmbq_minus_djzns_408_on_p_levs_mean_by_day_925_hPa_and_geop_height_18Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_on_p_levs_mean_by_day/dkmbq_minus_djzns_408_on_p_levs_mean_by_day_925_hPa_and_geop_height_19Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_on_p_levs_mean_by_day/dkmbq_minus_djzns_408_on_p_levs_mean_by_day_925_hPa_and_geop_height_20Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_on_p_levs_mean_by_day/dkmbq_minus_djzns_408_on_p_levs_mean_by_day_925_hPa_and_geop_height_21Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_on_p_levs_mean_by_day/dkmbq_minus_djzns_408_on_p_levs_mean_by_day_925_hPa_and_geop_height_22Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_on_p_levs_mean_by_day/dkmbq_minus_djzns_408_on_p_levs_mean_by_day_925_hPa_and_geop_height_23Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_on_p_levs_mean_by_day/dkmbq_minus_djzns_408_on_p_levs_mean_by_day_925_hPa_and_geop_height_24Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_on_p_levs_mean_by_day/dkmbq_minus_djzns_408_on_p_levs_mean_by_day_925_hPa_and_geop_height_25Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_on_p_levs_mean_by_day/dkmbq_minus_djzns_408_on_p_levs_mean_by_day_925_hPa_and_geop_height_26Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_on_p_levs_mean_by_day/dkmbq_minus_djzns_408_on_p_levs_mean_by_day_925_hPa_and_geop_height_27Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_on_p_levs_mean_by_day/dkmbq_minus_djzns_408_on_p_levs_mean_by_day_925_hPa_and_geop_height_28Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_on_p_levs_mean_by_day/dkmbq_minus_djzns_408_on_p_levs_mean_by_day_925_hPa_and_geop_height_29Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_on_p_levs_mean_by_day/dkmbq_minus_djzns_408_on_p_levs_mean_by_day_925_hPa_and_geop_height_30Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_on_p_levs_mean_by_day/dkmbq_minus_djzns_408_on_p_levs_mean_by_day_925_hPa_and_geop_height_31Aug_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_on_p_levs_mean_by_day/dkmbq_minus_djzns_408_on_p_levs_mean_by_day_925_hPa_and_geop_height_01Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_on_p_levs_mean_by_day/dkmbq_minus_djzns_408_on_p_levs_mean_by_day_925_hPa_and_geop_height_02Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_on_p_levs_mean_by_day/dkmbq_minus_djzns_408_on_p_levs_mean_by_day_925_hPa_and_geop_height_03Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_on_p_levs_mean_by_day/dkmbq_minus_djzns_408_on_p_levs_mean_by_day_925_hPa_and_geop_height_04Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_on_p_levs_mean_by_day/dkmbq_minus_djzns_408_on_p_levs_mean_by_day_925_hPa_and_geop_height_05Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_on_p_levs_mean_by_day/dkmbq_minus_djzns_408_on_p_levs_mean_by_day_925_hPa_and_geop_height_06Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_on_p_levs_mean_by_day/dkmbq_minus_djzns_408_on_p_levs_mean_by_day_925_hPa_and_geop_height_07Sep_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkmbq/408_on_p_levs_mean_by_day/dkmbq_minus_djzns_408_on_p_levs_mean_by_day_925_hPa_and_geop_height_08Sep_short_title.png']
[669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669]
Out[29]:
0

In [41]:
# EMBRACE 3 hourly Maps

import glob

import imp
import math

import PIL
from PIL import ImageFont
from PIL import Image
from PIL import ImageDraw

font = ImageFont.truetype("/usr/share/fonts/dejavu-lgc/DejaVuLGCSerif.ttf",50)

model_name_convert_title = imp.load_source('util', '/nfs/see-fs-01_users/eepdw/python_scripts/modules/model_name_convert_title.py')

no_of_images_across=4

experiment_id ='dklyu'

diag='temp'
p_level='925'
filename_template='/nfs/a90/eepdw/Figures/EMBRACE/%s/%s/%s_%s_%s_hPa_and_geop_height_' \
              % (experiment_id, diag, experiment_id, diag, p_level)
filename_ending='_short_title.png'
times=['0000', '0300', '0600', '0900', '1200', '1500', '1800', '2100']

plot_files = ['%s%s%s' % (filename_template, time, filename_ending) for time in times]
                
try:    
    
    #plot_files = glob.glob('/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_day/%s_rain_mean_by_day_short_title.png' % (experiment_id, experiment_id))
  
    print plot_files
    out_image = "/nfs/a90/eepdw/Figures/EMBRACE/%s/%s_%s_%s_3hourly_8km_plot_grid.png"\
                    % (experiment_id, experiment_id, diag, p_level)

    image_sizes_y=[]
    image_sizes_x=[]
    for plot in plot_files:
    
        plot=glob.glob('%s' % plot)[0]
        
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            #print image64.size[1]
                
            image_sizes_x.append(image64.size[0])
            image_sizes_y.append(image64.size[1])
        except Exception:
            PrintException()

    print image_sizes_y            
#width=sum(image_sizes_x)
    width=max(image_sizes_x)*(no_of_images_across+1)
    height=max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across)))
    
    #print width
    #print height
        
    blank_image = Image.new("RGB", (width,height), "white")

    y_pos=0
    x_pos=0
    across_count=0

    for plot in plot_files:
    
        plot=glob.glob('%s' % plot)[0]
        
        across_count+=1        
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            blank_image.paste(image64, (x_pos,y_pos))
            #print x_pos
            #x_pos+=max(image_sizes_x)
    
        except Exception:
            PrintException()
    
        x_pos+=max(image_sizes_x)
    
        if across_count==no_of_images_across:
            y_pos+=max(image_sizes_y)
            x_pos=0
            across_count=0
        
    draw = ImageDraw.Draw(blank_image)
    model_info='%s %s %s' % (model_name_convert_title.main(experiment_id)[-1], diag, p_level)

    draw.text((max(image_sizes_x)*(no_of_images_across), 
               (max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across))))-max(image_sizes_y)/2), 
              model_info, (0,0,0), font=font)


    blank_image.save(out_image, dpi=(360,360))
    
except Exception:
    PrintException()

    
import os  
os.system("\cp /nfs/a90/eepdw/Figures/EMBRACE/*/*/%s_%s_%s_3hourly_8km_plot_grid.png /nfs/a90/eepdw/Figures/EMBRACE/3hourly_Maps/"\
          % (experiment_id, diag, p_level))


  File "<ipython-input-41-899dfb93b074>", line 19
    experiment_id ='dklyu
                        ^
SyntaxError: EOL while scanning string literal

In [18]:
# EMBRACE hourly Maps

import glob

import imp
import math

import PIL
from PIL import ImageFont
from PIL import Image
from PIL import ImageDraw

font = ImageFont.truetype("/usr/share/fonts/dejavu-lgc/DejaVuLGCSerif.ttf",50)

model_name_convert_title = imp.load_source('util', '/nfs/see-fs-01_users/eepdw/python_scripts/modules/model_name_convert_title.py')

no_of_images_across=6

experiment_id='dkbhu'

diag='temp'
p_level='925'
filename_template='/nfs/a90/eepdw/Figures/EMBRACE/%s/%s/%s_%s_%s_hPa_and_geop_height_' \
              % (experiment_id, diag, experiment_id, diag, p_level)
filename_ending='_short_title.png'
#times=['0000', '0300', '0600', '0900', '1200', '1500', '1800', '2100']
times=['0000', '0100', '0200', '0300', '0400', '0500', '0600', '0700', '0800', 
       '0900', '1000', '1100', '1200', '1300', '1400', '1500', '1600', '1700',
       '1800', '1900', '2000', '2100', '2200', '2300']
plot_files = ['%s%s%s' % (filename_template, time, filename_ending) for time in times]
                
try:    
    
    #plot_files = glob.glob('/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_day/%s_rain_mean_by_day_[_short_title.png' % (experiment_id, experiment_id))
  
    print plot_files
    out_image = "/nfs/a90/eepdw/Figures/EMBRACE/%s/%s_%s_%s_hourly_plot_grid.png"\
                    % (experiment_id, experiment_id, diag, p_level)

    image_sizes_y=[]
    image_sizes_x=[]
    for plot in plot_files:
    
        plot=glob.glob('%s' % plot)[0]
        
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            #print image64.size[1]
                
            image_sizes_x.append(image64.size[0])
            image_sizes_y.append(image64.size[1])
        except Exception:
            PrintException()

    print image_sizes_y            
#width=sum(image_sizes_x)
    width=max(image_sizes_x)*(no_of_images_across+1)
    height=max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across)))
    
    #print width
    #print height
        
    blank_image = Image.new("RGB", (width,height), "white")

    y_pos=0
    x_pos=0
    across_count=0

    for plot in plot_files:
    
        plot=glob.glob('%s' % plot)[0]
        
        across_count+=1        
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            blank_image.paste(image64, (x_pos,y_pos))
            #print x_pos
            #x_pos+=max(image_sizes_x)
    
        except Exception:
            PrintException()
    
        x_pos+=max(image_sizes_x)
    
        if across_count==no_of_images_across:
            y_pos+=max(image_sizes_y)
            x_pos=0
            across_count=0
        
    draw = ImageDraw.Draw(blank_image)
    model_info='%s %s %s' % (model_name_convert_title.main(experiment_id)[-1], diag, p_level)

    draw.text((max(image_sizes_x)*(no_of_images_across), 
               (max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across))))-max(image_sizes_y)/2), 
              model_info, (0,0,0), font=font)


    blank_image.save(out_image, dpi=(360,360))
    
except Exception:
    PrintException()

    
import os  
os.system("\cp /nfs/a90/eepdw/Figures/EMBRACE/*/*/%s_%s_%s_hourly_plot_grid.png /nfs/a90/eepdw/Figures/EMBRACE/3hourly_Maps/"\
          % (experiment_id, diag, p_level))


['/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_0000_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_0100_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_0200_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_0300_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_0400_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_0500_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_0600_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_0700_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_0800_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_0900_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_1000_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_1100_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_1200_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_1300_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_1400_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_1500_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_1600_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_1700_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_1800_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_1900_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_2000_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_2100_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_2200_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dkbhu/temp/dkbhu_temp_925_hPa_and_geop_height_2300_short_title.png']
[650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650]
Out[18]:
256

In [ ]:
# EMBRACE 1 hourly 8km diff Maps

import glob

import imp
import math

In [ ]:


In [ ]:


In [ ]:


In [28]:
# EMBRACE 1 hourly 8km diff Maps

import glob

import imp
import math

import PIL
from PIL import ImageFont
from PIL import Image
from PIL import ImageDraw

font = ImageFont.truetype("/usr/share/fonts/dejavu-lgc/DejaVuLGCSerif.ttf",50)

model_name_convert_legend = imp.load_source('util', '/nfs/see-fs-01_users/eepdw/python_scripts/modules/model_name_convert_legend.py')

no_of_images_across=6

experiment_id='dklyu'
difference_id='dkmbq'
diag='temp'
p_level='925'
#filename_template='/nfs/a90/eepdw/Figures/EMBRACE/%s/%s/%s_%s_%s_diff_from_%s_' \
#              % (experiment_id, diag, experiment_id, diag, p_level, difference_id)
#filename_ending='_short_title.png'
#times=['0000', '0300', '0600', '0900', '1200', '1500', '1800', '2100']
#times=['0000', '0100', '0200', '0300', '0400', '0500', '0600', '0700', '0800', 
 #      '0900', '1000', '1100', '1200', '1300', '1400', '1500', '1600', '1700',
  #     '1800', '1900', '2000', '2100', '2200', '2300']
plot_files = ['%s%s%s' % (filename_template, time, filename_ending) for time in times]
                
try:    
    
    #plot_files = glob.glob('/nfs/a90/eepdw/Figures/EMBRACE/%s/rain_mean_by_day/%s_rain_mean_by_day_[_short_title.png' % (experiment_id, experiment_id))
  
    print plot_files
    out_image = "/nfs/a90/eepdw/Figures/EMBRACE/%s/%s_%s_%s_1hourly_8km_diff_plot_grid.png"\
                    % (experiment_id, experiment_id, diag, p_level)

    image_sizes_y=[]
    image_sizes_x=[]
    for plot in plot_files:
    
        plot=glob.glob('%s' % plot)[0]
        
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            #print image64.size[1]
                
            image_sizes_x.append(image64.size[0])
            image_sizes_y.append(image64.size[1])
        except Exception:
            PrintException()

    print image_sizes_y            
#width=sum(image_sizes_x)
    width=max(image_sizes_x)*(no_of_images_across+1)
    height=max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across)))
    
    #print width
    #print height
        
    blank_image = Image.new("RGB", (width,height), "white")

    y_pos=0
    x_pos=0
    across_count=0

    for plot in plot_files:
    
        plot=glob.glob('%s' % plot)[0]
        
        across_count+=1        
        try:
            
            image64 = Image.open(open(plot, 'rb'))
            blank_image.paste(image64, (x_pos,y_pos))
            #print x_pos
            #x_pos+=max(image_sizes_x)
    
        except Exception:
            PrintException()
    
        x_pos+=max(image_sizes_x)
    
        if across_count==no_of_images_across:
            y_pos+=max(image_sizes_y)
            x_pos=0
            across_count=0
        
    draw = ImageDraw.Draw(blank_image)
    model_info='%s %s %s Diff' % (model_name_convert_title.main(experiment_id)[-1], diag, p_level)

    draw.text((max(image_sizes_x)*(no_of_images_across), 
               (max(image_sizes_y) * int(math.ceil(float(len(plot_files))/float(no_of_images_across))))-max(image_sizes_y)/2), 
              model_info, (0,0,0), font=font)


    blank_image.save(out_image, dpi=(360,360))
    
except Exception:
    PrintException()

    
import os  
os.system("\cp %s  /nfs/a90/eepdw/Figures/EMBRACE/Hourly_Maps/"\
          % (out_image))


['/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_0000_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_0100_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_0200_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_0300_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_0400_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_0500_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_0600_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_0700_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_0800_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_0900_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_1000_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_1100_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_1200_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_1300_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_1400_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_1500_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_1600_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_1700_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_1800_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_1900_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_2000_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_2100_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_2200_short_title.png', '/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_2300_short_title.png']
[650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650]
Out[28]:
256

In [7]:
experiment_id='dklyu'
difference_id='dkmbq'
diag='temp'
p_level='925'
filename_template='/nfs/a90/eepdw/Figures/EMBRACE/%s/%s/%s_%s_%s_diff_from_%s_' \
              % (experiment_id, diag, experiment_id, diag, p_level, difference_id)
filename_ending='_short_title.png'
times=['0000', '0300', '0600', '0900', '1200', '1500', '1800', '2100']

plot_files = ['%s%s%s' % (filename_template, time, filename_ending) for time in times]

In [8]:
plot_files[0]


Out[8]:
'/nfs/a90/eepdw/Figures/EMBRACE/dklyu/temp/dklyu_temp_925_diff_from_dkmbq_0000_short_title.png'