Re: (no subject)

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Mon Aug 12 2013 - 11:55:31 MDT

Hi Yann,
You can use coordinate subscripting:
x({-20:60},{110:270}) = x@_FillValue
The above line assumes x is a 2-dimensional array, that lat and lon are
attached as coordinate variable to x, and that your latitudes run from
south->north and that your longitudes run from 0->360E.

If you have any further questions please post them to ncl-talk.
Adam

On 08/12/2013 11:51 AM, Yann Bertrand wrote:
>
> Hi,
> i want to mask a region by lat/lon.
> i've tried this example fromhttp://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml
> x = f->X ; 2d array
> x@lat2d = f->latitude ; 2D coordinate arrays
> x@lon2d = f->longitude
>
> latMin = -20
> latMax = 60
> lonMin = 110
> lonMax = 270
>
> x =*where*((x@lat2d.ge.latMin .and. x@lat2d.le.latMax .and. \
> x@lon2d.ge.lonMin .and. x@lon2d.le.lonMax), x, x@_FillValue)
> But it does not work for me because my lat and my lon are 1d arrays (defined by fpan)
> in this example lat and lon are 2d.
> how can I do with lat(1d) and lon(1d) ?
> Thanks in advance Yann.
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
______________________________________________________________
Adam Phillips                                asphilli@ucar.edu
NCAR/Climate and Global Dynamics Division       (303) 497-1726
P.O. Box 3000				
Boulder, CO 80307-3000    http://www.cgd.ucar.edu/cas/asphilli

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Aug 12 11:55:39 2013

This archive was generated by hypermail 2.1.8 : Wed Aug 14 2013 - 18:35:09 MDT