xt1 and xt2 are the desired start and end time for x
yt1 and yt2 are the desired start and end time for y
These are the appropriate 'hours since values'
i = ind(x&time.ge. xt1 .and. x&time.le. xt2)
j = ind(y&time.ge. yt1 .and. y&time.le. yt2)
ni = dimsizes(ni)
iStrt = i(0)
iLast = i(ni-1)
nj = dimsizes(nj)
jStrt = j(0)
jLast = j(ni-1)
x = X(iStrt:iLast,:,:)
y = Y(jStrt:jLast,:,:)
===
A trick: You can also use
x_ymdh = cd_calendar(x&time, -3)
y_ymdh = cd_calendar(y&time, -3)
x&time = x_ymdh
y&time = y_ymdh
the theses are yyyymmddhh
On 07/16/2013 03:53 AM, Ahmad Farsyud wrote:
> Dear NCL,
>
> I have a question regarding time units.
> I'd like to create a composite using two different daily datasets but
> having different time units.
>
> X: hours since *1900*-01-01 00:00:00
> Y: hours since *1958*-01-01 00:00:00
>
> is it a matter if I make a composite analysis using "ind" function
> but the timeunits are different? or do I have to set them to be equal
> first before compositing procedure? any suggestion?
>
> Thank you,
> AF
>
>
>
> _______________________________________________
> 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 Tue Jul 16 17:36:37 2013
This archive was generated by hypermail 2.1.8 : Fri Jul 19 2013 - 15:39:06 MDT