<div dir="ltr"><div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Good afternoon,</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">I am attempting to create a scatterplot in which each data point has a specified color and marker style:</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><blockquote style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>; These files are loaded by default in NCL V6.2.0 and newer</div></div><div><div>load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_code.ncl"</div></div><div><div>load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_csm.ncl"</div></div><div><div>load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/contributed.<wbr>ncl"</div></div><div><div>load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/shea_util.ncl"</div></div><div><div><br></div></div><div><div><br></div></div><div><div>begin</div></div><div><div><br></div></div><div><div>;*********************</div></div><div><div>; Create model array</div></div><div><div>;*********************</div></div><div><div><br></div></div><div><div>mdl = new((/28,1/),"string")</div></div><div><div>mdl(0,0) = "ACCESS1-0"</div></div><div><div>mdl(1,0) = "ACCESS1-3"</div></div><div><div>mdl(2,0) = "bcc-csm1-1"</div></div><div><div>mdl(3,0) = "bcc-csm1-1-m"</div></div><div><div>mdl(4,0) = "BNU-ESM"</div></div><div><div>mdl(5,0) = "CanESM2"</div></div><div><div>mdl(6,0) = "CCSM4"</div></div><div><div>mdl(7,0) = "CNRM-CM5"</div></div><div><div>mdl(8,0) = "CSIRO-Mk3-6-0"</div></div><div><div>mdl(9,0) = "FGOALS-g2"</div></div><div><div>mdl(10,0) = "FGOALS-s2"</div></div><div><div>mdl(11,0) = "GFDL-CM3"</div></div><div><div>mdl(12,0) = "GFDL-ESM2G"</div></div><div><div>mdl(13,0) = "GFDL-ESM2M"</div></div><div><div>mdl(14,0) = "GISS-E2-H"</div></div><div><div>mdl(15,0) = "GISS-E2-R"</div></div><div><div>mdl(16,0) = "HadGEM2-ES"</div></div><div><div>mdl(17,0) = "inmcm4"</div></div><div><div>mdl(18,0) = "IPSL-CM5A-LR"</div></div><div><div>mdl(19,0) = "IPSL-CM5A-MR"</div></div><div><div>mdl(20,0) = "IPSL-CM5B-LR"</div></div><div><div>mdl(21,0) = "MIROC5"</div></div><div><div>mdl(22,0) = "MIROC-ESM"</div></div><div><div>mdl(23,0) = "MPI-ESM-LR"</div></div><div><div>mdl(24,0) = "MPI-ESM-MR"</div></div><div><div>mdl(25,0) = "MPI-ESM-P"</div></div><div><div>mdl(26,0) = "MRI-CGM3"</div></div><div><div>mdl(27,0) = "NorESM1-M"</div></div><div><div><br></div></div><div><div><br></div></div><div><div>;*****************************<wbr>***************</div></div><div><div>; Read in Tundra and Boreal Albedo Feedbacks</div></div><div><div>;*****************************<wbr>***************</div></div><div><div><br></div></div><div><div>TundirMAM = "/praid/users/herringtont/<wbr>Caldwell_2016/monthly_data/<wbr>CLM/by_model/alb_fbk_maps/All.<wbr>Tundra/fldmean/seasmean/MAM/"</div></div><div><div><br></div></div><div><div>BordirMAM = "/praid/users/herringtont/<wbr>Caldwell_2016/monthly_data/<wbr>CLM/by_model/alb_fbk_maps/NET.<wbr>Boreal/fldmean/seasmean/MAM/"</div></div><div><div><br></div></div><div><div>TunfilMAM = TundirMAM+"<a href="http://cmip5_fbks_monres_mam_allmodels_alb_fbk_maps_all.tundra_seasmean.nc/" target="_blank" style="color:rgb(17,85,204)">CMIP5_fbks_monres_<wbr>MAM_AllModels_alb_fbk_maps_<wbr>All.Tundra_seasmean.nc</a>"</div></div><div><div><br></div></div><div><div>BorfilMAM = BordirMAM+"<a href="http://cmip5_fbks_monres_mam_allmodels_alb_fbk_maps_net.boreal_seasmean.nc/" target="_blank" style="color:rgb(17,85,204)">CMIP5_fbks_monres_<wbr>MAM_AllModels_alb_fbk_maps_<wbr>NET.Boreal_seasmean.nc</a>"</div></div><div><div><br></div></div><div><div>TunMAM = addfile(TunfilMAM,"r")</div></div><div><div>BorMAM = addfile(BorfilMAM,"r")</div></div><div><div><br></div></div><div><div>TunMAM2 = TunMAM->alb_fbk_maps(:,0,0)</div></div><div><div>BorMAM2 = BorMAM->alb_fbk_maps(:,0,0)</div></div><div><div><br></div></div><div><div>ccr = escorc(BorMAM2,TunMAM2) ; calculate correlation coefficient</div></div><div><div>ccr2 = decimalPlaces(ccr,3,True)</div></div><div><div><br></div></div><div><div>;*****************************<wbr>*************************</div></div><div><div>; Create MAM Seasonal Mean Albedo Feedback Scatterplot</div></div><div><div>;*****************************<wbr>*************************</div></div><div><div><br></div></div><div><div>wks = gsn_open_wks("png","MAM_<wbr>Albedo_Feedback_ScatterPlot_<wbr>corr_labels") ; send graphics to PNG file</div></div><div><div><br></div></div><div><div>res2 = "True" ; plot mods desired</div></div><div><div><br></div></div><div><div>res2@tmLabelAutoStride = True ; nice tick mark labels</div></div><div><div>res2@xyMarkLineMode = "Markers"</div></div><div><div><br></div></div><div><div>res2@xyMarkers = (/0,0,1,1,2,3,4,5,6,7,7,8,8,8,<wbr>9,9,10,11,12,12,12,13,13,14,<wbr>14,14,15,16/) </div></div><div><div><br></div></div><div><div>res2@xyMonoMarkerColor = "False" ; Allow different colors for markers</div></div><div><div><br></div></div><div><div>res2@xyMarkerColors = (/"dodgerblue2","dodgerblue4",<wbr>"firebrick4","tomato3","<wbr>darkslategrey","forestgreen","<wbr>chocolate4","plum3","seagreen"<wbr>,"cyan2","cyan4","<wbr>mediumorchid2","mediumorchid4"<wbr>,"mediumpurple3","orange2","<wbr>orange4","antiquewhite4","<wbr>violetred","salmon","salmon2",<wbr>"salmon4","blue","blue4","<wbr>gold4","goldenrod2","yellow4",<wbr>"magenta4","darkolivegreen4"/)</div></div><div><div><br></div></div><div><div>res2@xyExplicitLabels = (/mdl(0,0),mdl(1,0),mdl(2,0),<wbr>mdl(3,0),mdl(4,0),mdl(5,0),<wbr>mdl(6,0),mdl(7,0),mdl(8,0),<wbr>mdl(9,0),mdl(10,0),mdl(11,0),<wbr>mdl(12,0),mdl(13,0),mdl(14,0),<wbr>mdl(15,0),mdl(16,0),mdl(17,0),<wbr>mdl(18,0),mdl(19,0),mdl(20,0),<wbr>mdl(21,0),mdl(22,0),mdl(23,0),<wbr>mdl(24,0),mdl(25,0),mdl(26,0),<wbr>mdl(27,0)/) </div></div><div><div><br></div></div><div><div>res2@xyMarkerSizeF = 0.005 ; Marker size (default 0.01)</div></div><div><div>res2@tiYAxisString = "Tundra Albedo Feedback (Wm~S~-2~N~K~S~-1~N~)"</div></div><div><div>res2@tiXAxisString = "Boreal Albedo Feedback (Wm~S~-2~N~K~S~-1~N~)"</div></div><div><div>res2@tiMainString = "MAM Mean Albedo Feedbacks"</div></div><div><div>res2@trYMinF = 0.0</div></div><div><div>res2@trYMaxF = 4.0</div></div><div><div>res2@trXMinF = -0.75</div></div><div><div>res2@trXMaxF = 1.5</div></div><div><div><br></div></div><div><div>res2@gsnDraw = False ; do not draw </div></div><div><div>res2@gsnFrame = False ; do not advance</div></div><div><div><br></div></div><div><div>txres = True</div></div><div><div>txres@txFontHeightF = 0.015 ; change font height</div></div><div><div><br></div></div><div><div>;---Set some legend resurces</div></div><div><div>res2@pmLegendDisplayMode = "Always" ; Turn on the legend</div></div><div><div>res2@lgOrientation = "horizontal" ; Default is vertical</div></div><div><div>res2@pmLegendWidthF = 0.5 ; Make it wider</div></div><div><div>res2@pmLegendOrthogonalPosF = -0.2 ; Move it up slightly</div></div><div><div>res2@lgPerimOn = False ; Turn off the perimeter box</div></div><div><div><br></div></div><div><div><br></div></div><div><div>plot = gsn_csm_xy(wks,BorMAM2,<wbr>TunMAM2,res2) ; create plot</div></div><div><div>draw(plot)</div></div><div><div>dum = gsn_add_text(wks,plot,"Pearson Correlation: "+ccr2,-0.2,3.8,txres)</div></div><div><div>frame(wks)</div></div><div><div><br></div></div><div><div>system("mv *.png /home/herringtont/Caldwell_<wbr>2016/figures/scatterplot")</div></div><div><div><br></div></div><div><div>end</div></div></blockquote><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Upon running the script, however, I get the following error:</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><div><br></div><div>fatal:Argument type mismatch on argument (3) of (gsn_csm_xy) can not coerce</div><div>fatal:["Execute.c":8640]:<wbr>Execute: Error occurred at or near line 107 in file Boreal_Tundra_Scatterplot.ncl</div></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Which leads me to suspect that something is wrong with the way that I am specifying resources for the plot. Any suggestions on what could be causing this?</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Thank You,</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div>
Sincerely,</div><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Tyler Herrington, MSc<div>PhD Student (Climate Science)</div><div>Geography and Environmental Management</div><div>University of Waterloo</div><div><img src="https://docs.google.com/uc?export=download&id=0B3tOGC9C-gd6Mzl6TzBCSDlJdk0&revid=0B3tOGC9C-gd6K2RNL0V1Z3hUa0pOZE5oV1dmdEovUDNENEEwPQ"><br></div></div></div></div></div></div>
</div>