Re: lag composites

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Fri Jul 02 2010 - 10:32:59 MDT

Not enough info.

     x = f->X ; (time,lat,lon)
     ymd = f->date ; (time) ... units=>YYYYMMDD

say, 'time' is (say) 'hours/days since .."

then, ideally, you could

     x&time = ymd
     printVarSummary(x) ; note the 'time' coordinate values

This would allow u to access a specific YYYYMMDD via
coordinate subscripting

     q = x({20030412},:,:)

If the +/-5 were in the same month, then

     q = x({20030412-5:20030412+5},:,:)

However, spanning months would not be possible

Say, the oriinal units were 'days since ..'

     dayLag = 5
     centerDate = 20030412
     ntStrt = ind(ymd.eq.(centerDate-dayLag))
     ntLast = ind(ymd.eq.(centerDate+dayLag))

Good luck

On 7/2/10 9:04 AM, Straub, Katherine wrote:
> I have a list of specific dates (YYYYMMDD) I’m using in a composite. I
> can make the composite for this list just fine, but am wondering if
> there is an easy way to extend the composite backward and forward in
> time, like from day -5 to day +5, while still compositing around actual
> dates rather than indices.
>
> Thanks,
>
> Kathy Straub
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Jul 2 10:33:03 2010

This archive was generated by hypermail 2.1.8 : Fri Jul 09 2010 - 16:06:22 MDT