<div dir="ltr">Dear NCL,<div><br></div><div>I am plotting correlation and significance in the same plot. I am not getting the dots , I am getting a contour instead and I am not sure where I am making a mistake. If someone could guide me then I will be grateful.Listed below is my code.</div><div><br></div><div><br></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>;*******************************************</div><div><br></div><div>;*******************************************</div><div>MJ_1982_2014=asciiread("/Volumes/Ipshita_extra/Documents/NCL_files/SST/Monthly/MJ.txt",(/33,1/),"float")</div><div>MJ_1982_2012=MJ_1982_2014(0:31,0)</div><div><br></div><div>print(dimsizes(MJ_1982_2012))</div><div><br></div><div>;*************************************************</div><div>;Reading in SWE data</div><div>;*************************************************</div><div>a = addfile("<a href="http://monthly_82_13.nc">monthly_82_13.nc</a>","r")</div><div>b = addfile("<a href="http://GlobSnow_SWE_L3A_20130507_v2.0.nc">GlobSnow_SWE_L3A_20130507_v2.0.nc</a>","r")</div><div><br></div><div>swe = a->swe</div><div>time = a->time</div><div><br></div><div>lat = b->lat</div><div>lon = b->lon</div><div>swe@lat2d = lat</div><div>swe@lon2d = lon</div><div><br></div><div>print(dimsizes(lat))</div><div>print(dimsizes(lon))</div><div><br></div><div>swe_FillValue=-9.99e+08</div><div><br></div><div>utc_date = cd_calendar(time, 0)</div><div>year=utc_date(:,0)</div><div>month=utc_date(:,1)</div><div><br></div><div>;********************************************</div><div>;This is to extract 1982-2012 of swe data</div><div>;********************************************</div><div>swe_82_12=swe(0:371,:,:)</div><div><br></div><div>;********************************************</div><div>;*******************************************</div><div>;Extracting monthly data for sce</div><div>;*******************************************</div><div><br></div><div>March_swe = swe(0:31,:,:)</div><div><br></div><div>March_swe@_FillValue = -9.99e+08</div><div><br></div><div>do nyr=0,371,12</div><div><br></div><div>March_swe(nyr/12,:,:) =swe_82_12(nyr+2,:,:)</div><div><br></div><div>end do</div><div>;=================================================</div><div>March_swe@_FillValue = -9.99e+08</div><div>;**********************************************</div><div><br></div><div>March_dt = dtrend_msg(March_swe&time,March_swe(lat|:,lon|:,time|:),True,False)</div><div><br></div><div>printMinMax(March_dt,False)</div><div>MJ_dt=dtrend(MJ_1982_2012,False)</div><div>;****************************************</div><div>;Calculating Correlation</div><div>;***************************************</div><div><br></div><div>corr_March=escorc(March_dt,MJ_dt)</div><div><br></div><div>copy_VarCoords(swe(0,:,:),corr_March) </div><div>copy_VarAtts(swe(0,:,:),corr_March)</div><div><br></div><div>;**********************************************</div><div>;Calculating significance</div><div>;**********************************************</div><div><br></div><div>prob_March=rtest(corr_March,31,0)</div><div><br></div><div>sig_March =100*(1-prob_March)</div><div><br></div><div> copy_VarCoords(swe(0,:,:),sig_March) </div><div> copy_VarAtts(swe(0,:,:),sig_March)</div><div><br></div><div> sig_March = mask(sig_March, sig_March.ge.100,False) </div><div> sig_March = mask(sig_March, sig_March.lt.90,False)</div><div><br></div><div><br></div><div>;************************************************</div><div>; create plot</div><div>;************************************************</div><div> </div><div> wks = gsn_open_wks("x11","swe_march_mj_cor_sig") ; </div><div><br></div><div> gsn_define_colormap(wks, "BlueYellowRed") </div><div> </div><div> </div><div> ;************************************************</div><div> res = True ; Plot modes desired.</div><div> res@gsnMaximize = True ; Maximize plot</div><div> res@gsnDraw = False ; don't draw</div><div> res@gsnFrame = False ; don't advance frame </div><div> res@cnFillOn = True ; color plot desired</div><div> res@cnLinesOn = False ; turn off contour lines</div><div> res@pmLabelBarWidthF = 0.9 ; make wider</div><div> res@pmLabelBarHeightF = 0.1 ; default is taller</div><div> res@lbLabelFontHeightF = .018 ; default is HUGE</div><div> res@lbLabelBarOn =True ; turn off individual cb's</div><div><br></div><div> </div><div>;*******************************************</div><div>; georeferencing: plot on polar projection</div><div>;*******************************************</div><div> res@trGridType = "TriangularMesh" ; allow missing coordinates</div><div> res@gsnAddCyclic = False</div><div> res@cnFillMode = "RasterFill"</div><div> res@cnInfoLabelOn = False ; turn off info label</div><div> res@gsnPolar = "NH" ; specify the hemisphere</div><div> res@mpMinLatF = 40</div><div> res@mpMaxLatF = 70</div><div> res@mpMinLonF = -30</div><div> res@mpMinLonF = -180</div><div> plot = gsn_csm_contour_map_polar(wks,corr_March, res) </div><div> ;*********************************************</div><div> </div><div> res2=True</div><div> res2@gsnDraw = False ; Do not draw plot</div><div> res2@gsnFrame = False ; Do not advance frome </div><div> res2@cnFillOn = True</div><div> res2@cnMonoFillColor = True</div><div> res2@cnMonoFillPattern = False</div><div> res2@lbLabelBarOn = False ; turn off label bar</div><div> res2@cnLevelSelectionMode = "ManualLevels" ; manually specify contour levels</div><div> res2@cnMinLevelValF = 90 ; min level</div><div> res2@cnMaxLevelValF = 100 ; max level</div><div> res2@cnLevelSpacingF = 1 ; contour interval</div><div> res2@gsnSpreadColors = False</div><div> </div><div><br></div><div> plot2=gsn_csm_contour(wks,sig_March, res2) ; contours are at 90,100 </div><div><br></div><div><br></div><div> opt = True</div><div> opt@gsnShadeFillType = "pattern"</div><div> opt@gsnShadeLow = 17 </div><div><br></div><div>plot2=gsn_contour_shade(plot2,-999.,90.,opt) ; </div><div> </div><div> overlay (plot, plot2)</div><div><br></div><div> draw (plot)</div><div> frame(wks) </div><div><br></div><div> </div><div><br></div><div>;=================================================</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>;</div><div><br></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div><div><div><br></div><div><br></div><div>Ipshita Majhi<br></div>PhD Candidate<br></div>University of Alaska , Fairbanks<br></div>Atmospheric Science Department<br></div>(907)978-4220 <a href="mailto:ipmajhi@alaska.edu" target="_blank">ipmajhi@alaska.edu</a><br></div><div dir="ltr"><br></div><div dir="ltr">************************************************************************************************************</div><div dir="ltr"><span style="color:rgb(29,33,41);font-family:Helvetica,Arial,sans-serif;font-size:14px">Happiness comes when we stop complaining about the troubles we have and offer thanks for all the troubles we don't have. Life is a gift!</span><br style="color:rgb(29,33,41);font-family:Helvetica,Arial,sans-serif;font-size:14px"><span style="color:rgb(29,33,41);font-family:Helvetica,Arial,sans-serif;font-size:14px">-Sri Sri</span><br></div><div dir="ltr"><span style="color:rgb(29,33,41);font-family:Helvetica,Arial,sans-serif;font-size:14px">****************************************************************************************************</span></div></div></div></div></div></div></div></div>
</div></div>