Re: reshaping of multidimensional arrays

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon Jan 16 2012 - 10:40:32 MST

To my knowledge, there is no NCL syntax or functions to
do what you describe. A simple function is attached.

On 1/16/12 6:58 AM, Tim Brücher wrote:
> Dear all,
>
> I am on writing a function which needs the possibility to re-shape some unknown n-dim arrays.
>
> So, let's say the input array x has n-dimensions, and two of them are called lon and lat.
>
> x_in(xdim(0), xdim(1) ...., lon, lat .... , xdim(n)
>
> Afterwards I would like to end up with an n-dim converted array like x_out(lat|:,lon|:, xdim(..)$|:, xdim(..)$|:, ......).
>
> Unfortunately, I have not seen the possibility (if any) to shape the array by giving an vector of my ordered dimensions. It looks like, that I have to know in advance, how many dimensions I do have to put this hardcoded in my ncl script. Is this true?
>
>
> Thanks in advance,
>
> Tim
>
>
> _______________________________________________
> 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 Mon Jan 16 10:40:41 2012

This archive was generated by hypermail 2.1.8 : Wed Jan 18 2012 - 09:21:55 MST