<p dir="ltr"><a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/latGauWgt.shtml">http://www.ncl.ucar.edu/Document/Functions/Contributed/latGauWgt.shtml</a><br>
First result from googling <br>
"ncl Gaussian weights"</p>
<p dir="ltr">2nd. Unless specified keep replies to the list. </p>
<p dir="ltr">Gd luck. <br>
</p>
<div class="gmail_quote">On 8 Sep 2015 10:36 p.m., "afwande juliet" <<a href="mailto:afwandej965@gmail.com">afwandej965@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>dear Allan thanks alot for pointing this out for me. Actually the sst and CMAP data all have 3D(time,lat,lon) and I want to plot the two in timeseries anomalies. So that I have years running from 1978-2008, Y axiis I plot the anomalies something like this. This example script used gausian weights(gw) and yet my data has no gausian weights. How do I handle that.</div><div><br></div><div><a href="http://www.ncl.ucar.edu/Applications/Scripts/xy_18.ncl" target="_blank">http://www.ncl.ucar.edu/Applications/Scripts/xy_18.ncl</a></div><div><br></div><div><br></div><div><img width="442" height="298" style="margin-right:0px" src="http://www.ncl.ucar.edu/Applications/Images/xy_18_lg.png"></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 8, 2015 at 10:48 PM, Alan Brammer <span dir="ltr"><<a href="mailto:abrammer@albany.edu" target="_blank">abrammer@albany.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"><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"> sst(time.lat,lon)</span><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><strong style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"> sst(ind_warm)</strong><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><br></span></div><div class="gmail_default"><font color="#000000">You're defining a 3d variable with only 1 dimension. What do you want to happen with the spatial dimensions ?</font></div><div class="gmail_default"><font color="#000000"><br></font></div><div class="gmail_default"><font color="#000000">You need to reference the lat and the lon dimension in some form. </font></div><div class="gmail_default"><font color="#000000">sst(ind_warm, :, :) ;; select the whole grid. </font></div><div class="gmail_default"><font color="#000000"><br></font></div><div class="gmail_default"><font color="#000000">Now y is still 3 dimensions. Which you're not going to be able to plot in any meaningful way on an xy plot. </font></div><div class="gmail_default"><span style="color:rgb(0,0,0)">y = dim_avg_n_Wrap( sst(ind_warm, :, :) , (/1,2/) ) ;; Now you have a global average for each "warm year"</span><font color="#000000"><br></font></div><div class="gmail_default"><span style="color:rgb(0,0,0)"><br></span></div><div class="gmail_default"><span style="color:rgb(0,0,0)">Good luck. </span></div><div class="gmail_default"><span style="color:rgb(0,0,0)"><br></span></div><div class="gmail_default"><span style="color:rgb(0,0,0)"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Tue, Sep 8, 2015 at 9:42 AM, afwande juliet <span dir="ltr"><<a href="mailto:afwandej965@gmail.com" target="_blank">afwandej965@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div><div><div dir="ltr"><div>Hello</div><div><br></div><div>I am doing timeseries for Warm years for sst and CMAP data.</div><div>how do i make the left and right dimension be same especilly here........ <strong> y = sst(ind_warm</strong>).........see it in main script.</div><div>it complains about left and right dimension not same. my data is sst(time.lat,lon) and am plotting only warm years</div><div> thanks</div><div><br></div><div>below is script</div><div><br></div><div>begin<br>;************************************************<br>; Read in data<br>;************************************************<br> f = addfile ("<a href="http://sst.mnmean.nc" target="_blank">sst.mnmean.nc</a>","r")<br> time = f->time ; access date<br> sst = (f->sst)*0.1 ; scale sst anomalies <br>;************************************************<br>; extract warm years from data<br>;************************************************<br> warm_yrs = (/1951,1953,1957,1963,1965,1969,1972,1976,1982,1987,1991/)<br> warm_time_yrs = warm_yrs * 100 + 01 ; match format of date array<br> nwarm = dimsizes(warm_yrs) ; how many warm years<br> ind_warm = new(nwarm,integer) ; create array </div><div> do n=0,nwarm-1 <br> ind_warm(n) = ind(warm_time_yrs(n).eq.time)<br> end do<br> <strong> y = sst(ind_warm)</strong><br> x = ispan(0,nwarm-1,1) <br>;************************************************<br>; create plot<br>;************************************************<br> wks = gsn_open_wks ("x11","xy") ; open ps file</div><div> res = True ; plot mods desired<br> <br> res@tmXBMode = "Explicit" ; explicit labels<br> res@tmXBValues = x ; location of labels <br> res@tmXBLabels = warm_yrs ; labels themselves<br> res@tmLabelAutoStride = True ; nice stride on labels</div><div> res@tiMainString = "Explicit axis labeling"; title</div><div> plot = gsn_csm_xy(wks,x,y,res) <br>end<br></div></div>
<br></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>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</blockquote></div>