Re: extracting using coordinate subscript

From: ousmane ndiaye <ondiaye70_at_nyahnyahspammersnyahnyah>
Date: Wed Apr 23 2014 - 02:13:46 MDT

thanks Karin,
let me reframe my question :
I want to retrieve let say two points with coordinates (-20,10) and
(-22,12) I define two variables lat=(/10.,12/) and lon=(/-20.,-22/) and I
want to use these variables as coordinate subscript in a loop to do the
extraction :
can I use this :
ncl 42> pl(i,j)=rr(:,{$lat(i)$},{$lon(j)$})
the points don't have to be contiguous.
Ousmane
sorry for the confusion

On Sun, Apr 20, 2014 at 2:42 PM, Karin Meier-Fleischer <
meier-fleischer@dkrz.de> wrote:

> Hi Ousmane,
>
> first there must be a double point ':' at pr=f->rr(:,{-20 : -22}). If you
> want to use variables
> do the following:
>
> xmin = -22.
> xmax = -20.
> pr = f->rr(:,{xmin:xmax})
>
> Bye,
> Karin
>
> Am 20.04.14 14:38, schrieb ousmane ndiaye:
>
> Hi,
> Is it possible using a variable in the dimension :
> instead of doing
> pr=f->rr(:,{-20,-22})
> use something like :
> xlat=(/-20.,-22/)
> pr=f->rr(:,{$xlat$}) ; just guessing here or something similar
> ousmane
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
> --
> Dipl. Geophys. Karin Meier-Fleischer
> Application Support, Visualization
>
> Deutsches Klimarechenzentrum GmbH E-Mail: meier-fleischer@dkrz.de
> Bundesstrasse 45a Internet: http://www.dkrz.de/
> 20146 Hamburg Phone: +49 (0)40 460094 126
> Germany Fax: +49 (0)40 460094 270
>
> Geschäftsführer: Prof. Dr. Thomas Ludwig
> Sitz der Gesellschaft: Hamburg
> Amtsgericht Hamburg HRB 39784
>
>
> _______________________________________________
> 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 Apr 23 02:14:01 2014

This archive was generated by hypermail 2.1.8 : Tue Apr 29 2014 - 09:04:20 MDT