66
66
import pyproj
67
67
import argparse
68
68
import cartopy
69
+ import warnings
69
70
70
71
#--------------Define some functions ------------------#
71
72
@@ -239,6 +240,9 @@ def rotate_wind(true_lat,lov_lon,earth_lons,uin,vin,proj,inverse=False):
239
240
parser .add_argument ("Name of native domain used in forecasts (and in constructing post file names)" )
240
241
args = parser .parse_args ()
241
242
243
+ # Throw away python warnings (mostly depreciation.)
244
+ warnings .simplefilter ("ignore" )
245
+
242
246
# Read date/time, forecast hour, and directory paths from command line
243
247
ymdh = str (sys .argv [1 ])
244
248
ymd = ymdh [0 :8 ]
@@ -960,7 +964,8 @@ def plot_all(dom):
960
964
cs_1 .cmap .set_over ('pink' )
961
965
cbar1 = plt .colorbar (cs_1 ,ax = ax1 ,orientation = 'horizontal' ,pad = 0.05 ,shrink = 0.6 ,extend = 'max' )
962
966
cbar1 .set_label (units ,fontsize = 6 )
963
- cbar1 .ax .set_xticklabels ([0.1 ,0.5 ,1 ,1.5 ,2 ,3 ,5 ,10 ,20 ])
967
+ #cbar1.ax.set_xticklabels([0.1,0.5,1,1.5,2,3,5,10,20])
968
+ cbar1 .ax .set_xticklabels ([0.1 , 0.3 , 0.5 , 0.75 , 1 , 1.25 , 1.5 , 1.75 , 2 , 2.5 , 3 , 4 , 5 , 7.5 , 10 , 15 , 17.5 , 20 ])
964
969
cbar1 .ax .tick_params (labelsize = 6 )
965
970
ax1 .text (.5 ,1.03 ,'FV3-LAM ' + fhour + '-hr Accumulated Precipitation (' + units + ') \n initialized: ' + itime + ' valid: ' + vtime + ' (f' + fhour + ')' ,horizontalalignment = 'center' ,fontsize = 6 ,transform = ax1 .transAxes ,bbox = dict (facecolor = 'white' ,alpha = 0.85 ,boxstyle = 'square,pad=0.2' ))
966
971
@@ -969,7 +974,8 @@ def plot_all(dom):
969
974
cs_2 .cmap .set_over ('pink' )
970
975
cbar2 = plt .colorbar (cs_2 ,ax = ax2 ,orientation = 'horizontal' ,pad = 0.05 ,shrink = 0.6 ,extend = 'max' )
971
976
cbar2 .set_label (units ,fontsize = 6 )
972
- cbar2 .ax .set_xticklabels ([0.1 ,0.5 ,1 ,1.5 ,2 ,3 ,5 ,10 ,20 ])
977
+ #cbar2.ax.set_xticklabels([0.1,0.5,1,1.5,2,3,5,10,20])
978
+ cbar2 .ax .set_xticklabels ([0.1 , 0.3 , 0.5 , 0.75 , 1 , 1.25 , 1.5 , 1.75 , 2 , 2.5 , 3 , 4 , 5 , 7.5 , 10 , 15 , 17.5 , 20 ])
973
979
cbar2 .ax .tick_params (labelsize = 6 )
974
980
ax2 .text (.5 ,1.03 ,'FV3-LAM-2 ' + fhour + '-hr Accumulated Precipitation (' + units + ') \n initialized: ' + itime + ' valid: ' + vtime + ' (f' + fhour + ')' ,horizontalalignment = 'center' ,fontsize = 6 ,transform = ax2 .transAxes ,bbox = dict (facecolor = 'white' ,alpha = 0.85 ,boxstyle = 'square,pad=0.2' ))
975
981
0 commit comments