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
6d96bc36
Commit
6d96bc36
authored
Sep 28, 2018
by
Kennedy, Joseph H
Browse files
Fix depreciations in smb extension
parent
8afe68e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
smb/smb/plot_core_transects.py
View file @
6d96bc36
...
...
@@ -169,7 +169,8 @@ def main(args):
#Accumulation
accplot
=
working
[
working
.
source
!=
'promice'
]
testplot
=
accplot
.
plot
(
kind
=
'scatter'
,
x
=
'b'
,
y
=
'mod_b'
,
s
=
30
,
c
=
majorbasins
.
apply
(
lambda
x
:
colors
[
x
]),
legend
=
True
,
alpha
=
0.6
,
figsize
=
(
8
,
8
))
majorbasins
=
np
.
floor
(
accplot
.
zwallyBasin
).
astype
(
'str'
)
testplot
=
accplot
.
plot
(
kind
=
'scatter'
,
x
=
'b'
,
y
=
'mod_b'
,
s
=
30
,
c
=
majorbasins
.
apply
(
lambda
x
:
colors
[
x
]),
legend
=
True
,
alpha
=
0.6
,
figsize
=
(
8
,
8
))
testplot
.
set_xlabel
(
'Field SMB estimate (kg m$^{-2}$ a$^{-1}$)'
)
testplot
.
set_ylabel
(
'Modeled SMB (kg m$^{-2}$ a$^{-1}$)'
)
#testplot.set_facecolor('white')
...
...
@@ -184,7 +185,7 @@ def main(args):
plt
.
close
()
img_link
=
os
.
path
.
join
(
os
.
path
.
basename
(
args
.
out
),
os
.
path
.
basename
(
img_file
))
img_elem
=
EL
.
image
(
'Modeled SMB vs. field accumulation'
,
img_elem
=
EL
.
image
(
'Modeled SMB vs. field accumulation'
,
' '
.
join
(
describe_facc
.
split
()),
img_link
)
img_elem
[
'Height'
]
=
args
.
img_height
...
...
@@ -192,6 +193,7 @@ def main(args):
#Ablation
ablplot
=
working
[
working
.
source
==
'promice'
]
majorbasins
=
np
.
floor
(
ablplot
.
zwallyBasin
).
astype
(
'str'
)
testplot
=
ablplot
.
plot
(
kind
=
'scatter'
,
x
=
'b'
,
y
=
'mod_b'
,
s
=
30
,
c
=
majorbasins
.
apply
(
lambda
x
:
colors
[
x
]),
legend
=
True
,
alpha
=
0.6
,
figsize
=
(
8
,
8
))
testplot
.
set_xlabel
(
'Field SMB estimate (kg m$^{-2}$ a$^{-1}$)'
)
testplot
.
set_ylabel
(
'Modeled SMB (kg m$^{-2}$ a$^{-1}$)'
)
...
...
@@ -207,10 +209,10 @@ def main(args):
plt
.
close
()
img_link
=
os
.
path
.
join
(
os
.
path
.
basename
(
args
.
out
),
os
.
path
.
basename
(
img_file
))
img_elem
=
EL
.
image
(
'Modeled SMB vs field ablation'
,
img_elem
=
EL
.
image
(
'Modeled SMB vs field ablation'
,
' '
.
join
(
describe_fabl
.
split
()),
img_link
)
img_elem
[
'Height'
]
=
args
.
img_height
img_list
.
append
(
img_elem
)
return
img_list
return
img_list
smb/smb/plot_metadata_spatial.py
View file @
6d96bc36
...
...
@@ -83,7 +83,7 @@ def main(args):
m
.
drawmeridians
(
np
.
arange
(
-
180.
,
181.
,
10.
),
labels
=
[
0
,
0
,
0
,
1
],
fontsize
=
10
,
color
=
'lightgrey'
,
zorder
=
1
)
#Read in the zwally basins and mask out model cells that are missing a basin designation
basins
=
np
.
floor
(
zwally_data
.
zwally_basin
.
as_matrix
()
)
basins
=
np
.
floor
(
zwally_data
.
zwally_basin
.
values
)
mask
=
(
basins
.
flatten
()
<
0.0001
)
basins
[
np
.
where
(
mask
)]
=
np
.
nan
basins
.
shape
=
SMB_model
.
squeeze
().
shape
...
...
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