Re: Conforming arrays having different time dimensions

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed May 22 2013 - 11:50:50 MDT

Since 7305%366 is not 0 (=351)

it seems to me that the task would have to be done in a loop,

Below 'ct' is climate time (eg: day of year).
You would have to determine how 'tc' matches up with the dates
(days) of dudx (u). The following is a generic approach:

   ntim = 7305

   p = u
   p = 0.0 ; initialize to 0.0

   do nt=0,ntim-1
      tc = ind(Uc&day(tc).eq.u&time(nt)) ; this you must determine
      p(nt) = Uc(tc,:,:))*dudx(nt,:,:)
   end do

On 5/21/13 5:16 AM, Abhik Santra wrote:
> Dear NCL-users,
>
> I want to calculate the term Uc.(du/dx)
> where Uc: daily climatological mean having dimension (366 x nlat x mlon)
> u: daily anomalies dimensioned (ntim|7305 x nlat x mlon) ; 20 years daily data.
>
> Since the arrays (du/dx) and Uc have different time dimensions, how can I multiply the (du/dx) term by Uc?
> What is the right way to conform these two arrays?
>
> Thanks in advance.
>
> Best Wishes,
> Abhik
>
> ___________________________________________
>
> Abhik Santra
> CSIR Research Fellow,
> Indian Institute of Tropical Meteorology,
> Pune - 411008.
> India
> ___________________________________________
> _______________________________________________
> 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 Wed May 22 11:50:57 2013

This archive was generated by hypermail 2.1.8 : Thu May 30 2013 - 11:38:10 MDT