Re: How to pick specific time...

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed, 2 Sep 2009 22:23:52 -0600 (MDT)

Hi Sabeerali,

To expand on Andrea's answer, which is perfectly correct, you can also
do:

  Xnew = (/X(:,:,(/0,7,16,21/)/)

or

  ii = (/0,7,16,21/)
  Xnew = (/X(:,:,ii)/)

--Mary

On Wed, 2 Sep 2009, Andrea Hahmann wrote:

> Hi Sabeerali
>
> This is done very easily in ncl:
>
> Xnew = (/X(:,:,0),X(:,:,7),X(:,:,16),X(:,:,21)/)
>
> Andrea
> --
>
> Andrea N. Hahmann
>
> Wind Energy Division
> Ris DTU
>
> Technical University of Denmark DTU
> Ris National Laboratory for Sustainable Energy
> Frederikborgvej 399, P.O. Box 49
> Building 125
> DK-4000 Roskilde, Denmark
>
> Direct +45 4677 5471
> Fax +45 4677 5083
> ahah_at_risoe.dk
> www.risoe.dtu.dk
>
>
>
>
> From: "Sabeerali(sebi)" <sabeerl_at_gmail.com>
> Date: Wed, 02 Sep 2009 17:00:14 +0530
> To: <ncl-talk_at_ucar.edu>
> Subject: How to pick specific time...
>
> Helloo
>
> I have variable X(lat=73,lon=173,time=23). I want to pick the time 0,7,16
> and 21 (i.e X(:,:,0),X(:,:,7),X(:,:,16) and X(:,:,21) and combine them to a
> new variable say Xnew. But dimension should not change. I want the dimension
> as Xnew(:,:,4)..Is it possible in NCL?
> Any help would be appreciable
>
>
> _______________________________________________
> 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 Sep 02 2009 - 22:23:52 MDT

This archive was generated by hypermail 2.2.0 : Thu Sep 03 2009 - 07:55:08 MDT