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
2b0488b5
Commit
2b0488b5
authored
Mar 08, 2018
by
Kennedy, Joseph H
Browse files
Fix yearly cylce plots (were only showing out to 10 months)
parent
43438289
Changes
3
Hide whitespace changes
Inline
Side-by-side
clouds/clouds/yearly_cycle_cldhgh.py
View file @
2b0488b5
...
...
@@ -16,7 +16,7 @@ def make_plot(config=None, out_path='.',
img_list
=
[]
months
=
[
'01'
,
'02'
,
'03'
,
'04'
,
'05'
,
'06'
,
'07'
,
'08'
,
'09'
,
'
10
'
,
'
11
'
,
'
12
'
]
months
=
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
]
percent_vals
=
[]
model_vals
=
[]
cldsat_vals
=
[]
...
...
@@ -25,17 +25,17 @@ def make_plot(config=None, out_path='.',
for
month
in
months
:
# CESM1
f_cesm
=
os
.
path
.
join
(
cesm_path
,
"postproc"
,
"atm"
,
"climos"
,
"b.e10.BG20TRCN.f09_g16.002_{}_aavg_climo.nc"
.
format
(
month
))
"b.e10.BG20TRCN.f09_g16.002_{
:02d
}_aavg_climo.nc"
.
format
(
month
))
ncid1
=
Dataset
(
f_cesm
,
mode
=
'r'
)
model_cld
=
ncid1
.
variables
[
'CLDHGH'
][
0
]
# CLDSAT
f_cloudsat
=
os
.
path
.
join
(
cloud_path
,
"CLOUDSAT_{}_aavg_climo.nc"
.
format
(
month
))
f_cloudsat
=
os
.
path
.
join
(
cloud_path
,
"CLOUDSAT_{
:02d
}_aavg_climo.nc"
.
format
(
month
))
ncid2
=
Dataset
(
f_cloudsat
,
mode
=
'r'
)
cldsat_cld
=
ncid2
.
variables
[
'CLDHGH'
][
0
]
# ISCCP
f_isccp
=
os
.
path
.
join
(
cloud_path
,
"ISCCP_{}_aavg_climo.nc"
.
format
(
month
))
f_isccp
=
os
.
path
.
join
(
cloud_path
,
"ISCCP_{
:02d
}_aavg_climo.nc"
.
format
(
month
))
ncid3
=
Dataset
(
f_isccp
,
mode
=
'r'
)
isccp_cld
=
ncid3
.
variables
[
'CLDHGH'
][
0
]
...
...
@@ -58,8 +58,10 @@ def make_plot(config=None, out_path='.',
plt
.
plot
(
months
,
isccp_vals
,
'c-.'
)
plt
.
xlabel
(
'Months of climatology'
)
plt
.
ylabel
(
'Percent total cloud'
)
plt
.
tight_layout
()
img_path
=
os
.
path
.
join
(
out_path
,
'CESM_yearly_cycle_CLDHGH.png'
)
plt
.
savefig
(
img_path
,
bbox_inches
=
'tight'
)
plt
.
savefig
(
img_path
)
plt
.
close
()
img_link
=
os
.
path
.
join
(
os
.
path
.
basename
(
out_path
),
...
...
clouds/clouds/yearly_cycle_cldlow.py
View file @
2b0488b5
...
...
@@ -16,7 +16,7 @@ def make_plot(config=None, out_path='.',
img_list
=
[]
months
=
[
'01'
,
'02'
,
'03'
,
'04'
,
'05'
,
'06'
,
'07'
,
'08'
,
'09'
,
'
10
'
,
'
11
'
,
'
12
'
]
months
=
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
]
percent_vals
=
[]
model_vals
=
[]
cldsat_vals
=
[]
...
...
@@ -26,17 +26,17 @@ def make_plot(config=None, out_path='.',
# ---------------- Data source at OLCF ------------------------
# CESM1
input_file1
=
os
.
path
.
join
(
cesm_path
,
"postproc"
,
"atm"
,
"climos"
,
"b.e10.BG20TRCN.f09_g16.002_{}_aavg_climo.nc"
.
format
(
month
))
"b.e10.BG20TRCN.f09_g16.002_{
:02d
}_aavg_climo.nc"
.
format
(
month
))
ncid1
=
Dataset
(
input_file1
,
mode
=
'r'
)
model_cld
=
ncid1
.
variables
[
'CLDLOW'
][
0
]
# CLDSAT
f_cloudsat
=
os
.
path
.
join
(
cloud_path
,
"CLOUDSAT_{}_aavg_climo.nc"
.
format
(
month
))
f_cloudsat
=
os
.
path
.
join
(
cloud_path
,
"CLOUDSAT_{
:02d
}_aavg_climo.nc"
.
format
(
month
))
ncid2
=
Dataset
(
f_cloudsat
,
mode
=
'r'
)
cldsat_cld
=
ncid2
.
variables
[
'CLDLOW'
][
0
]
# ISCCP
f_isccp
=
os
.
path
.
join
(
cloud_path
,
"ISCCP_{}_aavg_climo.nc"
.
format
(
month
))
f_isccp
=
os
.
path
.
join
(
cloud_path
,
"ISCCP_{
:02d
}_aavg_climo.nc"
.
format
(
month
))
ncid3
=
Dataset
(
f_isccp
,
mode
=
'r'
)
isccp_cld
=
ncid3
.
variables
[
'CLDLOW'
][
0
]
...
...
@@ -59,8 +59,10 @@ def make_plot(config=None, out_path='.',
plt
.
plot
(
months
,
isccp_vals
,
'c-.'
)
plt
.
xlabel
(
'Months of climatology'
)
plt
.
ylabel
(
'Percent total cloud'
)
plt
.
tight_layout
()
img_path
=
os
.
path
.
join
(
out_path
,
'CESM_yearly_cycle_CLDLOW.png'
)
plt
.
savefig
(
img_path
,
bbox_inches
=
'tight'
)
plt
.
savefig
(
img_path
)
plt
.
close
()
img_link
=
os
.
path
.
join
(
os
.
path
.
basename
(
out_path
),
...
...
clouds/clouds/yearly_cycle_cldtot.py
View file @
2b0488b5
...
...
@@ -16,7 +16,7 @@ def make_plot(config=None, out_path='.',
img_list
=
[]
months
=
[
'01'
,
'02'
,
'03'
,
'04'
,
'05'
,
'06'
,
'07'
,
'08'
,
'09'
,
'
10
'
,
'
11
'
,
'
12
'
]
months
=
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
]
percent_vals
=
[]
model_vals
=
[]
cldsat_vals
=
[]
...
...
@@ -26,17 +26,17 @@ def make_plot(config=None, out_path='.',
# ---------------- Data source at OLCF ------------------------
# CESM1
f_cesm
=
os
.
path
.
join
(
cesm_path
,
"postproc"
,
"atm"
,
"climos"
,
"b.e10.BG20TRCN.f09_g16.002_{}_aavg_climo.nc"
.
format
(
month
))
"b.e10.BG20TRCN.f09_g16.002_{
:02d
}_aavg_climo.nc"
.
format
(
month
))
ncid1
=
Dataset
(
f_cesm
,
mode
=
'r'
)
model_cld
=
ncid1
.
variables
[
'CLDTOT'
][
0
]
# CLDSAT
f_cloudsat
=
os
.
path
.
join
(
cloud_path
,
"CLOUDSAT_{}_aavg_climo.nc"
.
format
(
month
))
f_cloudsat
=
os
.
path
.
join
(
cloud_path
,
"CLOUDSAT_{
:02d
}_aavg_climo.nc"
.
format
(
month
))
ncid2
=
Dataset
(
f_cloudsat
,
mode
=
'r'
)
cldsat_cld
=
ncid2
.
variables
[
'CLDTOT'
][
0
]
# ISCCP
f_isccp
=
os
.
path
.
join
(
cloud_path
,
"ISCCP_{}_aavg_climo.nc"
.
format
(
month
))
f_isccp
=
os
.
path
.
join
(
cloud_path
,
"ISCCP_{
:02d
}_aavg_climo.nc"
.
format
(
month
))
ncid3
=
Dataset
(
f_isccp
,
mode
=
'r'
)
isccp_cld
=
ncid3
.
variables
[
'CLDTOT'
][
0
]
...
...
@@ -59,8 +59,10 @@ def make_plot(config=None, out_path='.',
plt
.
plot
(
months
,
isccp_vals
,
'c-.'
)
plt
.
xlabel
(
'Months of climatology'
)
plt
.
ylabel
(
'Percent total cloud'
)
plt
.
tight_layout
()
img_path
=
os
.
path
.
join
(
out_path
,
'CESM_yearly_cycle_CLDTOT.png'
)
plt
.
savefig
(
img_path
,
bbox_inches
=
'tight'
)
plt
.
savefig
(
img_path
)
plt
.
close
()
img_link
=
os
.
path
.
join
(
os
.
path
.
basename
(
out_path
),
...
...
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