<div dir="ltr"><div>Hi,</div><div><br></div><div>I'm not sure what you find wrong with your plot -- I'm not an atmospheric scientist, so I don't know by just looking.</div><div><br></div><div>However, you have these lines for plotting the markers:</div><div><br></div><div><div> llat = probt&lat</div><div> llon = probt&lon</div><div> plot2=gsn_add_polymarker(wks,plot1,llon,llat,res3)</div><div><br></div><div>I don't see where "probt" is defined anywhere, and I would expect that this should give you an error. Did you mean simply "prob&lat", "prob%lon"?</div><div><br></div><div>Rick<br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 26, 2019 at 4:43 PM sunmin park <<a href="mailto:mireiyue@gmail.com">mireiyue@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">Dear NCL users<div dir="ltr" class="gmail-m_642451554885558405gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"></div></div></div></div></div></div></div></div><div><br></div><div>I try to plot probability>0.95% on a map</div><div>Used regcoef to get trend and betainc to get probability. Attached the figure from the following script. </div><div><br></div><div>I do appreciate any help!</div><div><br></div><div>Best,</div><div>Sun-</div><div>************************************</div><div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"</div><div><br></div><div>begin</div><div><br></div><div>diri = "/Users/spark/03_Drought/Season_data/04_TOTALprecipitaton_season_mmperday_trend_21cen/"</div><div>fili = "PRE_MAMmean4Dmmperday_21CEN.nc"</div><div>filenc = addfile (diri+fili+".nc", "r")</div><div>varname = "pre"</div><div>pme = filenc->$varname$</div><div>time = filenc->time</div><div><br></div><div>pmee = dim_avg_n_Wrap(pme,0)</div><div><br></div><div>rc = regCoef(time,pmee(lat|:,lon|:,time|:))</div><div>rc@long_name = "regression coefficient"</div><div>rc@units = "mm/day/century"</div><div>copy_VarCoords(pmee(0,:,:),rc)</div><div><br></div><div>rcc = rc*100</div><div>copy_VarCoords(rc,rcc)</div><div><br></div><div>tval = onedtond(rc@tval , dimsizes(rc))</div><div>df = onedtond(rc@nptxy-2, dimsizes(rc)) </div><div>df@_FillValue=-9999</div><div>df = where(df.le.0,df@_FillValue,df)</div><div><br></div><div>b=tval</div><div>b=0.5</div><div>prob = betainc(df/(df+tval^2),df/2.0,b)</div><div>prob@long_name = "probability"</div><div>copy_VarCoords(rcc,prob)</div><div><br></div><div>do i=0, dimsizes(lat)-1<br></div><div> do j =0, dimsizes(lon)-1</div><div> if(prob(i,j) .ltt. 0.05) then</div><div> print("lat "+lat(i)+" lon "+lon(j))</div><div> end if</div><div> end do</div><div>end do</div></div><div><br></div><div><div> wks = gsn_open_wks("eps","PRE_US_trend_MAM")</div><div> gsn_define_colormap(wks,"BlRe") ;WhiteYellowOrangeRed") ;WhiteBlue") ; choose colormap</div><div><br></div><div> res = True ; plot mods desired</div><div> res@gsnDraw = False ; don't draw yet</div><div> res@gsnFrame = False ; don't advance frame yet</div><div> res@gsnAddCyclic = False</div><div><br></div><div> res@cnFillOn = True ; turn on color</div><div> res@gsnSpreadColors = True ; use full color map</div><div> res@cnLinesOn = False ; no contour lines</div><div> res@cnLineLabelsOn = False ; no line labels</div><div><br></div><div> res@mpMaxLatF = 60 ; choose subregion</div><div> res@mpMinLatF = 20</div><div> res@mpMaxLonF = -75</div><div> res@mpMinLonF = -150</div><div><br></div><div> res@cnLevelSelectionMode = "ManualLevels"</div><div> res@cnMinLevelValF = -0.004 ; min level</div><div> res@cnMaxLevelValF = 0.004 ; max level</div><div> res@cnLevelSpacingF = 0.0001 ; interval</div><div> res@tmXBLabelFontHeightF = 0.014 ; adjust some font heights</div><div> res@tmYLLabelFontHeightF = 0.014</div><div> res@tiMainFontHeightF = 0.022</div><div> res@txFontHeightF = 0.017</div><div><br></div><div> res@lbLabelBarOn = False </div><div> res@mpOutlineBoundarySets = "GeophysicalAndUSStates"</div><div> res@mpGeophysicalLineThicknessF = 1.0 </div><div> plot1 = gsn_csm_contour_map_ce(wks,rcc,res)</div><div><br></div><div> res3 = True</div><div> res3@cnInfoLabelOn = False</div><div> res3@cnLinesOn = False</div><div> res3@cnLineLabelsOn = False</div><div> res3@cnFillDotSizeF = 0.004</div><div> res3@cnLevelSelectionMode = "ManualLevels"</div><div> res3@cnMinLevelValF = 0.00</div><div> res3@cnMaxLevelValF = 1.05</div><div> res3@cnLevelSpacingF = 0.05</div><div> llat = probt&lat</div><div> llon = probt&lon</div><div> plot2=gsn_add_polymarker(wks,plot1,llon,llat,res3)</div><div><br></div><div> ppres = True</div><div> ppres@gsnPanelLabelBar = True ; common label bar</div><div> gsn_panel(wks,plot1,(/1,1/),ppres)</div><div><br></div><div> delete(wks)</div><div>end</div></div></div></div></div>
_______________________________________________<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" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>