<div dir="ltr"><div class="gmail_default" style="font-size:small">I think the issue is simply that the script is setting mpOutlineOn to False if shapefile outlines are turned on. You want to set this to True since you want to see the outlines from both NCL and the shapefiles.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 27, 2018 at 7:53 PM Debasish Hazra <<a href="mailto:debasish.hazra5@gmail.com">debasish.hazra5@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Thanks Adam.I applied your changes and it removed double lines over India, but it still not drawing other neighbouring country borders. Here is the script I am using and attached is current figure generated : </div><div><br></div><div>plot_A = new (2 , graphic) ; create graphical array</div><div> res = True ; plot options desired<br> USE_SHAPEFILE_OUTLINES = True</div><div> res@gsnDraw = False<br> res@gsnFrame = False<br> res@gsnMajorLatSpacing = 10 ; change maj lat tm spacing<br> res@gsnMajorLonSpacing = 20</div><div> res@cnLinesOn = False<br> res@cnFillOn = True ; turn on color fill<br> res@cnInfoLabelOn = False ; turn off contour info label<br> res@cnLineLabelsOn = False ; turn off line labels<br> res@cnFillDrawOrder = "Predraw"</div><div> res@gsnSpreadColors = True ; use full color table<br> res@mpFillOn = False ; do not grey fill land<br> res@lbLabelBarOn = False ; turn off individual color bars<br> res@gsnStringFontHeightF = 0.018<br> res@tmYRMode = "Automatic" ; turn off special labels on right axis<br> res@lbAutoManage = False ; we control label bar</div><div> if(USE_SHAPEFILE_OUTLINES) then<br> res@mpOutlineOn = False<br> else<br>; res@mpOutlineOn = True<br>; res@mpOutlineBoundarySets = "National"<br> res@mpDataBaseVersion = "MediumRes" ; higher resolution basemap<br> res@mpDataSetName = "Earth..4" ; contains divisions for other countries<br> res@mpOutlineMaskingOn = True<br> res@mpMaskOutlineSpecifiers = "Indian:states"<br> end if</div><div><br></div><div> res@mpLimitMode = "Corners"<br> res@mpLeftCornerLatF = 0.0<br> res@mpLeftCornerLonF = 50.0<br> res@mpRightCornerLatF = 40.0<br> res@mpRightCornerLonF = 100.0</div><div><br> res@gsnDraw = False<br> res@gsnFrame = False<br> res@gsnLeftString = ""<br> res@gsnRightString = ""</div><div><br></div><div> res@gsnCenterString = labes(0)<br> plot_A(0) = gsn_csm_contour_map_ce (wks, rainl(:,:), res)<br> res@gsnCenterString = labes(1)<br> plot_A(1) = gsn_csm_contour_map_ce (wks, rain2(:,:), res)</div><div><br></div><div> if(USE_SHAPEFILE_OUTLINES) then<br> lnres= True<br> ind_met = gsn_add_shapefile_polylines(wks,plot_A,"./Indian_met_zones-master/indian_met_zones.v2.shp",lnres)<br> end if</div><div> pres1 = True ; panel options<br> pres1@gsnFrame = False<br> pres1@gsnDraw = True<br> pres1@gsnMaximize = True ; maximize image<br> pres1@gsnPanelLabelBar = True ; Add common label bar<br> </div><div> gsn_panel(wks,plot_A,(/1,2/),pres1)<br> ;draw(plot)<br>frame(wks)</div><div><br></div><div>Any help.</div><div>Thanks</div><div>Debasish<br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 27, 2018 at 3:43 PM Adam Phillips <<a href="mailto:asphilli@ucar.edu" target="_blank">asphilli@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Debasish,<div>I am guessing your shapefile outlines are more precise than NCL's built in outlines, and that's why you're getting double boundaries being shown. I would suggest continuing what you're doing, but tell NCL to exclude drawing the Indian states by utilizing the mpMaskOutlineSpecifiers:</div><div>res@mpDataBaseVersion = "MediumRes"<br></div><div>res@mpDataSetName = "Earth..4"<br></div><div>res@mpOutlineMaskingOn = True</div><div>res@mpMaskOutlineSpecifiers = "Indian:states" ; do not draw any outlines specified here</div><div><br></div><div><a href="http://www.ncl.ucar.edu/Document/Graphics/Resources/mp.shtml#mpMaskOutlineSpecifiers" target="_blank">http://www.ncl.ucar.edu/Document/Graphics/Resources/mp.shtml#mpMaskOutlineSpecifiers</a><br></div><div>Example showing mpMaskOutlineSpecifier use: <a href="http://www.ncl.ucar.edu/Applications/Scripts/maponly_14.ncl" target="_blank">http://www.ncl.ucar.edu/Applications/Scripts/maponly_14.ncl</a><br></div><div>Example showing how to specify Indian states: <a href="http://www.ncl.ucar.edu/Applications/Scripts/maponly_16.ncl" target="_blank">http://www.ncl.ucar.edu/Applications/Scripts/maponly_16.ncl</a></div><div><br></div><div>If you have any further questions let ncl-talk know.</div><div>Adam</div><div><br></div></div></div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 27, 2018 at 1:16 PM Debasish Hazra <<a href="mailto:debasish.hazra5@gmail.com" target="_blank">debasish.hazra5@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi,</div><div>I am using shapefile to draw outline over India following polyg_shp_9.ncl example. However, my plotting domain covers other area besides India and when I am using </div><div> lnres= True<br> ind_met = gsn_add_shapefile_polylines(wks,plot_A,"./Indian_met_zones-master/indian_met_zones.v2.shp",lnres)</div><div>in combination with </div><div>res@mpOutlineOn = False</div><div><br></div><div>I am getting outline of India only, with neighboring counties boundaries not drawn. </div><div><br></div><div>But when I am using </div><div>res@mpOutlineOn = True</div><div>in combination with the above mentioned shapefile over India, I am getting double line borders over India (coming from both India met shapefile and ncl map outline). I have attached both resulting figures. How do I solve this to combine both in proper way ?</div><div><br></div><div>Thanks</div><div>Debasish</div></div></div></div></div></div>
_______________________________________________<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" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_4921117013409783270m_-4692517778123693889gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist, </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a> </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div>
_______________________________________________<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" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>