[ncl-talk] Plot significant difference only (shaded color map)
S Br
sbr.climate at gmail.com
Wed Jul 31 12:45:46 MDT 2019
Hi Rashed,
I already added but I have sent only the main part of the script.
On Wed, Jul 31, 2019 at 6:50 PM Rashed Mahmood <rashidcomsis at gmail.com>
wrote:
> Try adding following at the end, after overlay:
>
> draw(plot)
> frame(wks)
>
> On Wed, Jul 31, 2019 at 7:57 AM S Br via ncl-talk <ncl-talk at ucar.edu>
> wrote:
>
>> Hello NCL,
>> I am plotting the difference between two files as per the script written
>> below, but I want to display (contour shade) only the value that are
>> significance at 95% level. I am able to stripe the significance difference
>> but can't display the difference that are significant (I want to retain the
>> original color shade of the difference)
>>
>> diffposglob1 = avgposglobst1-avgstctrl
>> probtposglob1 = 100.*(1.
>> -ttest(avgposglobst1,varposglobst1,50,avgstctrl,varctrl,50,True,False)) ;
>> all areas whose value > 95 are significant
>>
>> wks = gsn_open_wks("x11","surtemp_sig_diff")
>> res = True
>> res at gsnDraw = False ; don't draw
>> res at gsnFrame = False ; don't advance frame
>> res at cnFillOn = False ; turn on color
>> res at cnLinesOn = True ; turns off contour lines.
>> res at cnLineLabelsOn = False ; turn off line labels
>> res at cnFillPalette = "temp_diff_18lev" ; set color map
>> res at cnInfoLabelOn = False ; turn off cn info label
>> explanation
>> res at lbLabelBarOn = True ; turn off individual cb's
>> res at cnLevelSelectionMode = "ManualLevels"
>> res at cnMinLevelValF = -1.5
>> res at cnMaxLevelValF = 1.5
>> res at cnLevelSpacingF = 0.3
>> res at tmXBLabelFontHeightF = 0.030 ; resize tick labels
>> res at tmYLLabelFontHeightF = 0.030
>> res at gsnStringFontHeightF = 0.030
>> ;***********************************************************
>> res2 = True ; res2 probability plots
>> res2 at gsnDraw = False ; Do not draw plot
>> res2 at gsnFrame = False ; Do not advance frome
>> res2 at cnInfoLabelOn = False
>> res2 at cnLinesOn = False ; do not draw contour lines
>> res2 at cnLineLabelsOn = False ; do not draw contour labels
>> res2 at cnFillScaleF = 0.3 ; add extra density
>> ; sgres at cnFillDotSizeF = 0.003
>> res2 at cnLevelSelectionMode = "ExplicitLevels" ; set explicit cnlev
>> res2 at cnLevels = (/95./) ; only have 1 contour level
>> res2 at gsnRightString = "" ; Turn off subtitles
>> res2 at gsnLeftString = ""
>> res at gsnAddCyclic = True ; add cyclic point
>> ;***********************************************************
>> opt = True ; set up parameters
>> for pattern fill
>> opt at gsnShadeFillType = "pattern" ; specify pattern
>> fill
>> opt at gsnShadeHigh = 15 ; stipple pattern
>> ; opt at gsnShadeFillScaleF = 5
>> ; opt at gsnShadeDotSizeF = 1 ; make dots larger
>> ;***********************************************************
>> plot = gsn_csm_contour_map(wks,diffposglob1(0,:,:),res)
>> plot2 = gsn_csm_contour(wks,probtposglob1(0,:,:),res2)
>> plot2 = gsn_contour_shade(plot2,-999,95., opt) ; stipple all
>> areas >= 95 contour
>> overlay (plot, plot2)
>> _______________________________________________
>> 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/20190731/ae5bfb79/attachment.html>
More information about the ncl-talk
mailing list