<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Good day Adam,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Thank you very much! It works great now.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Nkese.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Adam Phillips <asphilli@ucar.edu>
<br>
<b>Sent:</b> Tuesday, May 7, 2019 12:00 PM<br>
<b>To:</b> Nkese Mc Shine <Nkese.McShine@sta.uwi.edu><br>
<b>Cc:</b> ncl-talk@ucar.edu<br>
<b>Subject:</b> Re: [ncl-talk] Overlay on panel plots<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi Nkese,<o:p></o:p></p>
<div>
<p class="MsoNormal">I see two issues:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">1) A plot that is to be overlaid on another plot cannot be created by one of the *_map* plotting routines. So change this:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Tahoma",sans-serif;color:black">plots(nmo) = gsn_csm_vector_map(wks,uwnd_monthly(nmo,:,:),vwnd_monthly(nmo,:,:),vecres)</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Tahoma",sans-serif;color:black">to this:</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Tahoma",sans-serif;color:black">plots(nmo) = gsn_csm_vector(wks,uwnd_monthly(nmo,:,:),vwnd_monthly(nmo,:,:),vecres)</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Tahoma",sans-serif;color:black">2) You are overwriting your plot array every time through your loop. Change this:</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Tahoma",sans-serif;color:black"> overlay(plot(nmo),plots(nmo))<br>
plot = plot(nmo)<br>
end do <br>
gsn_panel(wks,plot,(/3,4/),resP)</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Tahoma",sans-serif;color:black">to this:</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Tahoma",sans-serif;color:black"> overlay(plot(nmo),plots(nmo))<br>
end do <br>
gsn_panel(wks,plot,(/3,4/),resP)</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Tahoma",sans-serif;color:black">Adam</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, May 7, 2019 at 9:15 AM Nkese Mc Shine <<a href="mailto:Nkese.McShine@sta.uwi.edu">Nkese.McShine@sta.uwi.edu</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black">Good day everyone,<br>
<br>
I would like to overlay 12 wind direction vector maps on 12 wind speed maps however I keep getting an error. Can anyone assist?<br>
<br>
Thanking you in advance.<br>
<br>
Regards,<br>
Nkese.<br>
<br>
My script:<br>
<br>
;;create plots<br>
<br>
wks = gsn_open_wks("ps","Caribbeanwinds_monthly6")<br>
plot = new(12,graphic)<br>
plots = new(12,graphic)<br>
<br>
res = True<br>
res@gsnDraw = False ; don't draw<br>
res@gsnFrame = False ; don't advance frame<br>
res@cnFillOn = True ; turn on color<br>
res@gsnMaximize = True <br>
<br>
cmap = read_colormap_file("BkBlAqGrYeOrReViWh200")<br>
res@cnFillPalette = cmap(25:170,:) ; set color map<br>
<br>
res@cnLinesOn = False ; no contour lines<br>
res@lbLabelBarOn = False<br>
<br>
res@gsnLeftString = "Speed" ; change left string<br>
res@gsnRightString = uwnd_practice@units ; assign right string<br>
<br>
res@mpDataSetName = "Earth..4"<br>
res@mpDataBaseVersion = "MediumRes"<br>
res@mpOutlineOn = True<br>
<br>
res@mpGeophysicalLineThicknessF = 2<br>
res@mpNationalLineThicknessF = 2<br>
res@mpFillDrawOrder = "PostDraw"<br>
res@mpFillOn = False ; no map fill<br>
<br>
res@mpMinLatF = 0<br>
res@mpMaxLatF = 30<br>
res@mpMinLonF = -110<br>
res@mpMaxLonF = -30<br>
<br>
vecres = True ; vector only resources<br>
vecres@gsnDraw = False ; don't draw<br>
vecres@gsnFrame = False ; don't advance frame<br>
vecres@vcGlyphStyle = "LineArrow" ; curly vectors<br>
vecres@vcRefMagnitudeF = 10 ; define vector ref mag<br>
vecres@vcRefLengthF = 0.045 ; define length of vec ref<br>
<br>
vecres@vcLineArrowThicknessF = 1<br>
vecres@vcMinDistanceF = 0.05<br>
<br>
vecres@gsnRightString = " " ; turn off right string<br>
vecres@gsnLeftString = " " ; turn off left string<br>
vecres@tiXAxisString = " " ; turn off axis label <br>
vecres@vcRefAnnoOrthogonalPosF = -1.0 ; move ref vector into plot<br>
<br>
months = (/"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug",\<br>
"Sep","Oct","Nov","Dec"/)<br>
<br>
resP = True ; panel only resources<br>
resP@gsnPanelLabelBar = True<br>
resP@gsnMaximize = True ; maximize plots <br>
<br>
<br>
do nmo=0,11<br>
res@gsnCenterString=months(nmo)<br>
vecres@gsnCenterString=months(nmo)<br>
plot(nmo) = gsn_csm_contour_map_ce(wks,wspd_monthly(nmo,:,:),res)<br>
plots(nmo) = gsn_csm_vector_map(wks,uwnd_monthly(nmo,:,:),vwnd_monthly(nmo,:,:),vecres)<br>
overlay(plot(nmo),plots(nmo))<br>
plot = plot(nmo)<br>
end do <br>
<br>
<br>
gsn_panel(wks,plot,(/3,4/),resP)<br>
<br>
<br>
Error:<br>
fatal:NhlAddOverlay: plot class mapPlotClass cannot be overlay plot member<br>
fatal:NhlAddOverlay: plot class mapPlotClass cannot be overlay plot member<br>
fatal:NhlAddOverlay: plot class mapPlotClass cannot be overlay plot member<br>
fatal:NhlAddOverlay: plot class mapPlotClass cannot be overlay plot member<br>
fatal:NhlAddOverlay: plot class mapPlotClass cannot be overlay plot member<br>
fatal:NhlAddOverlay: plot class mapPlotClass cannot be overlay plot member<br>
fatal:NhlAddOverlay: plot class mapPlotClass cannot be overlay plot member<br>
fatal:NhlAddOverlay: plot class mapPlotClass cannot be overlay plot member<br>
fatal:NhlAddOverlay: plot class mapPlotClass cannot be overlay plot member<br>
fatal:NhlAddOverlay: plot class mapPlotClass cannot be overlay plot member<br>
fatal:NhlAddOverlay: plot class mapPlotClass cannot be overlay plot member<br>
fatal:NhlAddOverlay: plot class mapPlotClass cannot be overlay plot member<br>
warning:MapSetTrans: map limits invalid - using maximal area<br>
fatal:MapSetTrans: error initializing map: MAPINT/MDPINT - MAP HAS ZERO AREA<br>
warning:MapSetTrans: map limits invalid - using maximal area<br>
fatal:MapSetTrans: error initializing map: MAPINT/MDPINT - MAP HAS ZERO AREA<br>
warning:MapSetTrans: map limits invalid - using maximal area<br>
fatal:MapSetTrans: error initializing map: MAPINT/MDPINT - MAP HAS ZERO AREA<br>
warning:MapSetTrans: map limits invalid - using maximal area<br>
fatal:MapSetTrans: error initializing map: MAPINT/MDPINT - MAP HAS ZERO AREA<br>
warning:MapSetTrans: map limits invalid - using maximal area<br>
fatal:MapSetTrans: error initializing map: MAPINT/MDPINT - MAP HAS ZERO AREA<br>
warning:MapSetTrans: map limits invalid - using maximal area<br>
fatal:MapSetTrans: error initializing map: MAPINT/MDPINT - MAP HAS ZERO AREA<br>
warning:MapSetTrans: map limits invalid - using maximal area<br>
fatal:MapSetTrans: error initializing map: MAPINT/MDPINT - MAP HAS ZERO AREA<br>
<o:p></o:p></span></p>
</div>
<p class="MsoNormal">CONFIDENTIALITY: This email (including any attachments) may contain confidential, proprietary and/or privileged information. Any duplication, copying, distribution, dissemination, transmission, disclosure or use in any manner of this email
(including any attachments) without the authorisation of the sender is strictly prohibited. If you receive this email (including any attachments) in error, please notify the sender and delete this email (including any attachments) from your system. Thank you.
<o:p></o:p></p>
</div>
<p class="MsoNormal">_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="color:#888888">Adam Phillips </span><o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="color:#888888">Associate Scientist, Climate and Global Dynamics Laboratory, NCAR</span><o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a> 303-497-1726
</span><o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
CONFIDENTIALITY: This email (including any attachments) may contain confidential, proprietary and/or privileged information. Any duplication, copying, distribution, dissemination, transmission, disclosure or use in any manner of this email (including any attachments)
without the authorisation of the sender is strictly prohibited. If you receive this email (including any attachments) in error, please notify the sender and delete this email (including any attachments) from your system. Thank you.
</body>
</html>