[ncl-talk] Contour shading below thresold value on map

Sourav Chatterjee srvsxc at outlook.com
Fri May 17 08:49:34 MDT 2019


Hi Users

I am trying to shade the negative contour values with specified pattern over a map. Although the shade appears correctly but the
colour contours are not coming up in the figure. Below is the part of the script and the figure is attached. When gsn_contour_shade
is not used it produces the coloured contour plot.

Any help is appreciated!


wks = gsn_open_wks("eps","shade_negative")
gsn_define_colormap(wks,"amwg256")

    res                       = True
res at cnFillOn              = True
    res at cnLinesOn             =False
res at gsnDraw = False
res at gsnFrame = False
 res at mpDataBaseVersion    = "MediumRes"    ; better map outlines
  res at mpGridAndLimbOn      = True           ; turn on limb and grid lines
;  res at mpGridLineColor      = -1             ; ...but don't draw grid lines...
;  res at mpPerimOn            = False          ; turn off map perimeter
res at mpFillOn = True
  res at mpFillDrawOrder      = "PreDraw"     ; draw map fill last

res at mpProjection            = "LambertConformal"
      res at gsnMaskLambertConformal = True
      res at mpMinLatF               = 60
      res at mpMaxLatF               = 75
      res at mpMinLonF               = -15
      res at mpMaxLonF               = 15
      res at mpOutlineBoundarySets   = "AllBoundaries"
 res at mpDataSetName           = "Earth..3"
res at tiMainString = ""
res at cnLevelSelectionMode = "ManualLevels"
res at cnMinLevelValF = -0.3
res at cnMaxLevelValF = 0.8
res at cnLevelSpacingF = 0.02
res at gsnAddCyclic = False
res at mpGridLatSpacingF       = 5
  res at mpGridLonSpacingF       =  5
res at gsnLeftString = ""
;res at gsnContourZeroLineThicknessF = 3.5



plot = gsn_csm_contour_map(wks,e_new,res)

opt = True
opt at gsnShadeFillType = "pattern"
opt at gsnShadeLow = 3
plot = gsn_contour_shade(plot,0,-999,opt)
delete(opt at gsnShadeLow)

;---Attach latitude labels
  lat_spacing = 5   ; use integers here
 lon_spacing = 5
  add_lc_labels(wks,plot,minlat,maxlat,minlon,maxlon,lat_spacing,lon_spacing)



;---Drawing the plot will also draw all the attached labels.
  draw(plot)
  frame(wks)

exit
end




Regards
Sourav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190517/825900c5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shade_negative.eps
Type: image/x-eps
Size: 176098 bytes
Desc: shade_negative.eps
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190517/825900c5/attachment.bin>


More information about the ncl-talk mailing list