Commit bd032194 authored by Kennedy, Joseph H's avatar Kennedy, Joseph H
Browse files

Fixes to clouds extension -- now works on Rhea (only)

parent d8cc3c59
......@@ -49,21 +49,22 @@ def make_plot(config=None, out_path='.',
cloudsat_lat = cloudsat.variables['lat'][:]
cloudsat_lon = cloudsat.variables['lon'][:]
print("contour plot of CLDHGH vs obs")
maxmodel = np.max(cesm_cldhgh)
maxisccp = np.max(isccp_hgh)
maxcldsat = np.max(cloudsat_hgh)
print("Max CLDHGH model: {}".format(maxmodel))
print("Max CLDHGH f_isccp: {}".format(maxisccp))
print("Max CLDHGH cldsat: {}".format(maxcldsat))
# print("contour plot of CLDHGH vs obs")
# maxmodel = np.max(cesm_cldhgh)
# maxisccp = np.max(isccp_hgh)
# maxcldsat = np.max(cloudsat_hgh)
# print("Max CLDHGH model: {}".format(maxmodel))
# print("Max CLDHGH f_isccp: {}".format(maxisccp))
# print("Max CLDHGH cldsat: {}".format(maxcldsat))
# ------- PLOT --------
# Open a workstation for drawing the plots
wkres = Ngl.Resources()
wkres.wkColorMap = "BlueWhiteOrangeRed"
wkres.wkOrientation = "portrait"
# wkres.wkOrientation = "portrait"
wks_type = "png"
wks_img = os.path.join(out_path, 'CESM_cldhgh_ANN')
wks_img = str(os.path.join(out_path, 'CESM_cldhgh_ANN'))
wks = Ngl.open_wks(wks_type, wks_img, wkres)
# --- for the map -------
......@@ -184,8 +185,6 @@ def make_plot(config=None, out_path='.',
Ngl.panel(wks, plot, [1, 3])
Ngl.end()
img_link = os.path.join(os.path.basename(out_path),
os.path.basename(wks_img + '.' + wks_type))
img_elem = el.image('CESM_cldhgh_ANN',
......
......@@ -49,22 +49,22 @@ def make_plot(config=None, out_path='.',
cloudsat_lat = cloudsat.variables['lat'][:]
cloudsat_lon = cloudsat.variables['lon'][:]
print("contour plot of CLDLOW vs obs")
maxmodel = np.max(cesm_low)
maxisccp = np.max(isccp_low)
maxcldsat = np.max(cloudsat_low)
print("Max CLDLOW model: {}".format(maxmodel))
print("Max CLDLOW isccp: {}".format(maxisccp))
print("Max CLDLOW cldsat: {}".format(maxcldsat))
# print("contour plot of CLDLOW vs obs")
# maxmodel = np.max(cesm_low)
# maxisccp = np.max(isccp_low)
# maxcldsat = np.max(cloudsat_low)
# print("Max CLDLOW model: {}".format(maxmodel))
# print("Max CLDLOW isccp: {}".format(maxisccp))
# print("Max CLDLOW cldsat: {}".format(maxcldsat))
# ------- PLOT --------
# Open a workstation for drawing the plots
wkres = Ngl.Resources()
# wkres.wkColorMap = "WhiteBlueGreenYellowRed"
wkres.wkColorMap = "BlueWhiteOrangeRed"
wkres.wkOrientation = "portrait" # "portrait" or "landscape"
# wkres.wkOrientation = "portrait" # "portrait" or "landscape"
wks_type = "png"
wks_img = os.path.join(out_path, "CESM_cldlow_ANN")
wks_img = str(os.path.join(out_path, "CESM_cldlow_ANN"))
wks = Ngl.open_wks(wks_type, wks_img, wkres)
# --- for the map -------
......@@ -185,8 +185,6 @@ def make_plot(config=None, out_path='.',
Ngl.panel(wks, plot, [1, 3])
Ngl.end()
img_link = os.path.join(os.path.basename(out_path),
os.path.basename(wks_img + '.' + wks_type))
img_elem = el.image('CESM_cldlow_ANN',
......
......@@ -49,22 +49,22 @@ def make_plot(config=None, out_path='.',
cloudsat_lat = cloudsat.variables['lat'][:]
cloudsat_lon = cloudsat.variables['lon'][:]
print("contour plot of CLDTOT vs obs")
maxmodel = np.max(cesm_tot)
maxisccp = np.max(isccp_tot)
maxcldsat = np.max(cloudsat_tot)
print("Max CLDTOT model: {}".format(maxmodel))
print("Max CLDTOT isccp: {}".format(maxisccp))
print("Max CLDTOT cldsat: {}".format(maxcldsat))
# print("contour plot of CLDTOT vs obs")
# maxmodel = np.max(cesm_tot)
# maxisccp = np.max(isccp_tot)
# maxcldsat = np.max(cloudsat_tot)
# print("Max CLDTOT model: {}".format(maxmodel))
# print("Max CLDTOT isccp: {}".format(maxisccp))
# print("Max CLDTOT cldsat: {}".format(maxcldsat))
# ------- PLOT --------
# Open a workstation for drawing the plots
wkres = Ngl.Resources()
# wkres.wkColorMap = "WhiteBlueGreenYellowRed"
wkres.wkColorMap = "BlueWhiteOrangeRed"
wkres.wkOrientation = "portrait" # "portrait" or "landscape"
# wkres.wkOrientation = "portrait" # "portrait" or "landscape"
wks_type = "png"
wks_img = os.path.join(out_path, "CESM_cldtot_ANN")
wks_img = str(os.path.join(out_path, "CESM_cldtot_ANN"))
wks = Ngl.open_wks(wks_type, wks_img, wkres)
# --- for the map -------
......@@ -184,12 +184,10 @@ def make_plot(config=None, out_path='.',
Ngl.overlay(plot[2], usrf_plot3)
Ngl.panel(wks, plot, [1, 3])
Ngl.end()
img_link = os.path.join(os.path.basename(out_path),
os.path.basename(wks_img + '.' + wks_type))
img_elem = el.image('CESM_cldhgh_ANN',
img_elem = el.image('CESM_cldtot_ANN',
' '.join(describe.split()),
img_link)
if config:
......
......@@ -64,12 +64,12 @@ def run(name, config):
# PLOTS
img_list = []
img_list.extend(clouds_high.make_plot())
img_list.extend(clouds_low.make_plot())
img_list.extend(clouds_total.make_plot())
img_list.extend(yrly_high.make_plot())
img_list.extend(yrly_low.make_plot())
img_list.extend(yrly_total.make_plot())
img_list.extend( clouds_high.make_plot(config, out_path=img_dir))
img_list.extend( clouds_low.make_plot(config, out_path=img_dir))
img_list.extend(clouds_total.make_plot(config, out_path=img_dir))
img_list.extend( yrly_high.make_plot(config, out_path=img_dir))
img_list.extend( yrly_low.make_plot(config, out_path=img_dir))
img_list.extend( yrly_total.make_plot(config, out_path=img_dir))
element_list = [el.gallery('Figures', img_list)]
ref_bib = utils.bib2html(config['references'])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment