<div dir="ltr">Hi Sri,<div>To clarify my previous response, res2@cnMonoFillPattern = False also needs to be set when not using gsn_contour_shade:</div><div><div style="font-size:12.8px"><span style="font-size:12.8px">  res2 = True                          </span><span style="font-size:12.8px"><wbr>  ; res2 probability plots</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@gsnDraw             = False       ; Do not draw plot</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@gsnFrame            = False       ; Do not advance frome</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@cnLevelSelectionMode = "ExplicitLevels" ; set explicit cnlev</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@cnLevels   = (/.05/)    ; only have 1 contour level</span></div><div style="font-size:12.8px">  <span style="font-size:small">res2@cnMonoFillPattern = False </span><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@cnFillPatterns = (/17,-1/) ; don't fill <0.95, stipple >=0.95</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res@cnFillOn = True</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@cnInfoLabelOn       = False</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@cnLinesOn           = False       ; do not draw contour lines</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@cnLineLabelsOn      = False       ; do not draw contour labels</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@cnFillScaleF        = 0.6         ; add extra density</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">  plot2 = gsn_csm_contour(wks,probt,</span><span style="font-size:12.8px">res2<wbr>)                         </span><span style="font-size:12.8px">    <wbr>        ; add cyclic point</span><br style="font-size:12.8px"></div><div style="font-size:12.8px"><span style="font-size:12.8px">  </span><span style="font-size:12.8px">overlay (plot, plot2)</span></div></div><div><br></div><div>Looking at the new modifications to your script, you are doing this for your t-test calculation:</div><div><span style="font-size:12.8px">probt = 100.*(1. -ttest(aveY,varY,xEqv,aveX,</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">varX,yEqv,True,False)) ; all areas whose value > 95 are significant</span><br></div><div><br></div><div>As you are multiplying by 100 after subtracting the values from one, your comment is correct, all values greater than 95 would be considered significant. However, you are also setting your contour levels like this:</div><div><span style="font-size:12.8px">res2@cnLevels   = (/.95/)    ; only have 1 contour level</span></div><div><span style="font-size:12.8px">Thus, you are setting your single contour level to be at .95, and not 95. So you should change that resource to 95. </span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Also, you are calling gsn_contour_shade like this:</span></div><div><div><span style="font-size:12.8px">opt = True                    ; set up parameters for pattern fill</span></div><div><span style="font-size:12.8px">opt@gsnShadeFillType = "pattern"  ; specify pattern fill</span></div><div><span style="font-size:12.8px">opt@gsnShadeLow      = 17         ; stipple pattern</span></div><div><span style="font-size:12.8px">plot2   = gsn_contour_shade(plot2, 0.95, 3., opt) ; stipple all areas < 95 contour              </span></div></div><div><br></div><div>Those settings will result in all values less than or equal to .95 (matches your original contour level of .95) being shaded, which is not what you want. Those setting should be switched to this:</div><div><br></div><div><span style="font-size:12.8px">res2@cnLevels   = (/95./)   </span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">opt = True                    ; set up parameters for pattern fill</span></div><div><span style="font-size:12.8px">opt@gsnShadeFillType = "pattern"  ; specify pattern fill</span></div><div><span style="font-size:12.8px">opt@gsnShadeHigh      = 17         ; stipple pattern</span></div><div><span style="font-size:12.8px">plot2   = gsn_contour_shade(plot2, 1, 95., opt) ; stipple all areas >= 95  contour       </span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Also note that when you turn stippling on that not every grid box will necessarily have one stipple in it, and some (depending on your grid) might have more. </span><br></div><div><br></div><div>If you have any further questions please respond to ncl-talk.</div><div>Adam</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 18, 2018 at 8:28 AM, Sri Nandini via ncl-talk <span dir="ltr"><<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hello<br><br>It appears now the stippling is being added to the map, see pdf attached, however the the latlon seem to be shifted, am i wrong about this?<br>Here is my modified script:<br><br><br>load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/shea_util.ncl"<br><br> yrStrt = 0000<br> yrLast = 0100<br>; ==============================<wbr>==============================<wbr>==<br>; Open the file: Read only the user specified period <br>; ==============================<wbr>==============================<wbr>==<br>f= addfile("T2M_C.nc", "r") ;Model Control<br>TIME   = f->time<br>  YYYY   = cd_calendar(TIME,-1)/100      <wbr>           ; entire file<br>  iYYYY  = ind(YYYY.ge.yrStrt .and. YYYY.le.yrLast)<br>T41    = f->TREFHT(iYYYY,:,:)<br>;printVarSummary(T41)         <wbr>                       ; (time, lat,lon)<br>T4    = lonFlip(T41)<br>;printVarSummary(T4)          <wbr>                      ; (time, lat,lon)<br>T4@_FillValue = -9.96921e+36  <br>aveX = dim_avg_n_Wrap(T4, 0)                   ;; average over the 0th dim<br>;printVarSummary(aveX)        <wbr>                        ; (lat,lon) <br>varX = dim_variance_n_Wrap(T4,0) ; compute variance<br>;printVarSummary(varX)        <wbr>                        ; (lat,lon) <br>;=============================<wbr>==============================<wbr>===================<br><br>f2= addfile("T2M_CC.nc", "r") ;Current Caspian<br>TIME2  = f2->time<br>  YYYY2   = cd_calendar(TIME2,-1)/100     <wbr>            ; entire file<br>  iYYYY2  = ind(YYYY2.ge.yrStrt .and. YYYY2.le.yrLast)<br>air22   = f2->TREFHT(iYYYY2,:,:)<br>air2    = lonFlip(air22)<br>;printVarSummary(air2)        <wbr>                        ; (time, lat,lon)<br>air2@_FillValue = -9.96921e+36                  <wbr>            <br>aveY = dim_avg_n_Wrap(air2,0)  ; average over the 0th dim<br>;printVarSummary(aveY)        <wbr>                        ; (lat,lon) <br>varY = dim_variance_n_Wrap(air2,0) ; compute variance<br>;printVarSummary(varY)        <wbr>                        ; (lat,lon) <br>;=============================<wbr>==============================<wbr>=====================<br>;Use "ttest" to compute the probabilities  plot: ZeroNegDashLineContour and ShadeLtContour<br>;           are in shea_util.ncl. <br>;=============================<wbr>==============================<wbr>======================<br>  sigr = 0.05                        ; critical sig lvl for r<br><br> xEqv = new(dimsizes(varY),typeof(<wbr>varY),varY@_FillValue)<br>;printVarSummary(xEqv)        <wbr>                       ; (lat,lon) <br>  xEqv = equiv_sample_size (T4(lat|:,lon|:,time|:), sigr,0)   <br> copy_VarMeta(varY,xEqv)<br>;printVarSummary(xEqv)        <wbr>                       ; (lat,lon) <br><br> yEqv = new(dimsizes(varY),typeof(<wbr>varY),varY@_FillValue)<br>;printVarSummary(yEqv)        <wbr>                        ; (lat,lon) <br>  yEqv = equiv_sample_size (air2(lat|:,lon|:,time|:), sigr,0)<br>copy_VarMeta(varY,yEqv)<br>;printVarSummary(yEqv)        <wbr>                        ; (lat,lon) <br>                   <br>;=============================<wbr>==============================<wbr>=======================<br> probt = new(dimsizes(varY),typeof(<wbr>varY),varY@_FillValue)<br><br> ;probt = ttest(aveY,varY,xEqv,aveX,<wbr>varX,yEqv,True,False) ; values are between 0 and 1<br><br>probt = 100.*(1. -ttest(aveY,varY,xEqv,aveX,<wbr>varX,yEqv,True,False)) ; all areas whose value > 95 are significant<br>printVarSummary(probt)        <wbr>        ; (lat,lon) <br><br>copy_VarMeta(varY,probt)<br>printVarSummary(probt)        <wbr>        ; (lat,lon) <br><br> printMinMax(probt,0)         <wbr>           ;  min=0   max=97.2842<br>;=============================<wbr>==============================<wbr>=<br>;calculate the T2M difference <br>;=============================<wbr>==============================<wbr>= <br> T2diff = new(dimsizes(aveY),typeof(<wbr>aveY),aveY@_FillValue)<br>;printVarSummary(T2diff)      <wbr>                           <br>copy_VarMeta(aveY,T2diff)<br>;printVarSummary(T2diff)      <wbr>                           <br>T2diff=aveY-aveX<br>  ; printVarSummary(T2diff)       <wbr>                         ; (lat,lon) <br>;=============================<wbr>==============================<wbr>=========<br>;Here is a section of my code that draws a color fill plot, and then<br>;overlays contours of statistical significance.<br>;=============================<wbr>==============================<wbr>=========<br>   wks = gsn_open_wks("pdf","T2M_tt")<br>   gsn_define_colormap(wks,"<wbr>BlWhRe")<br><br>  res = True<br>  res@cnFillOn             = True                ; turn on color<br>  res@gsnSpreadColors      = True                ; use full colormap<br><br>  res@cnLinesOn            = False               ; turn off contour lines<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.2            ; set contour spacing<br><br>  res@gsnDraw              = False           ; Do not draw plot<br>  res@gsnFrame             = False           ; Do not advance frome<br><br>  res@tiMainString         = "T2M Difference: 50yrs overlay with ttest"<br>  ;res@gsnCenterString      = "5% stippled"<br>  ;res@gsnLeftString        = "K"<br>     res@cnFillMode       = "RasterFill"       ; Raster Mode<br>   res@cnRasterModeOn            <wbr>  = True              ; Raster mode shows grid cells<br>   plot = gsn_csm_contour_map(wks,<wbr>T2diff,res)  <br>   plot = ZeroNegDashLineContour (plot)            ; a shea_util.ncl function<br><br> aa=stat_dispersion(probt,<wbr>True)   ; Make sure your data has values less than  or equal to 0.95 that can be plotted<br>    <br>  res2 = True                          <wbr>  ; res2 probability plots<br>  res2@gsnDraw             = False       ; Do not draw plot<br>  res2@gsnFrame            = False       ; Do not advance frome<br>  res2@cnLevelSelectionMode = "ExplicitLevels" ; set explicit cnlev<br>  res2@cnLevels   = (/.95/)    ; only have 1 contour level<br>  res2@cnInfoLabelOn       = False<br>  res2@cnLinesOn           = False       ; do not draw contour lines<br>  res2@cnLineLabelsOn      = False       ; do not draw contour labels<br>  res2@cnFillScaleF        = 0.6         ; add extra density<br>                              <wbr>           ; add cyclic point<br>  ;res@gsnAddCyclic             <wbr>   = True              ; add cyclic point<br><br>  plot2   = gsn_csm_contour(wks,gsn_add_<wbr>cyclic_point(probt(:,:)), res2) <br>  opt = True                    ; set up parameters for pattern fill<br>  opt@gsnShadeFillType = "pattern"  ; specify pattern fill<br>  opt@gsnShadeLow      = 17         ; stipple pattern<br>  plot2   = gsn_contour_shade(plot2, 0.95, 3., opt) ; stipple all areas < 95 contour                       <wbr>        <br>  overlay (plot, plot2)<br><br>  draw (plot)<br>  frame(wks)<br><br>;=============================<wbr>==============================<wbr>==========<br>;T2diff contains the temperature difference, probt contains the ttest<br>;values. <br>;=============================<wbr>==============================<wbr>==========<br><br><br><br><br><br><br>On Jan 17, 2018 9:36:03 PM, Adam Phillips wrote:
<br><blockquote class="m_-5392367849868451064felamimail-body-blockquote"><div dir="ltr">Hi Sri,<div>I think the issue is that you are letting NCL create the contour levels (for plot2), as you are setting <span style="font-size:12.8px">res2@<wbr>cnLevelSelectionMode = "ExplicitLevels" but you are </span>not setting res2@cnLevels. </div><div><div>gsn_contour_shade uses the existing contour levels to modify the plot, it does not add them itself. I would suggest doing this:</div></div><div><br></div><div>  stat_dispersion(probt,True)   ; Make sure your data has values less than  or equal to .05 that can be plotted</div><div>                                            ; <a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/stat_dispersion.shtml" target="_blank">https://www.ncl.ucar.edu/<wbr>Document/Functions/<wbr>Contributed/stat_dispersion.<wbr>shtml</a></div><div><br></div><div><span style="font-size:12.8px">  res2 = True                          </span><span style="font-size:12.8px"><wbr>  ; res2 probability plots</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@gsnDraw             = False       ; Do not draw plot</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@gsnFrame            = False       ; Do not advance frome</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@cnLevelSelectionMode = "ExplicitLevels" ; set explicit cnlev</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@cnLevels   = (/.05/)    ; only have 1 contour level</span><br style="font-size:12.8px"><span style="font-size:12.8px">  ;res2@cnFillPatterns = (/-1,17/) ; don't fill <0.95, stipple >=0.95</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res@cnFillOn = True</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@cnInfoLabelOn       = False</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@cnLinesOn           = False       ; do not draw contour lines</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@cnLineLabelsOn      = False       ; do not draw contour labels</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@cnFillScaleF        = 0.6         ; add extra density</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">  plot2 = gsn_csm_contour(wks,probt,</span><span style="font-size:12.8px">res2<wbr>)                         </span><span style="font-size:12.8px">    <wbr>        ; add cyclic point</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">  opt = True                    ; set up parameters for pattern fill</span><br style="font-size:12.8px"><span style="font-size:12.8px">  opt@gsnShadeFillType = "pattern"  ; specify pattern fill</span><br style="font-size:12.8px"><span style="font-size:12.8px">  opt@gsnShadeLow      = 17         ; stipple pattern</span><br style="font-size:12.8px"><span style="font-size:12.8px">  plot2   = gsn_contour_shade(plot2, 0.05, 3., opt) ; stipple all areas <= 0.05 contour</span><br style="font-size:12.8px"><span style="font-size:12.8px">  overlay (plot, plot2)</span><br style="font-size:12.8px"></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">or, more simply, do not even use gsn_contour_shade:</span></div><div><div>stat_dispersion(probt,True)   ; Make sure your data has values less than  or equal to .05 that can be plotted</div><div>                                            ; <a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/stat_dispersion.shtml" target="_blank">https://www.ncl.ucar.edu/<wbr>Document/Functions/<wbr>Contributed/stat_dispersion.<wbr>shtml</a></div></div><div><span style="font-size:12.8px">  res2 = True                          </span><span style="font-size:12.8px"><wbr>  ; res2 probability plots</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@gsnDraw             = False       ; Do not draw plot</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@gsnFrame            = False       ; Do not advance frome</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@cnLevelSelectionMode = "ExplicitLevels" ; set explicit cnlev</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@cnLevels   = (/.05/)    ; only have 1 contour level</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@cnFillPatterns = (/17,-1/) ; don't fill <0.95, stipple >=0.95</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res@cnFillOn = True</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@cnInfoLabelOn       = False</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@cnLinesOn           = False       ; do not draw contour lines</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@cnLineLabelsOn      = False       ; do not draw contour labels</span><br style="font-size:12.8px"><span style="font-size:12.8px">  res2@cnFillScaleF        = 0.6         ; add extra density</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">  plot2 = gsn_csm_contour(wks,probt,</span><span style="font-size:12.8px">res2<wbr>)                         </span><span style="font-size:12.8px">    <wbr>        ; add cyclic point</span><br style="font-size:12.8px"></div><div><span style="font-size:12.8px">  </span><span style="font-size:12.8px">overlay (plot, plot2)</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Hope that helps. If you have any further questions please respond to the ncl-talk email list.</span></div><div><span style="font-size:12.8px">Adam</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 17, 2018 at 1:18 PM, Sri Nandini via ncl-talk <span dir="ltr"><<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>></span> wrote:<br><blockquote class="m_-5392367849868451064felamimail-body-blockquote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hello<br><br>I am trying to plot ttest values overlay onto the T2m differences, but it is not being plotted nor shaded region according to 95%confidence limits with ttest.<br>Below is the script, i would be grateful if someone could let me know of my omission or deletion in the resources plotting attributes.<br><br>;Use NCL's named dimensions to reorder in time.<br>;Calculate the temporal means and variances using the dim_avg and dim_variance functions.<br>;Specify a critical significance level to test the lag-one auto-correlation coefficient and determine the (temporal) number of equivalent sample sizes in each grid point using equiv_sample_size.<br>;Specify a critical significance level for the ttest and test if the means are different at each grid point. <br>; This file still has to be loaded manually<br>load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/shea_util.ncl"<br><br> yrStrt = 0000<br> yrLast = 0100<br>; ==============================<wbr>==============================<wbr>==<br>; Open the file: Read only the user specified period <br>; ==============================<wbr>==============================<wbr>==<br>f= addfile("T2M_C.nc", "r") ;Model Control<br>TIME   = f->time<br>  YYYY   = cd_calendar(TIME,-1)/100      <wbr>           ; entire file<br>  iYYYY  = ind(YYYY.ge.yrStrt .and. YYYY.le.yrLast)<br>T41    = f->TREFHT(iYYYY,:,:)<br>printVarSummary(T41)          <wbr>                      ; (time, lat,lon)<br>T4    = lonFlip(T41)<br>printVarSummary(T4)           <wbr>                     ; (time, lat,lon)<br>T4@_FillValue = -9.96921e+36  <br>aveX = dim_avg_n_Wrap(T4, 0)                   ;; average over the 0th dim<br>printVarSummary(aveX)         <wbr>                       ; (lat,lon) <br>varX = dim_variance_n_Wrap(T4,0)     <wbr>          ; compute variance<br>printVarSummary(varX)         <wbr>                       ; (lat,lon) <br>;=============================<wbr>==============================<wbr>===================<br><br>f2= addfile("T2M_CC.nc", "r") ;Current Caspian<br>TIME2  = f2->time<br>  YYYY2   = cd_calendar(TIME2,-1)/100     <wbr>            ; entire file<br>  iYYYY2  = ind(YYYY2.ge.yrStrt .and. YYYY2.le.yrLast)<br>air22   = f2->TREFHT(iYYYY2,:,:)<br>air2    = lonFlip(air22)<br>printVarSummary(air2)         <wbr>                       ; (time, lat,lon)<br>air2@_FillValue = -9.96921e+36                  <wbr>            <br>aveY = dim_avg_n_Wrap(air2,0)  ; average over the 0th dim<br>printVarSummary(aveY)         <wbr>                       ; (lat,lon) <br>varY = dim_variance_n_Wrap(air2,0) ; compute variance<br>printVarSummary(varY)         <wbr>                       ; (lat,lon) <br>;=============================<wbr>==============================<wbr>=====================<br>;Use "ttest" to compute the probabilities<br>;=============================<wbr>==============================<wbr>======================<br><br>  sigr = 0.05                        ; critical sig lvl for r<br><br> xEqv = new(dimsizes(varY),typeof(<wbr>varY),varY@_FillValue)<br>printVarSummary(xEqv)         <wbr>                      ; (lat,lon) <br>  xEqv = equiv_sample_size (T4(lat|:,lon|:,time|:), sigr,0)   <br> copy_VarMeta(varY,xEqv)<br>printVarSummary(xEqv)         <wbr>                      ; (lat,lon) <br><br> yEqv = new(dimsizes(varY),typeof(<wbr>varY),varY@_FillValue)<br>printVarSummary(yEqv)         <wbr>                       ; (lat,lon) <br>  yEqv = equiv_sample_size (air2(lat|:,lon|:,time|:), sigr,0)<br>copy_VarMeta(varY,yEqv)<br>printVarSummary(yEqv)         <wbr>                       ; (lat,lon) <br>                   <br>;=============================<wbr>==============================<wbr>=======================<br> probt = new(dimsizes(varY),typeof(<wbr>varY),varY@_FillValue)<br><br> probt = ttest(aveY,varY,xEqv,aveX,<wbr>varX,yEqv,True,False) ; values are between 0 and 1<br><br>;probt = 100.*(1. -ttest(aveY,varY,xEqv,aveX,<wbr>varX,yEqv,True,False)) ; all areas whose value > 95 are significant<br>printVarSummary(probt)        <wbr>        ; (lat,lon) <br>copy_VarMeta(varY,probt)<br>printVarSummary(probt)        <wbr>        ; (lat,lon) <br>print(probt)                   ;check to make sure values are between 0 and 1.<br>;=============================<wbr>==============================<wbr>=<br>;calculate the T2M difference <br>;=============================<wbr>==============================<wbr>= <br> T2diff = new(dimsizes(aveY),typeof(<wbr>aveY),aveY@_FillValue)<br>printVarSummary(T2diff)       <wbr>                          <br>copy_VarMeta(aveY,T2diff)<br>printVarSummary(T2diff)       <wbr>                          <br>T2diff=aveY-aveX<br>   printVarSummary(T2diff)       <wbr>                         ; (lat,lon) <br>;=============================<wbr>==============================<wbr>=========<br>;Here is a section of my code that draws a color fill plot, and then<br>;overlays contours of statistical significance.<br>;=============================<wbr>==============================<wbr>=========<br>   wks = gsn_open_wks("pdf","T2M_ttest"<wbr>)<br>   gsn_define_colormap(wks,"<wbr>BlWhRe")<br><br>  res = True<br>  res@cnFillOn             = True                ; turn on color<br>  res@gsnSpreadColors      = True                ; use full colormap<br><br>  res@cnLinesOn            = False               ; turn off contour lines<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.2            ; set contour spacing<br><br>  res@gsnDraw              = False           ; Do not draw plot<br>  res@gsnFrame             = False           ; Do not advance frome<br><br>  res@tiMainString         = "T2M Difference: 50yrs overlay with ttest"<br>  res@gsnCenterString      = "5% stippled"<br>  res@gsnLeftString        = "K"<br><br>   res@cnRasterModeOn            <wbr>  = True              ; Raster mode shows grid cells<br>   plot = gsn_csm_contour_map_ce(wks,<wbr>T2diff,res)  <br>   plot = ZeroNegDashLineContour (plot)<br><br>  res2 = True                          <wbr>  ; res2 probability plots<br>  res2@gsnDraw             = False       ; Do not draw plot<br>  res2@gsnFrame            = False       ; Do not advance frome<br>  res2@cnLevelSelectionMode = "ExplicitLevels" ; set explicit cnlev<br>  ;res2@cnLevels   = (/.95/)    ; only have 1 contour level<br>  ;res2@cnFillPatterns = (/-1,17/) ; don't fill <0.95, stipple >=0.95<br>  res@cnFillOn = False<br><br>  res2@cnInfoLabelOn       = False<br>  res2@cnLinesOn           = False       ; do not draw contour lines<br>  res2@cnLineLabelsOn      = False       ; do not draw contour labels<br>  res2@cnFillScaleF        = 0.6         ; add extra density<br><br>  plot2 = gsn_csm_contour(wks,probt,<wbr>res2)                         <wbr>            ; add cyclic point<br><br>  opt = True                    ; set up parameters for pattern fill<br>  opt@gsnShadeFillType = "pattern"  ; specify pattern fill<br>  opt@gsnShadeLow      = 17         ; stipple pattern<br>  plot2   = gsn_contour_shade(plot2, 0.091, 3., opt) ; stipple all areas < 0.09 contour<br>  overlay (plot, plot2)<br><br>  draw (plot)<br>  frame(wks)<br></div>
<br>______________________________<wbr>_________________<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" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br><br></blockquote></div><br><br style="clear:both"><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div class="m_-5392367849868451064gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><span style="color:#888888">Adam Phillips <br></span></span></div><span><span style="color:#888888">Associate Scientist,  </span></span><span><span style="color:#888888">Climate and Global Dynamics Laboratory, NCAR<br></span></span></div></div><div><span><span style="color:#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/<wbr>asphilli/</a>   </span></span><span><span style="color:#888888"><a href="tel:(303)%20497-1726" value="+13034971726" target="_blank">303-497-1726</a> </span></span></div><span><span style="color:#888888"></span></span><div><div><span><span style="color:#888888"><br></span></span><div><span><span style="color:#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></span></span></div></div></div></div></div></div></div></div></div></div></div>
</font></span></div>
</blockquote><br></div>
<br>______________________________<wbr>_________________<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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_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>
</div>