Commit 47070b98 authored by Sebastian Milinski's avatar Sebastian Milinski
Browse files

Creating header image for project website

parent 09f70c37
......@@ -30,7 +30,7 @@ if (all(isdefined((/"varname","optionstring"/)))) then
else
print("using devmode")
devmode = 1
plottype = "X11"
plottype = "pdf"
end if
if (devmode .eq. 1) then
......@@ -46,7 +46,7 @@ seasons = (/"DJF","MAM","JJA","SON","yearmean"/)
basedir = "/work/mh0033/m300265/processed_thesis"
plotdir = "/home/mpim/m300265/thesis/plots/ch1"
plotfilename = varname + "." + optionstring
plotfilename = "header_graphic." + varname + "." + optionstring
plotfilepath = plotdir + "/" + plotfilename
system("if ! test -d " + plotdir +" ; then mkdir " + plotdir + " ; fi")
......@@ -191,7 +191,7 @@ do expno = 0, dimsizes(experiments)-1
startyear = 2006
endyear = 2099
r0 = 1
rn = 30
rn = 80
ens_string = experiment + "_" + startyear + "-" + endyear + "_ens_" + r0 + "-" + rn
datdir = basedir + "/" + experiment
ifile = datdir + "/" + ens_string + "." + varname + "." + optionstring + ".nc"
......@@ -288,8 +288,8 @@ print("Plotting...")
res2@xyDashPattern = 0 ; Make curves all solid
res2@xyLineColor = "blue"
res2@pmLegendDisplayMode = "Never"
res2@vpHeightF = 0.3
res2@vpWidthF = 0.9
res2@vpHeightF = .6
res2@vpWidthF = 4.0
res2@trYMinF = -0.4
res2@trYMaxF = 1.0
res2@tmXBMode = "Manual"
......@@ -348,50 +348,50 @@ print("Plotting...")
; Obs
res2@trXMinF = floor(min(data_obs_seas&year))
res2@trXMaxF = ceil(max(data_obs_seas&year))
res2@tmXBTickStartF = res2@trXMinF
obs = gsn_csm_xy(wks,data_obs_seas&year,data_obs_seas(plotseason,:),res2) ; create plot
obs_copy = gsn_csm_xy(wks,data_obs_seas&year,data_obs_seas(plotseason,:),res2) ; create same again to reuse for overlay
gsn_panel(wks,obs,(/1,1/),resP)
frame(wks)
; Add a few hist members
linecol(0,:) = namedcolor2rgba("lightskyblue")
res2@xyLineColors = linecol
ens_hist_1 = gsn_csm_xy(wks,data_hist_seas&year,data_hist_seas(season|plotseason,ens|1,year|:),res2) ; create plot
overlay(obs_copy,ens_hist_1)
gsn_panel(wks,obs_copy,(/1,1/),resP)
frame(wks)
ens_hist_2 = gsn_csm_xy(wks,data_hist_seas&year,data_hist_seas(season|plotseason,ens|2,year|:),res2) ; create plot
overlay(obs_copy,ens_hist_2)
gsn_panel(wks,obs_copy,(/1,1/),resP)
frame(wks)
ens_hist_3 = gsn_csm_xy(wks,data_hist_seas&year,data_hist_seas(season|plotseason,ens|3,year|:),res2) ; create plot
overlay(obs_copy,ens_hist_3)
gsn_panel(wks,obs_copy,(/1,1/),resP)
frame(wks)
; hist
linewidth(0) = 2.0
res2@xyLineThicknesses = linewidth
linecol(0,:) = namedcolor2rgba("lightskyblue")
res2@xyLineColors = linecol
ens_hist = gsn_csm_xy(wks,data_hist_seas&year,data_hist_seas(season|plotseason,ens|:,year|:),res2) ; create plot
linecol(0,:) = namedcolor2rgba("blue")
res2@xyLineColors = linecol
linewidth(0) = 4.0
res2@xyLineThicknesses = linewidth
ensmean_hist = gsn_csm_xy(wks,data_hist_seas&year,dim_avg_n_Wrap(data_hist_seas(season|plotseason,ens|:,year|:),0),res2) ; create plot
overlay(ens_hist,obs)
gsn_panel(wks,ens_hist,(/1,1/),resP)
frame(wks)
overlay(ens_hist,ensmean_hist)
overlay(ens_hist,obs)
gsn_panel(wks,ens_hist,(/1,1/),resP)
frame(wks)
; res2@trXMinF = floor(min(data_obs_seas&year))
; res2@trXMaxF = ceil(max(data_obs_seas&year))
; res2@tmXBTickStartF = res2@trXMinF
; obs = gsn_csm_xy(wks,data_obs_seas&year,data_obs_seas(plotseason,:),res2) ; create plot
; obs_copy = gsn_csm_xy(wks,data_obs_seas&year,data_obs_seas(plotseason,:),res2) ; create same again to reuse for overlay
; gsn_panel(wks,obs,(/1,1/),resP)
; frame(wks)
; ; Add a few hist members
; linecol(0,:) = namedcolor2rgba("lightskyblue")
; res2@xyLineColors = linecol
; ens_hist_1 = gsn_csm_xy(wks,data_hist_seas&year,data_hist_seas(season|plotseason,ens|1,year|:),res2) ; create plot
; overlay(obs_copy,ens_hist_1)
; gsn_panel(wks,obs_copy,(/1,1/),resP)
; frame(wks)
; ens_hist_2 = gsn_csm_xy(wks,data_hist_seas&year,data_hist_seas(season|plotseason,ens|2,year|:),res2) ; create plot
; overlay(obs_copy,ens_hist_2)
; gsn_panel(wks,obs_copy,(/1,1/),resP)
; frame(wks)
; ens_hist_3 = gsn_csm_xy(wks,data_hist_seas&year,data_hist_seas(season|plotseason,ens|3,year|:),res2) ; create plot
; overlay(obs_copy,ens_hist_3)
; gsn_panel(wks,obs_copy,(/1,1/),resP)
; frame(wks)
; ; hist
; linewidth(0) = 2.0
; res2@xyLineThicknesses = linewidth
; linecol(0,:) = namedcolor2rgba("lightskyblue")
; res2@xyLineColors = linecol
; ens_hist = gsn_csm_xy(wks,data_hist_seas&year,data_hist_seas(season|plotseason,ens|:,year|:),res2) ; create plot
; linecol(0,:) = namedcolor2rgba("blue")
; res2@xyLineColors = linecol
; linewidth(0) = 4.0
; res2@xyLineThicknesses = linewidth
; ensmean_hist = gsn_csm_xy(wks,data_hist_seas&year,dim_avg_n_Wrap(data_hist_seas(season|plotseason,ens|:,year|:),0),res2) ; create plot
; overlay(ens_hist,obs)
; gsn_panel(wks,ens_hist,(/1,1/),resP)
; frame(wks)
; overlay(ens_hist,ensmean_hist)
; overlay(ens_hist,obs)
; gsn_panel(wks,ens_hist,(/1,1/),resP)
; frame(wks)
;*************************************************
; whole time period covered by ensemble
......@@ -399,6 +399,7 @@ print("Plotting...")
res2@trXMinF = floor(min(data_hist_seas&year))
res2@trXMaxF = ceil(max(data_rcp26_seas&year))
res2@tmXBTickStartF = res2@trXMinF
res2@tmYLMinorOn = False
res2@trYMinF = -1.0
res2@trYMaxF = 4.5
......@@ -431,12 +432,12 @@ print("Plotting...")
rgba = namedcolor2rgba("gold")
linecol(:,:) = conform(linecol,rgba(0,:),1)
res2@xyLineColors = linecol
ens_rcp26 = gsn_csm_xy(wks,data_rcp26_seas&year,data_rcp26_seas(season|plotseason,ens|:,year|:),res2) ; create plot
ens_rcp26 = gsn_csm_xy(wks,data_rcp26_seas&year-1,data_rcp26_seas(season|plotseason,ens|:,year|:),res2) ; create plot
linewidth(0) = 4.0
res2@xyLineThicknesses = linewidth
linecol(0,:) = namedcolor2rgba("goldenrod4")
res2@xyLineColors = linecol
ensmean_rcp26 = gsn_csm_xy(wks,data_rcp26_seas&year,dim_avg_n_Wrap(data_rcp26_seas(season|plotseason,ens|:,year|:),0),res2) ; create plot
ensmean_rcp26 = gsn_csm_xy(wks,data_rcp26_seas&year-1,dim_avg_n_Wrap(data_rcp26_seas(season|plotseason,ens|:,year|:),0),res2) ; create plot
overlay(ens_hist,ens_rcp26)
linewidth(0) = 2.0
......@@ -444,12 +445,12 @@ print("Plotting...")
rgba = namedcolor2rgba("palegreen")
linecol(:,:) = conform(linecol,rgba(0,:),1)
res2@xyLineColors = linecol
ens_rcp45 = gsn_csm_xy(wks,data_rcp45_seas&year,data_rcp45_seas(season|plotseason,ens|:,year|:),res2) ; create plot
ens_rcp45 = gsn_csm_xy(wks,data_rcp45_seas&year-1,data_rcp45_seas(season|plotseason,ens|:,year|:),res2) ; create plot
linewidth(0) = 4.0
res2@xyLineThicknesses = linewidth
linecol(0,:) = namedcolor2rgba("green4")
res2@xyLineColors = linecol
ensmean_rcp45 = gsn_csm_xy(wks,data_rcp45_seas&year,dim_avg_n_Wrap(data_rcp45_seas(season|plotseason,ens|:,year|:),0),res2) ; create plot
ensmean_rcp45 = gsn_csm_xy(wks,data_rcp45_seas&year-1,dim_avg_n_Wrap(data_rcp45_seas(season|plotseason,ens|:,year|:),0),res2) ; create plot
overlay(ens_hist,ens_rcp45)
linewidth(0) = 2.0
......@@ -457,26 +458,26 @@ print("Plotting...")
rgba = namedcolor2rgba("magenta1")
linecol(:,:) = conform(linecol,rgba(0,:),1)
res2@xyLineColors = linecol
ens_rcp85 = gsn_csm_xy(wks,data_rcp85_seas&year,data_rcp85_seas(season|plotseason,ens|:,year|:),res2) ; create plot
ens_rcp85 = gsn_csm_xy(wks,data_rcp85_seas&year-1,data_rcp85_seas(season|plotseason,ens|:,year|:),res2) ; create plot
linewidth(0) = 4.0
res2@xyLineThicknesses = linewidth
linecol(0,:) = namedcolor2rgba("magenta4")
res2@xyLineColors = linecol
ensmean_rcp85 = gsn_csm_xy(wks,data_rcp85_seas&year,dim_avg_n_Wrap(data_rcp85_seas(season|plotseason,ens|:,year|:),0),res2) ; create plot
ensmean_rcp85 = gsn_csm_xy(wks,data_rcp85_seas&year-1,dim_avg_n_Wrap(data_rcp85_seas(season|plotseason,ens|:,year|:),0),res2) ; create plot
overlay(ens_hist,ens_rcp85)
linewidth(0) = 4.0
res2@xyLineThicknesses = linewidth
linecol(0,:) = namedcolor2rgba("black")
res2@xyLineColors = linecol
obs = gsn_csm_xy(wks,data_obs_seas&year,data_obs_seas(plotseason,:),res2) ; create plot
; linewidth(0) = 4.0
; res2@xyLineThicknesses = linewidth
; linecol(0,:) = namedcolor2rgba("black")
; res2@xyLineColors = linecol
; obs = gsn_csm_xy(wks,data_obs_seas&year,data_obs_seas(plotseason,:),res2) ; create plot
overlay(ens_hist,ensmean_hist)
overlay(ens_hist,ensmean_onepct)
overlay(ens_hist,ensmean_rcp26)
overlay(ens_hist,ensmean_rcp45)
overlay(ens_hist,ensmean_rcp85)
overlay(ens_hist,obs)
; overlay(ens_hist,obs)
gsn_panel(wks,ens_hist,(/1,1/),resP)
......@@ -486,9 +487,9 @@ print("Plotting...")
if (devmode .eq. 1) then
drawNDCGrid(wks) ; This is for debugging purposes
end if
; if (devmode .eq. 1) then
; drawNDCGrid(wks) ; This is for debugging purposes
; end if
frame(wks)
print(plottype)
......
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