<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div>Untested   . make adjustments for 3D array<br><br></div><div>Recommendation ... if used often ... make into a function<br><br>===<br></div><div><br>xmo(time,lev,lat,lon)   ; monthly series of some variable<br><br></div>dim_xmo = dimsizes(xmo)<br></div>ntim         = dim_xmo(0)<br>klev         = dim_xmo(1)<br>nlat         = dim_xmo(2)<br>mlon        = dim_xmo(3)<br><br></div><div>N             = ntim/12<br></div>xMJ = new( (/ N, klev,nlat,mlon/), typeof(xmo), xmo@_FillValue)<br><br></div>do nt=4,ntim-1,12   ; NCL uses 0-based indexing;nt=4 --&gt; May<br></div>     xMJ(nt) = 0.5*(x(nt,:,:,:) +  x(nt+1,:,:,:))<br></div>end do<br><br></div>xMJ@long_name = &quot;May-June: &quot;+xmo@long_name<br></div>xMJ@units = xmo@units<br><br></div>copy_VarCoords(xmo(0,:,:,:), xMJ(0,:,:,:))   ; spatial dimension information<br></div>printVarSummary(xMJ)<br><br></div>xMJ!0 = &quot;time&quot;             ; add temporal information<br></div>xMJ&amp;time = xmo&amp;time(4::12)    ; use &#39;May&#39; time (arbitrary)<br>printVarSummary(xMJ)<br><div><div><br></div><div>HTH<br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 23, 2016 at 1:26 PM, Lee, Ji-Woo <span dir="ltr">&lt;<a href="mailto:lee1043@llnl.gov" target="_blank">lee1043@llnl.gov</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>Hello users,</div>
<span>
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div><br>
</div>
<div>I am trying to get seasonal mean time series from monthly data for MJ (May-June). It looks month_to_season function is only available for predefined three month seasons like JJA, DJF, etc. Is there any trick that I can subtract custom season like MJ mean
 time series easily?</div>
<div><br>
</div>
<div>Thank you very much,</div>
<div>Jiwoo</div>
</div>
</span>
</div>

<br>_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>