Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LIVVkit
lex
Commits
bd032194
Commit
bd032194
authored
Feb 27, 2018
by
Kennedy, Joseph H
Browse files
Fixes to clouds extension -- now works on Rhea (only)
parent
d8cc3c59
Changes
4
Hide whitespace changes
Inline
Side-by-side
clouds/clouds/cesm_cldhgh_ann.py
View file @
bd032194
...
...
@@ -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'
,
...
...
clouds/clouds/cesm_cldlow_ann.py
View file @
bd032194
...
...
@@ -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'
,
...
...
clouds/clouds/cesm_cldtot_ann.py
View file @
bd032194
...
...
@@ -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_cld
hgh
_ANN'
,
img_elem
=
el
.
image
(
'CESM_cld
tot
_ANN'
,
' '
.
join
(
describe
.
split
()),
img_link
)
if
config
:
...
...
clouds/clouds_cesm.py
View file @
bd032194
...
...
@@ -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'
])
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment