Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LIVVkit
lex
Commits
c454342a
Commit
c454342a
authored
Oct 07, 2018
by
Evans, Katherine
Browse files
chg cesm to model for variables in energy plot files
parent
85650b70
Changes
14
Hide whitespace changes
Inline
Side-by-side
energy/energy/model_racmo23_albedo.py
View file @
c454342a
...
@@ -25,7 +25,7 @@ def make_plot(config, out_path='.'):
...
@@ -25,7 +25,7 @@ def make_plot(config, out_path='.'):
# ---------------- Data source in TITAN ------------------------
# ---------------- Data source in TITAN ------------------------
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_cesm_lnd_climo_jja
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
f_cesm_lnd_climo_jja
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
'b.e10.BG20TRCN.f09_g16.002_JJA_
196006_200508_
climo.nc'
)
'b.e10.BG20TRCN.f09_g16.002_JJA_climo.nc'
)
f_racmo_alb_jja
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.alb.1980-1999.JJA.nc'
)
f_racmo_alb_jja
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.alb.1980-1999.JJA.nc'
)
f_racmo_alb_jja_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
f_racmo_alb_jja_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.alb.1980-1999.remap2cesm.JJA.nc'
)
'racmo23_GRN_monthly.alb.1980-1999.remap2cesm.JJA.nc'
)
...
...
energy/energy/model_racmo23_latf.py
View file @
c454342a
...
@@ -25,8 +25,8 @@ title = "Summer latent heat flux"
...
@@ -25,8 +25,8 @@ title = "Summer latent heat flux"
def
make_plot
(
config
,
out_path
=
'.'
):
def
make_plot
(
config
,
out_path
=
'.'
):
# ---------------- Data source in TITAN ------------------------
# ---------------- Data source in TITAN ------------------------
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_
cesm
_lnd_climo_jja
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
f_
model
_lnd_climo_jja
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
'b.e10.BG20TRCN.f09_g16.002_JJA_
196006_200508_
climo.nc'
)
'b.e10.BG20TRCN.f09_g16.002_JJA_climo.nc'
)
f_racmo_latf_jja
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.latf.1980-1999.JJA.nc'
)
f_racmo_latf_jja
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.latf.1980-1999.JJA.nc'
)
f_racmo_latf_jja_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
f_racmo_latf_jja_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.latf.1980-1999.remap2cesm.JJA.nc'
)
'racmo23_GRN_monthly.latf.1980-1999.remap2cesm.JJA.nc'
)
...
@@ -46,8 +46,8 @@ def make_plot(config, out_path='.'):
...
@@ -46,8 +46,8 @@ def make_plot(config, out_path='.'):
lat
=
ncid0
.
variables
[
'lat'
][
0
,
:,
:]
lat
=
ncid0
.
variables
[
'lat'
][
0
,
:,
:]
lon
=
ncid0
.
variables
[
'lon'
][
0
,
:,
:]
lon
=
ncid0
.
variables
[
'lon'
][
0
,
:,
:]
# read f_
cesm
_lnd_climo_jja, CESM variables
# read f_
model
_lnd_climo_jja, CESM variables
ncid1
=
Dataset
(
f_
cesm
_lnd_climo_jja
)
ncid1
=
Dataset
(
f_
model
_lnd_climo_jja
)
qsoil
=
ncid1
.
variables
[
'QSOIL'
][
0
,
:,
:]
qsoil
=
ncid1
.
variables
[
'QSOIL'
][
0
,
:,
:]
lat1
=
ncid1
.
variables
[
'lat'
][:]
lat1
=
ncid1
.
variables
[
'lat'
][:]
lon1
=
ncid1
.
variables
[
'lon'
][:]
lon1
=
ncid1
.
variables
[
'lon'
][:]
...
...
energy/energy/model_racmo23_lwsd.py
View file @
c454342a
...
@@ -25,8 +25,8 @@ title = "Summer downward longwave radiation"
...
@@ -25,8 +25,8 @@ title = "Summer downward longwave radiation"
def
make_plot
(
config
,
out_path
=
'.'
):
def
make_plot
(
config
,
out_path
=
'.'
):
# ---------------- Data source in TITAN ------------------------
# ---------------- Data source in TITAN ------------------------
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_
cesm
_lnd_climo_jja
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
f_
model
_lnd_climo_jja
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
'b.e10.BG20TRCN.f09_g16.002_JJA_
196006_200508_
climo.nc'
)
'b.e10.BG20TRCN.f09_g16.002_JJA_climo.nc'
)
f_racmo_lwsd_jja
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.lwsd.1980-1999.JJA.nc'
)
f_racmo_lwsd_jja
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.lwsd.1980-1999.JJA.nc'
)
f_racmo_lwsd_jja_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
f_racmo_lwsd_jja_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.lwsd.1980-1999.remap2cesm.JJA.nc'
)
'racmo23_GRN_monthly.lwsd.1980-1999.remap2cesm.JJA.nc'
)
...
@@ -46,8 +46,8 @@ def make_plot(config, out_path='.'):
...
@@ -46,8 +46,8 @@ def make_plot(config, out_path='.'):
lat
=
ncid0
.
variables
[
'lat'
][
0
,
:,
:]
lat
=
ncid0
.
variables
[
'lat'
][
0
,
:,
:]
lon
=
ncid0
.
variables
[
'lon'
][
0
,
:,
:]
lon
=
ncid0
.
variables
[
'lon'
][
0
,
:,
:]
# read f_
cesm
_lnd_climo_jja, variable of CESM
# read f_
model
_lnd_climo_jja, variable of CESM
ncid1
=
Dataset
(
f_
cesm
_lnd_climo_jja
)
ncid1
=
Dataset
(
f_
model
_lnd_climo_jja
)
flds
=
ncid1
.
variables
[
'FLDS'
][
0
,
:,
:]
flds
=
ncid1
.
variables
[
'FLDS'
][
0
,
:,
:]
lat1
=
ncid1
.
variables
[
'lat'
][:]
lat1
=
ncid1
.
variables
[
'lat'
][:]
lon1
=
ncid1
.
variables
[
'lon'
][:]
lon1
=
ncid1
.
variables
[
'lon'
][:]
...
...
energy/energy/model_racmo23_lwsn.py
View file @
c454342a
...
@@ -25,8 +25,8 @@ title = "Net summer longwave radiation"
...
@@ -25,8 +25,8 @@ title = "Net summer longwave radiation"
def
make_plot
(
config
,
out_path
=
'.'
):
def
make_plot
(
config
,
out_path
=
'.'
):
# ---------------- Data source in TITAN ------------------------
# ---------------- Data source in TITAN ------------------------
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_
cesm
_lnd_climo_jja
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
f_
model
_lnd_climo_jja
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
'b.e10.BG20TRCN.f09_g16.002_JJA_
196006_200508_
climo.nc'
)
'b.e10.BG20TRCN.f09_g16.002_JJA_climo.nc'
)
f_racmo_lwsn_jja
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.lwsn.1980-1999.JJA.nc'
)
f_racmo_lwsn_jja
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.lwsn.1980-1999.JJA.nc'
)
f_racmo_lwsn_jja_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
f_racmo_lwsn_jja_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.lwsn.1980-1999.remap2cesm.JJA.nc'
)
'racmo23_GRN_monthly.lwsn.1980-1999.remap2cesm.JJA.nc'
)
...
@@ -38,7 +38,7 @@ def make_plot(config, out_path='.'):
...
@@ -38,7 +38,7 @@ def make_plot(config, out_path='.'):
# f_cism get the following, matrixsize[301,561]
# f_cism get the following, matrixsize[301,561]
# usrf(0,:,:), lat(0,:,:), lon(0,:,:)
# usrf(0,:,:), lat(0,:,:), lon(0,:,:)
#
#
# f_
cesm
_lnd_climo_jja get FSDS (mean downwelling solar flux),FSA (mean net solar flux, absorbed)
# f_
model
_lnd_climo_jja get FSDS (mean downwelling solar flux),FSA (mean net solar flux, absorbed)
# FSR (the mean net solar flux, reflected)
# FSR (the mean net solar flux, reflected)
# FSDS(0,:,:), FSA(0,:,:), FSR(0,:,:)
# FSDS(0,:,:), FSA(0,:,:), FSR(0,:,:)
...
@@ -51,8 +51,8 @@ def make_plot(config, out_path='.'):
...
@@ -51,8 +51,8 @@ def make_plot(config, out_path='.'):
lat
=
ncid0
.
variables
[
'lat'
][
0
,
:,
:]
lat
=
ncid0
.
variables
[
'lat'
][
0
,
:,
:]
lon
=
ncid0
.
variables
[
'lon'
][
0
,
:,
:]
lon
=
ncid0
.
variables
[
'lon'
][
0
,
:,
:]
# read f_
cesm
_lnd_climo_jja, CESM variables
# read f_
model
_lnd_climo_jja, CESM variables
ncid1
=
Dataset
(
f_
cesm
_lnd_climo_jja
)
ncid1
=
Dataset
(
f_
model
_lnd_climo_jja
)
fira
=
ncid1
.
variables
[
'FIRA'
][
0
,
:,
:]
fira
=
ncid1
.
variables
[
'FIRA'
][
0
,
:,
:]
lat1
=
ncid1
.
variables
[
'lat'
][:]
lat1
=
ncid1
.
variables
[
'lat'
][:]
lon1
=
ncid1
.
variables
[
'lon'
][:]
lon1
=
ncid1
.
variables
[
'lon'
][:]
...
...
energy/energy/model_racmo23_rnet.py
View file @
c454342a
...
@@ -25,8 +25,8 @@ title = "Net summer radiation"
...
@@ -25,8 +25,8 @@ title = "Net summer radiation"
def
make_plot
(
config
,
out_path
=
'.'
):
def
make_plot
(
config
,
out_path
=
'.'
):
# ---------------- Data source in TITAN ------------------------
# ---------------- Data source in TITAN ------------------------
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_
cesm
_lnd_climo_jja
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
f_
model
_lnd_climo_jja
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
'b.e10.BG20TRCN.f09_g16.002_JJA_
196006_200508_
climo.nc'
)
'b.e10.BG20TRCN.f09_g16.002_JJA_climo.nc'
)
f_racmo_swsn_jja
=
os
.
path
.
join
(
config
[
'racmo_data'
],
f_racmo_swsn_jja
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.swsn.1980-1999.JJA.nc'
)
'racmo23_GRN_monthly.swsn.1980-1999.JJA.nc'
)
f_racmo_swsn_jja_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
f_racmo_swsn_jja_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
...
@@ -51,21 +51,21 @@ def make_plot(config, out_path='.'):
...
@@ -51,21 +51,21 @@ def make_plot(config, out_path='.'):
lat
=
ncid0
.
variables
[
'lat'
][
0
,
:,
:]
lat
=
ncid0
.
variables
[
'lat'
][
0
,
:,
:]
lon
=
ncid0
.
variables
[
'lon'
][
0
,
:,
:]
lon
=
ncid0
.
variables
[
'lon'
][
0
,
:,
:]
# read f_
cesm
_lnd_climo_jja, CESM varialbes
# read f_
model
_lnd_climo_jja, CESM varialbes
ncid1
=
Dataset
(
f_
cesm
_lnd_climo_jja
)
ncid1
=
Dataset
(
f_
model
_lnd_climo_jja
)
fsa
=
ncid1
.
variables
[
'FSA'
][
0
,
:,
:]
fsa
=
ncid1
.
variables
[
'FSA'
][
0
,
:,
:]
lat1
=
ncid1
.
variables
[
'lat'
][:]
lat1
=
ncid1
.
variables
[
'lat'
][:]
lon1
=
ncid1
.
variables
[
'lon'
][:]
lon1
=
ncid1
.
variables
[
'lon'
][:]
fira
=
ncid1
.
variables
[
'FIRA'
][
0
,
:,
:]
fira
=
ncid1
.
variables
[
'FIRA'
][
0
,
:,
:]
rnet_
cesm
=
fsa
-
fira
rnet_
model
=
fsa
-
fira
# use gris as a mask to mask fsa array
# use gris as a mask to mask fsa array
gris_mask
=
ncid1
.
variables
[
'gris_mask'
][
0
,
:,
:]
gris_mask
=
ncid1
.
variables
[
'gris_mask'
][
0
,
:,
:]
gris_mask
=
ma
.
masked_equal
(
gris_mask
,
0
)
gris_mask
=
ma
.
masked_equal
(
gris_mask
,
0
)
rnet_
cesm
_mask
=
ma
.
masked_array
(
rnet_
cesm
,
mask
=
gris_mask
.
mask
)
rnet_
model
_mask
=
ma
.
masked_array
(
rnet_
model
,
mask
=
gris_mask
.
mask
)
rnet_
cesm
=
rnet_
cesm
_mask
rnet_
model
=
rnet_
model
_mask
# read input_file2, RACMO variables
# read input_file2, RACMO variables
ncid21
=
Dataset
(
f_racmo_swsn_jja
)
ncid21
=
Dataset
(
f_racmo_swsn_jja
)
...
@@ -98,7 +98,7 @@ def make_plot(config, out_path='.'):
...
@@ -98,7 +98,7 @@ def make_plot(config, out_path='.'):
remap_rnet
=
remap_swsn
+
remap_lwsn
remap_rnet
=
remap_swsn
+
remap_lwsn
diff
=
rnet_
cesm
-
remap_rnet
diff
=
rnet_
model
-
remap_rnet
# print(np.max(diff))
# print(np.max(diff))
# print(np.min(diff))
# print(np.min(diff))
...
@@ -225,7 +225,7 @@ def make_plot(config, out_path='.'):
...
@@ -225,7 +225,7 @@ def make_plot(config, out_path='.'):
usrf_plot2
=
Ngl
.
contour
(
wks
,
racmo_elev
,
sres1
)
usrf_plot2
=
Ngl
.
contour
(
wks
,
racmo_elev
,
sres1
)
usrf_plot3
=
Ngl
.
contour
(
wks
,
usrf
,
sres
)
usrf_plot3
=
Ngl
.
contour
(
wks
,
usrf
,
sres
)
rnet_
cesm
_plot
=
Ngl
.
contour
(
wks
,
rnet_
cesm
,
res1
)
rnet_
model
_plot
=
Ngl
.
contour
(
wks
,
rnet_
model
,
res1
)
rnet_plot
=
Ngl
.
contour
(
wks
,
rnet
,
res2
)
rnet_plot
=
Ngl
.
contour
(
wks
,
rnet
,
res2
)
diff_plot
=
Ngl
.
contour
(
wks
,
diff
,
res3
)
diff_plot
=
Ngl
.
contour
(
wks
,
diff
,
res3
)
...
@@ -240,7 +240,7 @@ def make_plot(config, out_path='.'):
...
@@ -240,7 +240,7 @@ def make_plot(config, out_path='.'):
plot
.
append
(
Ngl
.
map
(
wks
,
mres
))
plot
.
append
(
Ngl
.
map
(
wks
,
mres
))
# Overlay everything on the map plot.
# Overlay everything on the map plot.
Ngl
.
overlay
(
plot
[
0
],
rnet_
cesm
_plot
)
Ngl
.
overlay
(
plot
[
0
],
rnet_
model
_plot
)
Ngl
.
overlay
(
plot
[
0
],
usrf_plot1
)
Ngl
.
overlay
(
plot
[
0
],
usrf_plot1
)
Ngl
.
overlay
(
plot
[
1
],
rnet_plot
)
Ngl
.
overlay
(
plot
[
1
],
rnet_plot
)
...
...
energy/energy/model_racmo23_senf.py
View file @
c454342a
...
@@ -25,8 +25,8 @@ title = "Net shortwave radiation"
...
@@ -25,8 +25,8 @@ title = "Net shortwave radiation"
def
make_plot
(
config
,
out_path
=
'.'
):
def
make_plot
(
config
,
out_path
=
'.'
):
# ---------------- Data source in TITAN ------------------------
# ---------------- Data source in TITAN ------------------------
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_
cesm
_lnd_climo_jja
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
f_
model
_lnd_climo_jja
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
'b.e10.BG20TRCN.f09_g16.002_JJA_
196006_200508_
climo.nc'
)
'b.e10.BG20TRCN.f09_g16.002_JJA_climo.nc'
)
f_racmo_senf_jja
=
os
.
path
.
join
(
config
[
'racmo_data'
],
f_racmo_senf_jja
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.senf.1980-1999.JJA.nc'
)
'racmo23_GRN_monthly.senf.1980-1999.JJA.nc'
)
f_racmo_senf_jja_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
f_racmo_senf_jja_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
...
@@ -47,8 +47,8 @@ def make_plot(config, out_path='.'):
...
@@ -47,8 +47,8 @@ def make_plot(config, out_path='.'):
lat
=
ncid0
.
variables
[
'lat'
][
0
,
:,
:]
lat
=
ncid0
.
variables
[
'lat'
][
0
,
:,
:]
lon
=
ncid0
.
variables
[
'lon'
][
0
,
:,
:]
lon
=
ncid0
.
variables
[
'lon'
][
0
,
:,
:]
# read f_
cesm
_lnd_climo_jja, CESM varialbes
# read f_
model
_lnd_climo_jja, CESM varialbes
ncid1
=
Dataset
(
f_
cesm
_lnd_climo_jja
)
ncid1
=
Dataset
(
f_
model
_lnd_climo_jja
)
fsh
=
ncid1
.
variables
[
'FSH'
][
0
,
:,
:]
fsh
=
ncid1
.
variables
[
'FSH'
][
0
,
:,
:]
lat1
=
ncid1
.
variables
[
'lat'
][:]
lat1
=
ncid1
.
variables
[
'lat'
][:]
lon1
=
ncid1
.
variables
[
'lon'
][:]
lon1
=
ncid1
.
variables
[
'lon'
][:]
...
...
energy/energy/model_racmo23_smb.py
View file @
c454342a
...
@@ -25,8 +25,8 @@ title = "Summer surface mass balance"
...
@@ -25,8 +25,8 @@ title = "Summer surface mass balance"
def
make_plot
(
config
,
out_path
=
'.'
):
def
make_plot
(
config
,
out_path
=
'.'
):
# ---------------- Data source in TITAN ------------------------
# ---------------- Data source in TITAN ------------------------
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_
cesm
_lnd_climo_jja
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
f_
model
_lnd_climo_jja
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
'b.e10.BG20TRCN.f09_g16.002_JJA_
196006_200508_
climo.nc'
)
'b.e10.BG20TRCN.f09_g16.002_JJA_climo.nc'
)
f_racmo_smb_jja
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.smb.1980-1999.JJA.nc'
)
f_racmo_smb_jja
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.smb.1980-1999.JJA.nc'
)
f_racmo_smb_jja_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
f_racmo_smb_jja_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.smb.1980-1999.remap2cesm.JJA.nc'
)
'racmo23_GRN_monthly.smb.1980-1999.remap2cesm.JJA.nc'
)
...
@@ -46,10 +46,10 @@ def make_plot(config, out_path='.'):
...
@@ -46,10 +46,10 @@ def make_plot(config, out_path='.'):
lat
=
ncid0
.
variables
[
'lat'
][
0
,
:,
:]
lat
=
ncid0
.
variables
[
'lat'
][
0
,
:,
:]
lon
=
ncid0
.
variables
[
'lon'
][
0
,
:,
:]
lon
=
ncid0
.
variables
[
'lon'
][
0
,
:,
:]
# read f_
cesm
_lnd_climo_jja, CESM variable
# read f_
model
_lnd_climo_jja, CESM variable
ncid1
=
Dataset
(
f_
cesm
_lnd_climo_jja
)
ncid1
=
Dataset
(
f_
model
_lnd_climo_jja
)
smb_
cesm
=
ncid1
.
variables
[
'QICE'
][
0
,
:,
:]
smb_
model
=
ncid1
.
variables
[
'QICE'
][
0
,
:,
:]
smb_
cesm
=
smb_
cesm
*
3.156e7
# convert from mm/s to kg/m^2/yr
smb_
model
=
smb_
model
*
3.156e7
# convert from mm/s to kg/m^2/yr
lat1
=
ncid1
.
variables
[
'lat'
][:]
lat1
=
ncid1
.
variables
[
'lat'
][:]
lon1
=
ncid1
.
variables
[
'lon'
][:]
lon1
=
ncid1
.
variables
[
'lon'
][:]
...
@@ -57,8 +57,8 @@ def make_plot(config, out_path='.'):
...
@@ -57,8 +57,8 @@ def make_plot(config, out_path='.'):
gris_mask
=
ncid1
.
variables
[
'gris_mask'
][
0
,
:,
:]
gris_mask
=
ncid1
.
variables
[
'gris_mask'
][
0
,
:,
:]
gris_mask
=
ma
.
masked_equal
(
gris_mask
,
0
)
gris_mask
=
ma
.
masked_equal
(
gris_mask
,
0
)
smb_
cesm
_mask
=
ma
.
masked_array
(
smb_
cesm
,
mask
=
gris_mask
.
mask
)
smb_
model
_mask
=
ma
.
masked_array
(
smb_
model
,
mask
=
gris_mask
.
mask
)
smb_
cesm
=
smb_
cesm
_mask
smb_
model
=
smb_
model
_mask
# read f_racmo_smb_jja_remapped, the remapped RACMO file to calculate difference
# read f_racmo_smb_jja_remapped, the remapped RACMO file to calculate difference
ncid3
=
Dataset
(
f_racmo_smb_jja_remapped
)
ncid3
=
Dataset
(
f_racmo_smb_jja_remapped
)
...
@@ -88,7 +88,7 @@ def make_plot(config, out_path='.'):
...
@@ -88,7 +88,7 @@ def make_plot(config, out_path='.'):
smb_mask
=
ma
.
masked_array
(
smb
,
mask
=
gris_mask
.
mask
)
smb_mask
=
ma
.
masked_array
(
smb
,
mask
=
gris_mask
.
mask
)
smb
=
smb_mask
smb
=
smb_mask
diff
=
smb_
cesm
-
smb_remap
diff
=
smb_
model
-
smb_remap
# diffmin = (np.min(diff))
# diffmin = (np.min(diff))
# diffmax = (np.max(diff))
# diffmax = (np.max(diff))
...
@@ -219,7 +219,7 @@ def make_plot(config, out_path='.'):
...
@@ -219,7 +219,7 @@ def make_plot(config, out_path='.'):
usrf_plot2
=
Ngl
.
contour
(
wks
,
racmo_elev
,
sres1
)
usrf_plot2
=
Ngl
.
contour
(
wks
,
racmo_elev
,
sres1
)
usrf_plot3
=
Ngl
.
contour
(
wks
,
usrf
,
sres
)
usrf_plot3
=
Ngl
.
contour
(
wks
,
usrf
,
sres
)
smb_
cesm
_plot
=
Ngl
.
contour
(
wks
,
smb_
cesm
,
res1
)
smb_
model
_plot
=
Ngl
.
contour
(
wks
,
smb_
model
,
res1
)
smb_plot
=
Ngl
.
contour
(
wks
,
smb
,
res2
)
smb_plot
=
Ngl
.
contour
(
wks
,
smb
,
res2
)
diff_plot
=
Ngl
.
contour
(
wks
,
diff
,
res3
)
diff_plot
=
Ngl
.
contour
(
wks
,
diff
,
res3
)
# diff_plot = Ngl.contour(wks,Remap_smb,res1)
# diff_plot = Ngl.contour(wks,Remap_smb,res1)
...
@@ -235,7 +235,7 @@ def make_plot(config, out_path='.'):
...
@@ -235,7 +235,7 @@ def make_plot(config, out_path='.'):
plot
.
append
(
Ngl
.
map
(
wks
,
mres
))
plot
.
append
(
Ngl
.
map
(
wks
,
mres
))
# Overlay everything on the map plot.
# Overlay everything on the map plot.
Ngl
.
overlay
(
plot
[
0
],
smb_
cesm
_plot
)
Ngl
.
overlay
(
plot
[
0
],
smb_
model
_plot
)
Ngl
.
overlay
(
plot
[
0
],
usrf_plot1
)
Ngl
.
overlay
(
plot
[
0
],
usrf_plot1
)
Ngl
.
overlay
(
plot
[
1
],
smb_plot
)
Ngl
.
overlay
(
plot
[
1
],
smb_plot
)
...
...
energy/energy/model_racmo23_swsd.py
View file @
c454342a
...
@@ -24,8 +24,8 @@ title = "Summer downward shortwave radiation"
...
@@ -24,8 +24,8 @@ title = "Summer downward shortwave radiation"
def
make_plot
(
config
,
out_path
=
'.'
):
def
make_plot
(
config
,
out_path
=
'.'
):
# ---------------- Data source in TITAN ------------------------
# ---------------- Data source in TITAN ------------------------
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_
cesm
_lnd_climo_jja
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
f_
model
_lnd_climo_jja
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
'b.e10.BG20TRCN.f09_g16.002_JJA_
196006_200508_
climo.nc'
)
'b.e10.BG20TRCN.f09_g16.002_JJA_climo.nc'
)
f_racmo_swsd_jja
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.swsd.1980-1999.JJA.nc'
)
f_racmo_swsd_jja
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.swsd.1980-1999.JJA.nc'
)
f_racmo_swsd_jja_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
f_racmo_swsd_jja_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.swsd.1980-1999.remap2cesm.JJA.nc'
)
'racmo23_GRN_monthly.swsd.1980-1999.remap2cesm.JJA.nc'
)
...
@@ -45,8 +45,8 @@ def make_plot(config, out_path='.'):
...
@@ -45,8 +45,8 @@ def make_plot(config, out_path='.'):
lat
=
ncid0
.
variables
[
'lat'
][
0
,
:,
:]
lat
=
ncid0
.
variables
[
'lat'
][
0
,
:,
:]
lon
=
ncid0
.
variables
[
'lon'
][
0
,
:,
:]
lon
=
ncid0
.
variables
[
'lon'
][
0
,
:,
:]
# read f_
cesm
_lnd_climo_jja, CESM variables
# read f_
model
_lnd_climo_jja, CESM variables
ncid1
=
Dataset
(
f_
cesm
_lnd_climo_jja
)
ncid1
=
Dataset
(
f_
model
_lnd_climo_jja
)
fsds
=
ncid1
.
variables
[
'FSDS'
][
0
,
:,
:]
fsds
=
ncid1
.
variables
[
'FSDS'
][
0
,
:,
:]
lat1
=
ncid1
.
variables
[
'lat'
][:]
lat1
=
ncid1
.
variables
[
'lat'
][:]
lon1
=
ncid1
.
variables
[
'lon'
][:]
lon1
=
ncid1
.
variables
[
'lon'
][:]
...
...
energy/energy/model_racmo23_swsn.py
View file @
c454342a
...
@@ -24,8 +24,8 @@ title = "Net Summer shortwave radiation"
...
@@ -24,8 +24,8 @@ title = "Net Summer shortwave radiation"
def
make_plot
(
config
,
out_path
=
'.'
):
def
make_plot
(
config
,
out_path
=
'.'
):
# ---------------- Data source in TITAN ------------------------
# ---------------- Data source in TITAN ------------------------
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_
cesm
_lnd_climo_jja
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
f_
model
_lnd_climo_jja
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
'b.e10.BG20TRCN.f09_g16.002_JJA_
196006_200508_
climo.nc'
)
'b.e10.BG20TRCN.f09_g16.002_JJA_climo.nc'
)
f_racmo_swsn_jja
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.swsn.1980-1999.JJA.nc'
)
f_racmo_swsn_jja
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.swsn.1980-1999.JJA.nc'
)
f_racmo_swsn_jja_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
f_racmo_swsn_jja_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.swsn.1980-1999.remap2cesm.JJA.nc'
)
'racmo23_GRN_monthly.swsn.1980-1999.remap2cesm.JJA.nc'
)
...
@@ -45,8 +45,8 @@ def make_plot(config, out_path='.'):
...
@@ -45,8 +45,8 @@ def make_plot(config, out_path='.'):
lat
=
ncid0
.
variables
[
'lat'
][
0
,
:,
:]
lat
=
ncid0
.
variables
[
'lat'
][
0
,
:,
:]
lon
=
ncid0
.
variables
[
'lon'
][
0
,
:,
:]
lon
=
ncid0
.
variables
[
'lon'
][
0
,
:,
:]
# read f_
cesm
_lnd_climo_jja, CESM varialbes
# read f_
model
_lnd_climo_jja, CESM varialbes
ncid1
=
Dataset
(
f_
cesm
_lnd_climo_jja
)
ncid1
=
Dataset
(
f_
model
_lnd_climo_jja
)
fsa
=
ncid1
.
variables
[
'FSA'
][
0
,
:,
:]
fsa
=
ncid1
.
variables
[
'FSA'
][
0
,
:,
:]
lat1
=
ncid1
.
variables
[
'lat'
][:]
lat1
=
ncid1
.
variables
[
'lat'
][:]
lon1
=
ncid1
.
variables
[
'lon'
][:]
lon1
=
ncid1
.
variables
[
'lon'
][:]
...
...
energy/energy/model_racmo23_t2m_ann.py
View file @
c454342a
...
@@ -24,8 +24,8 @@ title = "Annual 2-meter air temperature"
...
@@ -24,8 +24,8 @@ title = "Annual 2-meter air temperature"
def
make_plot
(
config
,
out_path
=
'.'
):
def
make_plot
(
config
,
out_path
=
'.'
):
# ---------------- Data source in TITAN ------------------------
# ---------------- Data source in TITAN ------------------------
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_
cesm
_lnd_climo_ann
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
'b.e10.BG20TRCN.f09_g16.002_ANN_climo.nc'
)
f_
model
_lnd_climo_ann
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
'b.e10.BG20TRCN.f09_g16.002_ANN_climo.nc'
)
f_
cesm
_atm_climo_ann
=
os
.
path
.
join
(
config
[
'model_atm_climos'
],
'b.e10.BG20TRCN.f09_g16.002_ANN_climo.nc'
)
f_
model
_atm_climo_ann
=
os
.
path
.
join
(
config
[
'model_atm_climos'
],
'b.e10.BG20TRCN.f09_g16.002_ANN_climo.nc'
)
f_racmo_t2m_ann
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.t2m.1980-1999.ANN.nc'
)
f_racmo_t2m_ann
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.t2m.1980-1999.ANN.nc'
)
f_racmo_t2m_ann_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
f_racmo_t2m_ann_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.t2m.1980-1999.remap2cesm.ANN.nc'
)
'racmo23_GRN_monthly.t2m.1980-1999.remap2cesm.ANN.nc'
)
...
@@ -40,9 +40,9 @@ def make_plot(config, out_path='.'):
...
@@ -40,9 +40,9 @@ def make_plot(config, out_path='.'):
lat
=
ncid0
.
variables
[
'lat'
][
0
,
:,
:]
lat
=
ncid0
.
variables
[
'lat'
][
0
,
:,
:]
lon
=
ncid0
.
variables
[
'lon'
][
0
,
:,
:]
lon
=
ncid0
.
variables
[
'lon'
][
0
,
:,
:]
# read f_
cesm
_atm_climo_ann and file2, CESM variable
# read f_
model
_atm_climo_ann and file2, CESM variable
ncid1
=
Dataset
(
f_
cesm
_atm_climo_ann
)
ncid1
=
Dataset
(
f_
model
_atm_climo_ann
)
w_
cesm
=
ncid1
.
variables
[
'TREFHT'
][
0
,
:,
:]
w_
model
=
ncid1
.
variables
[
'TREFHT'
][
0
,
:,
:]
lat1
=
ncid1
.
variables
[
'lat'
][:]
lat1
=
ncid1
.
variables
[
'lat'
][:]
lon1
=
ncid1
.
variables
[
'lon'
][:]
lon1
=
ncid1
.
variables
[
'lon'
][:]
...
@@ -64,17 +64,17 @@ def make_plot(config, out_path='.'):
...
@@ -64,17 +64,17 @@ def make_plot(config, out_path='.'):
lat22
=
ncid22
.
variables
[
'lat'
][:]
lat22
=
ncid22
.
variables
[
'lat'
][:]
lon22
=
ncid22
.
variables
[
'lon'
][:]
lon22
=
ncid22
.
variables
[
'lon'
][:]
w_
cesm
=
w_cesm
-
273.15
# convert to celcius
w_
model
=
w_model
-
273.15
# convert to celcius
w_racmo
=
w_racmo
-
273.15
w_racmo
=
w_racmo
-
273.15
w_racmo_l
=
w_racmo_l
-
273.15
w_racmo_l
=
w_racmo_l
-
273.15
diff
=
w_
cesm
-
w_racmo
diff
=
w_
model
-
w_racmo
# locate the greenland area using the GreenLand mask
# locate the greenland area using the GreenLand mask
ncid8
=
Dataset
(
f_
cesm
_lnd_climo_ann
)
ncid8
=
Dataset
(
f_
model
_lnd_climo_ann
)
gris_mask
=
ncid8
.
variables
[
'gris_mask'
][
0
,
:,
:]
gris_mask
=
ncid8
.
variables
[
'gris_mask'
][
0
,
:,
:]
gris_mask
=
ma
.
masked_equal
(
gris_mask
,
0
)
gris_mask
=
ma
.
masked_equal
(
gris_mask
,
0
)
# mask out non RACMO regions, icemask var in f_
cesm
_lnd_climo_ann
# mask out non RACMO regions, icemask var in f_
model
_lnd_climo_ann
diff_mask
=
ma
.
masked_array
(
diff
,
mask
=
gris_mask
.
mask
)
diff_mask
=
ma
.
masked_array
(
diff
,
mask
=
gris_mask
.
mask
)
# print np.max(diff_mask)
# print np.max(diff_mask)
...
@@ -197,7 +197,7 @@ def make_plot(config, out_path='.'):
...
@@ -197,7 +197,7 @@ def make_plot(config, out_path='.'):
usrf_plot2
=
Ngl
.
contour
(
wks
,
racmo_elev
,
sres1
)
usrf_plot2
=
Ngl
.
contour
(
wks
,
racmo_elev
,
sres1
)
usrf_plot3
=
Ngl
.
contour
(
wks
,
usrf
,
sres
)
usrf_plot3
=
Ngl
.
contour
(
wks
,
usrf
,
sres
)
t2mw_plot
=
Ngl
.
contour
(
wks
,
w_
cesm
,
res1
)
t2mw_plot
=
Ngl
.
contour
(
wks
,
w_
model
,
res1
)
t2ms_l_plot
=
Ngl
.
contour
(
wks
,
w_racmo_l
,
res2
)
t2ms_l_plot
=
Ngl
.
contour
(
wks
,
w_racmo_l
,
res2
)
diff_plot
=
Ngl
.
contour
(
wks
,
diff_mask
,
res22
)
diff_plot
=
Ngl
.
contour
(
wks
,
diff_mask
,
res22
)
# diff_plot = Ngl.contour(wks,w_racmo,res2) #Remapped RACMO
# diff_plot = Ngl.contour(wks,w_racmo,res2) #Remapped RACMO
...
...
energy/energy/model_racmo23_t2m_djf.py
View file @
c454342a
...
@@ -24,8 +24,8 @@ title = "Winter 2-meter air temperature"
...
@@ -24,8 +24,8 @@ title = "Winter 2-meter air temperature"
def
make_plot
(
config
,
out_path
=
'.'
):
def
make_plot
(
config
,
out_path
=
'.'
):
# ---------------- Data source in TITAN ------------------------
# ---------------- Data source in TITAN ------------------------
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_
cesm
_lnd_climo_djf
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
'b.e10.BG20TRCN.f09_g16.002_DJF_climo.nc'
)
f_
model
_lnd_climo_djf
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
'b.e10.BG20TRCN.f09_g16.002_DJF_climo.nc'
)
f_
cesm
_atm_climo_djf
=
os
.
path
.
join
(
config
[
'model_atm_climos'
],
'b.e10.BG20TRCN.f09_g16.002_DJF_climo.nc'
)
f_
model
_atm_climo_djf
=
os
.
path
.
join
(
config
[
'model_atm_climos'
],
'b.e10.BG20TRCN.f09_g16.002_DJF_climo.nc'
)
f_racmo_t2m_djf
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.t2m.1980-1999.DJF.nc'
)
f_racmo_t2m_djf
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.t2m.1980-1999.DJF.nc'
)
f_racmo_t2m_djf_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
f_racmo_t2m_djf_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.t2m.1980-1999.remap2cesm.DJF.nc'
)
'racmo23_GRN_monthly.t2m.1980-1999.remap2cesm.DJF.nc'
)
...
@@ -40,9 +40,9 @@ def make_plot(config, out_path='.'):
...
@@ -40,9 +40,9 @@ def make_plot(config, out_path='.'):
lat
=
ncid0
.
variables
[
'lat'
][
0
,
:,
:]
lat
=
ncid0
.
variables
[
'lat'
][
0
,
:,
:]
lon
=
ncid0
.
variables
[
'lon'
][
0
,
:,
:]
lon
=
ncid0
.
variables
[
'lon'
][
0
,
:,
:]
# read f_
cesm
_atm_climo_djf and file2, CESM variable
# read f_
model
_atm_climo_djf and file2, CESM variable
ncid1
=
Dataset
(
f_
cesm
_atm_climo_djf
)
ncid1
=
Dataset
(
f_
model
_atm_climo_djf
)
w_
cesm
=
ncid1
.
variables
[
'TREFHT'
][
0
,
:,
:]
w_
model
=
ncid1
.
variables
[
'TREFHT'
][
0
,
:,
:]
lat1
=
ncid1
.
variables
[
'lat'
][:]
lat1
=
ncid1
.
variables
[
'lat'
][:]
lon1
=
ncid1
.
variables
[
'lon'
][:]
lon1
=
ncid1
.
variables
[
'lon'
][:]
...
@@ -64,17 +64,17 @@ def make_plot(config, out_path='.'):
...
@@ -64,17 +64,17 @@ def make_plot(config, out_path='.'):
lat22
=
ncid22
.
variables
[
'lat'
][:]
lat22
=
ncid22
.
variables
[
'lat'
][:]
lon22
=
ncid22
.
variables
[
'lon'
][:]
lon22
=
ncid22
.
variables
[
'lon'
][:]
w_
cesm
=
w_cesm
-
273.15
# convert to celcius
w_
model
=
w_model
-
273.15
# convert to celcius
w_racmo
=
w_racmo
-
273.15
w_racmo
=
w_racmo
-
273.15
w_racmo_l
=
w_racmo_l
-
273.15
w_racmo_l
=
w_racmo_l
-
273.15
diff
=
w_
cesm
-
w_racmo
diff
=
w_
model
-
w_racmo
# locate the greenland area using the GreenLand mask
# locate the greenland area using the GreenLand mask
ncid8
=
Dataset
(
f_
cesm
_lnd_climo_djf
)
ncid8
=
Dataset
(
f_
model
_lnd_climo_djf
)
gris_mask
=
ncid8
.
variables
[
'gris_mask'
][
0
,
:,
:]
gris_mask
=
ncid8
.
variables
[
'gris_mask'
][
0
,
:,
:]
gris_mask
=
ma
.
masked_equal
(
gris_mask
,
0
)
gris_mask
=
ma
.
masked_equal
(
gris_mask
,
0
)
# mask out non RACMO regions, icemask var in f_
cesm
_lnd_climo_djf
# mask out non RACMO regions, icemask var in f_
model
_lnd_climo_djf
diff_mask
=
ma
.
masked_array
(
diff
,
mask
=
gris_mask
.
mask
)
diff_mask
=
ma
.
masked_array
(
diff
,
mask
=
gris_mask
.
mask
)
# print np.max(diff_mask)
# print np.max(diff_mask)
...
@@ -197,7 +197,7 @@ def make_plot(config, out_path='.'):
...
@@ -197,7 +197,7 @@ def make_plot(config, out_path='.'):
usrf_plot2
=
Ngl
.
contour
(
wks
,
racmo_elev
,
sres1
)
usrf_plot2
=
Ngl
.
contour
(
wks
,
racmo_elev
,
sres1
)
usrf_plot3
=
Ngl
.
contour
(
wks
,
usrf
,
sres
)
usrf_plot3
=
Ngl
.
contour
(
wks
,
usrf
,
sres
)
t2mw_plot
=
Ngl
.
contour
(
wks
,
w_
cesm
,
res1
)
t2mw_plot
=
Ngl
.
contour
(
wks
,
w_
model
,
res1
)
t2ms_l_plot
=
Ngl
.
contour
(
wks
,
w_racmo_l
,
res2
)
t2ms_l_plot
=
Ngl
.
contour
(
wks
,
w_racmo_l
,
res2
)
diff_plot
=
Ngl
.
contour
(
wks
,
diff_mask
,
res22
)
diff_plot
=
Ngl
.
contour
(
wks
,
diff_mask
,
res22
)
# diff_plot = Ngl.contour(wks,w_racmo,res2) #Remapped RACMO
# diff_plot = Ngl.contour(wks,w_racmo,res2) #Remapped RACMO
...
...
energy/energy/model_racmo23_t2m_jja.py
View file @
c454342a
...
@@ -24,8 +24,8 @@ title = "Summer 2-meter air temperature"
...
@@ -24,8 +24,8 @@ title = "Summer 2-meter air temperature"
def
make_plot
(
config
,
out_path
=
'.'
):
def
make_plot
(
config
,
out_path
=
'.'
):
# ---------------- Data source in TITAN ------------------------
# ---------------- Data source in TITAN ------------------------
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_cism
=
os
.
path
.
join
(
config
[
'cism_data'
],
'Greenland_5km_v1.1_SacksRev_c110629.nc'
)
f_
cesm
_lnd_climo_jja
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
'b.e10.BG20TRCN.f09_g16.002_JJA_climo.nc'
)
f_
model
_lnd_climo_jja
=
os
.
path
.
join
(
config
[
'model_lnd_climos'
],
'b.e10.BG20TRCN.f09_g16.002_JJA_climo.nc'
)
f_
cesm
_atm_climo_jja
=
os
.
path
.
join
(
config
[
'model_atm_climos'
],
'b.e10.BG20TRCN.f09_g16.002_JJA_climo.nc'
)
f_
model
_atm_climo_jja
=
os
.
path
.
join
(
config
[
'model_atm_climos'
],
'b.e10.BG20TRCN.f09_g16.002_JJA_climo.nc'
)
f_racmo_t2m_jja
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.t2m.1980-1999.JJA.nc'
)
f_racmo_t2m_jja
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.t2m.1980-1999.JJA.nc'
)
f_racmo_t2m_jja_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
f_racmo_t2m_jja_remapped
=
os
.
path
.
join
(
config
[
'racmo_data'
],
'racmo23_GRN_monthly.t2m.1980-1999.remap2cesm.JJA.nc'
)
'racmo23_GRN_monthly.t2m.1980-1999.remap2cesm.JJA.nc'
)
...
@@ -40,9 +40,9 @@ def make_plot(config, out_path='.'):
...
@@ -40,9 +40,9 @@ def make_plot(config, out_path='.'):
lat
=
ncid0
.
variables
[
'lat'
][
0
,
:,
:]