<div dir="ltr"><div><div><div><div>Hi,<br><br></div>What do you mean by ".... lat lon dimensions don't show up"? What do you get instead?<br><br></div>I think the reason for the warnings is that you are not plotting on top of a map, and thus those resources don't apply. Perhaps you want to plot using gsn_csm_contour_map() ?<br><br></div>HTH...<br></div>Rick<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 20, 2016 at 5:17 PM, Ipshita Majhi <span dir="ltr"><<a href="mailto:ipmajhi@alaska.edu" target="_blank">ipmajhi@alaska.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear NCL,<div><br></div><div>I am trying to plot SWE data and the lat lon dimensions don't show up.</div><div>I would be grateful if you could guide me on this</div><div>******************************<wbr>***************************</div><div><div>;*****************************<wbr>***************</div><div>;This is reading in Snow water equivalent which goes from 0 to 250 mm</div><div>; from 1982 to 2012</div><div>;*****************************<wbr>***************</div><div><br></div><div>dira = "/Users/ipshita/Desktop/<wbr>GlobsnowV2.0/version02/"</div><div>dirb = dira + "2011/"</div><div>;dira = "./"</div><div>;dirb = "./"</div><div>a = addfile(dira+"<a href="http://monthly_82_13.nc" target="_blank">monthly_82_13.nc</a><wbr>","r")</div><div>b = addfile(dirb+"<a href="http://GlobSnow_SWE_L3A_20110101_v2.0.nc" target="_blank">GlobSnow_SWE_<wbr>L3A_20110101_v2.0.nc</a>","r")</div><div><br></div><div>swe = a->swe</div><div>time = a->time</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>;*****************************<wbr>***************</div><div>;This is to extract 1982-2012 of swe data</div><div>;*****************************<wbr>***************</div><div>swe_82_12=swe(0:371,:,:)</div><div><br></div><div>;*****************************<wbr>***************</div><div><br></div><div>;*****************************<wbr>***************</div><div>;This is to read in All India Rainfall</div><div>;For March , March , June</div><div>;*****************************<wbr>***************</div><div><br></div><div>MJ_1982_2014=asciiread("~/<wbr>Documents/NCL_files/SST/<wbr>Monthly/MJ.txt",(/34,1/),"<wbr>float")</div><div>MJ_1982_2012=MJ_1982_2014(0:<wbr>30,0)</div><div><br></div><div>print(dimsizes(MJ_1982_2012))</div><div><br></div><div>;*****************************<wbr>**************</div><div>;Extracting monthly data for sce</div><div>;*****************************<wbr>**************</div><div><br></div><div>March_swe = new((/31,721,721/),float)</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>;=============================<wbr>====================</div><div>March_swe@_FillValue = -9.99e+08</div><div>;*****************************<wbr>*****************</div><div><br></div><div>March_dt = dtrend_msg(March_swe&time,<wbr>March_swe(lat|:,lon|:,time|:),<wbr>True,False)</div><div><br></div><div>printMinMax(March_dt,False)</div><div><br></div><div>;*****************************<wbr>***********</div><div>;Calculating Correlation</div><div>;*****************************<wbr>**********</div><div>x1d=ndtooned(MJ_1982_2012)</div><div><br></div><div>corr_March=escorc(March_dt,<wbr>x1d)</div><div>corr_March!0="lat" </div><div>corr_March!1="lon" </div><div>corr_March&lat=lat</div><div>corr_March&lon=lon</div><div><br></div><div>copy_VarCoords(swe,corr_March)<br></div><div><br></div><div><br></div><div>;*****************************<wbr>*****************</div><div><br></div><div>;*****************************<wbr>*******************</div><div>; create plot</div><div>;*****************************<wbr>*******************</div><div> wks = gsn_open_wks("x11","SWE_March_<wbr>MJ_correlation_significance") ; </div><div> </div><div> res = True ; Plot modes desired.</div><div> res@gsnMaximize = True ; Maximize plot</div><div> res@cnFillOn = True ; color plot desired</div><div> res@cnFillPalette = "BrownBlue12"</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> </div><div> </div><div>;*****************************<wbr>**************</div><div>; georeferencing: plot on polar projection</div><div>;*****************************<wbr>**************</div><div> res@trGridType = "TriangularMesh" ; allow missing coordinates</div><div> res@gsnAddCyclic = False</div><div> res@cnFillMode = "RasterFill"</div><div><br></div><div> res@gsnPolar = "NH" ; specify the hemisphere</div><div> res@mpMinLatF = 35</div><div> </div><div> res@tiMainString = "March SWE and MJ correlation"</div><div><br></div><div> plot = gsn_csm_contour(wks,corr_<wbr>March,res)</div><div> </div><div>;*****************************<wbr>**************************</div><div><br></div><div><div>warning:gsnPolar is not a valid resource in SWE_March_MJ_correlation_<wbr>significance_contour at this time</div><div>warning:mpMinLatF is not a valid resource in SWE_March_MJ_correlation_<wbr>significance_contour at this time</div><div><br></div></div><div><br></div><div class="m_-8777661468870570439gmail_signature"><div dir="ltr"><br></div></div>
</div></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></div>