<div dir="ltr"><div class="gmail_default" style="font-size:small">I didn't look in detail at why your script wasn't working, since I couldn't actually run it.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Instead, I took the "mask_8.ncl" example and slightly modified it. Hopefully you can figure out how to incorporate this into your code.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">See attached.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 27, 2016 at 6:41 PM, Adv <span dir="ltr"><<a href="mailto:advita6@gmail.com" target="_blank">advita6@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi ,<br></div>I have been trying to mask specific states. I didn't get any error, though no specified region is masked out. Could someone help me to fix this?<br><br></div>Thank you<br><div>;**************************************************<br>; plot parameters<br>;**************************************************<br><br>wks = gsn_open_wks("x11","test")<br> gsn_define_colormap(wks,"BlWhRe") ; choose colormap<br>; gsn_define_colormap(wks,"testcmap") ; choose colormap<br> plot = new(neof,graphic) ; create graphic array<br> ; only needed if paneling<br>; EOF patterns<br><br> res = True<br> res@gsnDraw = False ; don't draw yet<br> res@gsnFrame = False ; don't advance frame yet<br><br>;---This resource not needed in V6.1.0<br> res@gsnSpreadColors = True ; spread out color table<br>res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels<br> res@cnMinLevelValF = -2 ; set min contour level<br> res@cnMaxLevelValF = 2 ; set max contour level<br> res@cnLevelSpacingF = 0.25 ; set contour spacing<br><br><br> res@gsnAddCyclic = False ; plotted dataa are not cyclic<br><br> res@mpFillOn = False ; turn off map fill<br>res@mpMinLatF = prc&lat(0)+3 ; zoom in on map<br> res@mpMaxLatF = prc&lat(nlat-1)<br> res@mpMinLonF = prc&lon(0)<br> res@mpMaxLonF = prc&lon(mlon-1)<br>;res@mpCenterLonF = Center<br><br> res@cnFillOn = True ; turn on color fill<br> res@cnLinesOn = False ; True is default<br>res@cnLineLabelsOn = False<br> res@lbLabelBarOn = False ; turn off individual lb's<br>res@mpDataBaseVersion = "Ncarg4_1"<br> res@mpDataSetName = "Earth..4" ; For counties<br>res@mpAreaMaskingOn = True<br>res@mpMaskAreaSpecifiers =(/"North Dakota","Montana" /)<br>;res@mpSpecifiedFillColors = (/"white","transparent"/)<br><br>; res@mpInlandWaterFillColor = "white"<br> res@mpLandFillColor = "transparent"<br><br> res@mpOutlineOn = True<br>res@mpGeophysicalLineThicknessF = 3.0<br>res@mpGeophysicalLineColor = "Black"; (/22/)<br>res@mpOutlineBoundarySets = "GeophysicalAndUSStates" ; add state boundaries<br>res@mpNationalLineColor = res@mpGeophysicalLineColor<br>res@mpUSStateLineThicknessF = 3.0<br>res@mpUSStateLineColor = res@mpGeophysicalLineColor<br><br><br><br></div></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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>
<br></blockquote></div><br></div>