1313 matplotlib_available = True
1414 try :
1515 from mpl_toolkits .basemap import Basemap
16- basemap_available = False # Core dumping due to Geos Error
16+ basemap_available = False
1717 except :
1818 basemap_available = False
1919except :
@@ -32,9 +32,9 @@ def uhs(data, title, case_id, plot_dir):
3232 Plot diagnostic plot showing all unit hydrographs
3333 """
3434 today = date .today ().strftime ('%Y%m%d' )
35- file_name = "{}_{}_{}.png" .format (title .lower ().replace (" " , "_" ),
36- case_id .lower ().replace (" " , "_" ),
37- today )
35+ file_name = "{0 }_{1 }_{2 }.png" .format (title .lower ().replace (" " , "_" ),
36+ case_id .lower ().replace (" " , "_" ),
37+ today )
3838 pfname = os .path .join (plot_dir , file_name )
3939
4040 fig = plt .figure ()
@@ -56,9 +56,9 @@ def _fractions_grid(data, dom_x, dom_y, title, case_id, plot_dir):
5656 # ---------------------------------------------------------------- #
5757 # Plot Fractions
5858 today = date .today ().strftime ('%Y%m%d' )
59- file_name = "{}_{}_{}.png" .format (title .lower ().replace (" " , "_" ),
60- case_id .lower ().replace (" " , "_" ),
61- today )
59+ file_name = "{0 }_{1 }_{2 }.png" .format (title .lower ().replace (" " , "_" ),
60+ case_id .lower ().replace (" " , "_" ),
61+ today )
6262 pfname = os .path .join (plot_dir , file_name )
6363
6464 mask = data <= 0.0
@@ -75,7 +75,7 @@ def _fractions_grid(data, dom_x, dom_y, title, case_id, plot_dir):
7575 plt .title (title )
7676 plt .xlabel ('x' )
7777 plt .ylabel ('y' )
78- plt .gca ().invert_yaxis ()
78+ # plt.gca().invert_yaxis()
7979 fig .savefig (pfname )
8080 # ---------------------------------------------------------------- #
8181 return pfname
@@ -90,9 +90,9 @@ def _fractions_map(data, dom_x, dom_y, title, case_id, plot_dir):
9090 # ---------------------------------------------------------------- #
9191 # Plot Fractions
9292 today = date .today ().strftime ('%Y%m%d' )
93- file_name = "{}_{}_{}.png" .format (title .lower ().replace (" " , "_" ),
94- case_id .lower ().replace (" " , "_" ),
95- today )
93+ file_name = "{0 }_{1 }_{2 }.png" .format (title .lower ().replace (" " , "_" ),
94+ case_id .lower ().replace (" " , "_" ),
95+ today )
9696 pfname = os .path .join (plot_dir , file_name )
9797
9898 fig = plt .figure (figsize = (8 , 8 ))
@@ -109,7 +109,6 @@ def _fractions_map(data, dom_x, dom_y, title, case_id, plot_dir):
109109 # define projection
110110 midx = int (dom_x .shape [1 ]/ 2 )
111111 midy = int (dom_x .shape [0 ]/ 2 )
112- print midx , midy
113112
114113 projection = {'projection' : 'stere' ,
115114 'lon_0' : dom_x [- 1 , midx ],
@@ -136,7 +135,6 @@ def _fractions_map(data, dom_x, dom_y, title, case_id, plot_dir):
136135 m .drawmeridians (meridians , labels = [0 , 0 , 0 , 1 ])
137136
138137 x , y = m (dom_x , dom_y ) # compute map proj coordinates.
139- print 'passed 1'
140138 cs = m .pcolormesh (x , y , data , cmap = cmap )
141139 m .colorbar (cs , location = 'right' , pad = "5%" )
142140 plt .title (title )
0 commit comments