<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p style="margin-top:0;margin-bottom:0"><span style="font-size: 12pt;">Mary</span><br>
</p>
<div style="color: rgb(0, 0, 0);">
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0"> Thanks a lot for helping on this!</p>
<p style="margin-top:0; margin-bottom:0"> Now I changed to  NCl 6.3.0 and used <span>wrf_map_resources and added <span>res@gsnAddCyclic = False </span></span></p>
<p style="margin-top:0; margin-bottom:0"><span><span> But I still did not make <span>the case of tfDoNDCOverlay not being set    to be consistent with  the case of <span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small">tfDoNDCOverlay
 setting to True</span></span></span></span></p>
<p style="margin-top:0; margin-bottom:0"><span><span><span><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small"> I attached 2 cleaned script</span></span></span></span></p>
<p style="margin-top:0; margin-bottom:0"><span><span><span><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small"> with <span>plot_geoHeight950mb_combine2episodes_with_ndc_overlay.ncl I got: </span></span></span></span></span></p>
<p style="margin-top:0; margin-bottom:0"><span><span><span><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small"><span><img naturalheight="423" naturalwidth="813" size="239315" id="x_img386946" tabindex="0" style="max-width: 99.9%; user-select: none;" src="cid:19b8c72a-97cf-4db6-96cc-5b8cad55ed90"><br>
</span></span></span></span></span></p>
<p style="margin-top:0; margin-bottom:0"><span><span><span><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small"><span>with <span>plot_geoHeight950mb_combine2episodes_without_ndc_overlay.ncl, I got: </span></span></span></span></span></span></p>
<p style="margin-top:0; margin-bottom:0"><span><span><span><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small"><span><span><img naturalheight="428" naturalwidth="816" size="238265" id="x_img959429" tabindex="0" style="max-width: 99.9%; user-select: none;" src="cid:514ad212-3ce0-435d-ab13-d3d541ac062b"><br>
</span></span></span></span></span></span></p>
<p style="margin-top:0; margin-bottom:0"><span><span><span><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small"><span><span>The previous issue still exists, plus the map is gone. :) </span></span></span></span></span></span></p>
<p style="margin-top:0; margin-bottom:0"><span><span><span><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small"><span><span>See the difference between the 2 scripts:</span></span></span></span></span></span></p>
<p style="margin-top:0; margin-bottom:0"><span><span><span><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small"><span><span></span></span></span></span></span></span></p>
<div>< ;  res@tfDoNDCOverlay       = True</div>
<div><   res@tfDoNDCOverlay       = False </div>
<div>---</div>
<div>>   res@tfDoNDCOverlay       = True</div>
<div>> ;  res@tfDoNDCOverlay       = False </div>
<div>134,140d132<br>
</div>
<div><    u_950@lat2d = lat2d</div>
<div><    u_950@lon2d = lon2d</div>
<div><    v_950@lat2d = lat2d</div>
<div><    v_950@lon2d = lon2d</div>
<div><    geoHeight_950@lat2d = lat2d</div>
<div><    geoHeight_950@lon2d = lon2d</div>
<div><  </div>
<div>146,147c138,139</div>
<div>< ;    plot                 = gsn_csm_vector_scalar_map(wks,u_950(:,n_cutoff:),v_950(:,n_cutoff:),geoHeight_950(:,n_cutoff:),res) </div>
<div><     plot                 = gsn_csm_vector_scalar_map(wks,u_950,v_950,geoHeight_950,res) </div>
<div>---</div>
<div>>     plot                 = gsn_csm_vector_scalar_map(wks,u_950(:,n_cutoff:),v_950(:,n_cutoff:),geoHeight_950(:,n_cutoff:),res) </div>
<div>> ;    plot                 = gsn_csm_vector_scalar_map(wks,u_950,v_950,geoHeight_950,res) </div>
<div><br>
</div>
<div>Did I miss anything? </div>
<br>
<p></p>
<p style="margin-top:0; margin-bottom:0"><span><span><span><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small">  I put the data (1.9G) at</span></span></span></span></p>
<p style="margin-top:0; margin-bottom:0"> <a href="http://www.caps.ou.edu/micronet/HurricaneImpactonO3/WRFV3.9.1/YSU/wrfchem3.9.1_ERA2d_CONUS_NLCD_NEI2011_MEGAN_nudge2.2011082500/wrfout_d01_2011-08-08_12:00:00" class="x_OWAAutoLink" id="LPlnk387174" previewremoved="true">http://www.caps.ou.edu/micronet/HurricaneImpactonO3/WRFV3.9.1/YSU/wrfchem3.9.1_ERA2d_CONUS_NLCD_NEI2011_MEGAN_nudge2.2011082500/wrfout_d01_2011-08-08_12:00:00</a></p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">Thanks a lot!</p>
<p style="margin-top:0; margin-bottom:0">Xiaoming </p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Mary Haley <haley@ucar.edu><br>
<b>Sent:</b> Wednesday, April 18, 2018 7:18:48 PM<br>
<b>To:</b> xiaoming Hu<br>
<b>Cc:</b> ncl-talk@ucar.edu; Xiaoming Hu<br>
<b>Subject:</b> Re: [ncl-talk] difference between using res@tfDoNDCOverlay and @lat2d @lon2d when overlaying wind vectors</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div class="x_x_gmail_default" style="font-size:small">Xiaoming,</div>
<div class="x_x_gmail_default" style="font-size:small"><br>
</div>
<div class="x_x_gmail_default" style="font-size:small">You have an out-dated function call (WRF_map_c) that might possibly be the source of the problem. This is a deprecated function and you should use wrf_map_resources to set your WRF map projection instead:</div>
<div class="x_x_gmail_default" style="font-size:small"><br>
</div>
<div class="x_x_gmail_default"><a href="http://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_map_resources.shtml" id="LPlnk414898" previewremoved="true">http://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_map_resources.shtml<br>
</a></div>
<div class="x_x_gmail_default"><br>
</div>
<div class="x_x_gmail_default">I can't tell from your code why the two results are different, because it's not clear to me if the only thing you are changing is whether or not tfDoNDCOverlay is set.</div>
<div class="x_x_gmail_default"><br>
</div>
<div class="x_x_gmail_default">If I'm understanding your email correctly, it sounds like the plot that is created when <span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small; font-style: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); float:none; display:inline">tfDoNDCOverlay
 is set to True is the one that's correct. However, I'm surprised it's working for you because:</span></div>
<div class="x_x_gmail_default"><br>
</div>
<div class="x_x_gmail_default">[1] If you set tfDoNDCOverlay to True, you should NOT attach any lat2d/lon2d attributes to your data variables.</div>
<div class="x_x_gmail_default"><br>
</div>
<div class="x_x_gmail_default">[2] Also, if <span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small; font-style: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); float:none; display:inline">tfDoNDCOverlay
 is True, you must be using the EXACT map projection that was defined on the file.  But, you are using WRF_map_c which hasn't been updated in years, so this function could likely be giving you wrong results. Also, you are setting:</span></div>
<br>
  n_cutoff = 150<br>
  res@mpLeftCornerLonF = lon2d(0,n_cutoff)<br>
  res@mpLeftCornerLatF = lat2d(0,n_cutoff)
<div class="x_x_gmail_default"><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small; font-style: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); float:none; display:inline"><br>
</span></div>
<div class="x_x_gmail_default"><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small; font-style: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); float:none; display:inline">which
 looks to me like you are zooming in on the map, but you haven't also zoomed in on the data in the same way, so again, I don't know how your plots can be correct.</span></div>
<div class="x_x_gmail_default"><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small; font-style: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); float:none; display:inline"><br>
</span></div>
<div class="x_x_gmail_default">[3] For the case of tfDoNDCOverlay not being set, you may need to set res@gsnAddCyclic = False to prevent a longitude cyclic point from being added.</div>
<div class="x_x_gmail_default"><br>
</div>
<div class="x_x_gmail_default">Please visit this WRF examples page, which has examples of plotting WRF data with both tfDoNDCOverlay set and without it set:</div>
<div class="x_x_gmail_default"><br>
</div>
<div class="x_x_gmail_default"><a href="http://www.ncl.ucar.edu/Applications/wrfgsn.shtml" id="LPlnk460506" previewremoved="true">http://www.ncl.ucar.edu/Applications/wrfgsn.shtml</a><br>
</div>
<div class="x_x_gmail_default"><br>
</div>
<div class="x_x_gmail_default">I've attached two modified versions of your script. Since I don't have the data, I am unable to test these scripts. But, hopefully they help show the difference between these two scenarios.</div>
<div class="x_x_gmail_default"><br>
</div>
<div class="x_x_gmail_default">If you continue to have problems with this, please post back to ncl-talk, but include a clean, updated script if possible.</div>
<div class="x_x_gmail_default"><br>
</div>
<div class="x_x_gmail_default">Good luck,</div>
<div class="x_x_gmail_default"><br>
</div>
<div class="x_x_gmail_default">--Mary</div>
<div class="x_x_gmail_default"><br>
</div>
<div class="x_x_gmail_default"><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small; font-style: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); float:none; display:inline"><br>
</span></div>
<div class="x_x_gmail_default"><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small; font-style: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); float:none; display:inline"><br>
</span></div>
<div class="x_x_gmail_default"><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small; font-style: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); float:none; display:inline"><br>
</span></div>
<div class="x_x_gmail_default"><br>
</div>
<div class="x_x_gmail_default"><br>
</div>
</div>
<div class="x_x_gmail_extra"><br>
<div class="x_x_gmail_quote">On Tue, Apr 17, 2018 at 11:04 PM, xiaoming Hu <span dir="ltr">
<<a href="mailto:yuanfangcan@hotmail.com" target="_blank" id="LPlnk570435" previewremoved="true">yuanfangcan@hotmail.com</a>></span> wrote:<br>
<blockquote class="x_x_gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">
<div id="x_x_m_-1516211398501258156divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<p style="margin-top:0; margin-bottom:0">Hello </p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0"> If I use <span>res@tfDoNDCOverlay  I got the figure of </span></p>
<p style="margin-top:0; margin-bottom:0"><span><br>
</span></p>
<p style="margin-top:0; margin-bottom:0"><span>But If I use @lat2d @lon2d without <span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px">res@tfDoNDCOverlay 
 I got</span></span></p>
<p style="margin-top:0; margin-bottom:0"><span><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px"><br>
</span></span></p>
<p style="margin-top:0; margin-bottom:0"><span>The wind vectors near the right edge in the left panel do not follow the pressure lines now. </span></p>
<p style="margin-top:0; margin-bottom:0"><span><br>
</span></p>
<p style="margin-top:0; margin-bottom:0"><span>Any comments on overlaying wind vectors using <span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px">res@tfDoNDCOverlay 
   or using <span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px">@lat2d @lon2d without </span><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px">res@tfDoNDCOverlay
 ? </span></span></span></p>
<p style="margin-top:0; margin-bottom:0"><span><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px"><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px">I
 attached my ncl script </span></span></span></p>
<p style="margin-top:0; margin-bottom:0"><span><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px"><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px">Thanks</span></span></span></p>
<span class="x_x_HOEnZb"><font color="#888888">
<p style="margin-top:0; margin-bottom:0"><span><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px"><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px">Xiaoming </span></span></span></p>
<p style="margin-top:0; margin-bottom:0"><span><br>
</span></p>
</font></span></div>
</div>
<br>
______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" id="LPlnk544529" previewremoved="true">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank" id="LPlnk934878" previewremoved="true">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>