[ncl-talk] Sub: MaskArea...
Mary Haley
haley at ucar.edu
Mon Mar 28 11:38:21 MDT 2016
I didn't look in detail at why your script wasn't working, since I couldn't
actually run it.
Instead, I took the "mask_8.ncl" example and slightly modified it.
Hopefully you can figure out how to incorporate this into your code.
See attached.
--Mary
On Sun, Mar 27, 2016 at 6:41 PM, Adv <advita6 at gmail.com> wrote:
> Hi ,
> 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?
>
> Thank you
> ;**************************************************
> ; plot parameters
> ;**************************************************
>
> wks = gsn_open_wks("x11","test")
> gsn_define_colormap(wks,"BlWhRe") ; choose colormap
> ; gsn_define_colormap(wks,"testcmap") ; choose colormap
> plot = new(neof,graphic) ; create graphic array
> ; only needed if paneling
> ; EOF patterns
>
> res = True
> res at gsnDraw = False ; don't draw yet
> res at gsnFrame = False ; don't advance frame yet
>
> ;---This resource not needed in V6.1.0
> res at gsnSpreadColors = True ; spread out color table
> res at cnLevelSelectionMode = "ManualLevels" ; set manual contour levels
> res at cnMinLevelValF = -2 ; set min contour level
> res at cnMaxLevelValF = 2 ; set max contour level
> res at cnLevelSpacingF = 0.25 ; set contour spacing
>
>
> res at gsnAddCyclic = False ; plotted dataa are not cyclic
>
> res at mpFillOn = False ; turn off map fill
> res at mpMinLatF = prc&lat(0)+3 ; zoom in on map
> res at mpMaxLatF = prc&lat(nlat-1)
> res at mpMinLonF = prc&lon(0)
> res at mpMaxLonF = prc&lon(mlon-1)
> ;res at mpCenterLonF = Center
>
> res at cnFillOn = True ; turn on color fill
> res at cnLinesOn = False ; True is default
> res at cnLineLabelsOn = False
> res at lbLabelBarOn = False ; turn off individual lb's
> res at mpDataBaseVersion = "Ncarg4_1"
> res at mpDataSetName = "Earth..4" ; For counties
> res at mpAreaMaskingOn = True
> res at mpMaskAreaSpecifiers =(/"North Dakota","Montana" /)
> ;res at mpSpecifiedFillColors = (/"white","transparent"/)
>
> ; res at mpInlandWaterFillColor = "white"
> res at mpLandFillColor = "transparent"
>
> res at mpOutlineOn = True
> res at mpGeophysicalLineThicknessF = 3.0
> res at mpGeophysicalLineColor = "Black"; (/22/)
> res at mpOutlineBoundarySets = "GeophysicalAndUSStates" ; add state
> boundaries
> res at mpNationalLineColor = res at mpGeophysicalLineColor
> res at mpUSStateLineThicknessF = 3.0
> res at mpUSStateLineColor = res at mpGeophysicalLineColor
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160328/8750a1f9/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mask.png
Type: image/png
Size: 33704 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160328/8750a1f9/attachment.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mask_8.ncl
Type: application/octet-stream
Size: 1136 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160328/8750a1f9/attachment.obj
More information about the ncl-talk
mailing list