Hello,
You can use the (relatively new) where function:
http://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml
x = where(x.lt.a,a,x)
Adam
Song Feng wrote:
>
> Hi All:
>
> Assume /x/is a multidimensional array dimensioned (time, lat, lon). How
> can I set the /x/ values to a specific value if /x /meet certain
> condition? For example, I'd like to set x=a if x<a.
>
> Best!
>
> Song Feng
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-- -------------------------------------------------------------- Adam Phillips asphilli_at_ucar.edu National Center for Atmospheric Research tel: (303) 497-1726 ESSL/CGD/CAS fax: (303) 497-1333 P.O. Box 3000 Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli _______________________________________________ ncl-talk mailing list ncl-talk_at_ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Fri Oct 17 2008 - 09:54:33 MDT
This archive was generated by hypermail 2.2.0 : Fri Oct 17 2008 - 10:06:33 MDT