<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Thanks sir dennis.<div>Will try later.<br><br><div dir="ltr">Sent from my iPhone</div><div dir="ltr"><br><blockquote type="cite">On Aug 9, 2021, at 3:34 AM, Dennis Shea <shea@ucar.edu> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div>Generally, a one-dimensional series [,say,  x(time) ] can be converted to (say) two-dimensions via <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/onedtond.shtml"><b>onedtond</b></a>.</div><div><br></div><div>    ntim  =<b>dimsizes</b>(x)<br></div><div>    nseg = 40</div><div>    nlen  = ntim/nseg<br></div><div>    x2d =<strong> onedtond</strong>(x,(/nseg,nlen/))      <br></div><div><br></div><div>----------</div><div><br></div><div>   ndays = 30+31+31+30         ;  #of days in the JJAS season</div><div>   nyrStrt= 1979</div><div>   nyrLast= 2018</div><div>   nyrs     = nyrLast-nyrStrt+1</div><div>   xseg    = new( (/nyrs,ndays/),  typeof(x), x@_FillValue)</div><div>   do nyr=0,nyrs-1</div><div>        itStrt  =                        ; index for June 1 for each year<br></div><div>        itlast =  itStrt+ndays-1 ; data for current year<br></div><div>        xseg(nyr,:) = x(itStrt:itlast))<br></div><div>   end do<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Aug 8, 2021 at 4:02 AM Lyndz via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</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"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Dear NCL experts,</div><div><br></div><div>I would like to do Example 5 from this link:</div><div><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/specx_anal.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Built-in/specx_anal.shtml</a><br></div><div><br></div><div>I would like to get the mean spectrum of a one dimensional time series.</div><div>The above example requires that the input has the following format</div><div><br></div><div><b>x(nseg,ntim)</b></div><div><b><br></b></div><div>How do I convert my one dimensional data to this format? I would like to plot the JJAS mean spectrum and red noise.</div><div><br></div><div>I am attaching my sample data here. </div><div>This is JJAS daily rainfall anomaly from 1979-2018.</div><div><br></div><div>I'll appreciate any help on this matter.</div><div><br></div><div>Sincerely,</div><div>Lyndz</div></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>
</div></blockquote></div></body></html>