;;; add_bogus_data = True ifile = addfile("tst_diff.nc","r") diff = ifile->diff sig = ifile->sig print(diff&lat) print("===") printVarSummary(diff) printMinMax(diff,0) print("===") printVarSummary(sig) printMinMax(sig,0) ; min=95.0704 max=99.8995 print("===") nsig_pts = num(.not.ismissing(sig)) print("nsig_pts="+nsig_pts) ; nsig_pts=55 print("===") ; sig1d = ndtooned(sig) ; huh = ind(.not.ismissing(sig1d)) ; print(sig1d(huh)) sig = where(ismissing(sig),0,sig) ;print(sig&lat) ; -87.5,-85,...,-2.5,2.5,85,87.5 ;; DIFF = diff ; copy original data ;; SIG = sig wks = gsn_open_wks("png","FUNNY_STIPLE") ;====================== ; ORIGINAL Rashad resources ;===================== res = True res@gsnDraw = False res@gsnFrame = False res@cnFillOn = True res@cnLinesOn = False res@cnLineLabelsOn = False res@mpFillOn = False res@tiMainString = "PLOT_0: Sparse Locally Sig Pts" plot_0 = gsn_csm_contour_map(wks,diff, res) resS = True resS@gsnDraw = False resS@gsnFrame = False resS@cnFillOn = True resS@cnLinesOn = False ; resS@cnMonoFillColor = True resS@cnFillColor ="Black" ; resS@cnMonoFillPattern= False resS@lbLabelBarOn = False resS@cnLevelSelectionMode = "ExplicitLevels" resS@cnLevels = (/ 95. /) ; resS@cnFillPatterns = (/-1, 17/) resS@cnFillColors = (/"transparent","green"/) resS@cnInfoLabelOn = False resS@cnLabelMasking = False resS@gsnAddCyclic = True ; False resS@cnFillMode = "RasterFill" plot_s0 = gsn_csm_contour(wks,sig,resS) ; these two lines no longer needed, but included to show significant grid boxes shaded green overlay(plot_0,plot_s0) sig1d = ndtooned(sig) ; the following isolates points that have values above 95, and stores their lat/lon values for polymarker drawing. npts = dimsizes(ind(sig1d.ge.95)) ; this can likely be done in a more elegant way. finarr_lat = new(npts,typeof(sig&lat)) finarr_lon = new(npts,typeof(sig&lon)) cntr = 0 do gg = 0,dimsizes(sig&lat)-1 do hh = 0,dimsizes(sig&lon)-1 if (sig(gg,hh).ge.95) then val := sig(gg,hh) printVarSummary(val) finarr_lat(cntr) = val@lat finarr_lon(cntr) = val@lon cntr = cntr+1 end if end do end do polyres = True polyres@gsMarkerIndex = 16 ; polymarker style polyres@gsMarkerSizeF = 5. ; polymarker size dum1 = gsn_add_polymarker(wks,plot_0,finarr_lon,finarr_lat,polyres) draw(plot_0) frame(wks)