Re: Question about picking a region

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Sun Feb 06 2011 - 20:43:37 MST

  latS = -30.0
  latN = 30.0
  lonL = -120.0 ; <====
  lonR = 150.0 ; <====
y = x(:,{latS:latN},{lonL:lonR})

If you are not reshaping you do not need to explicitly
name the dimensions.

On 2/6/11 3:32 PM, eddycarl wrote:
> Hi there,
>
> I have a question about selecting data over a geographical region.
> Suppose that data x(time,lat,lon) is with
> lat=(-90.0,90),lon=(-179.5,179.5) at 1x1 degree resolution. If I want to
> pick a region over the Pacific ocean, such as latitude from 30N to 30S,
> longitude from 150E to 120W. What I used is
>
> latS = -30.0
> latN = 30.0
> lonL = 150.0
> lonR = -120.0
> y = x(time|:,{lat|latS:latN},{lon|lonL:lonR})
>
> However, this will produce an area actually from 120W to 150E, instead
> of over Pacific. Does anyone know what shall I do to get it right? Thanks!
>
> -Eddy
>
>
>
>
> _______________________________________________
> 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 Sun Feb 6 20:43:42 2011

This archive was generated by hypermail 2.1.8 : Fri Feb 11 2011 - 16:11:42 MST