[ncl-talk] Fixing maximum and minimum value
Dennis Shea
shea at ucar.edu
Thu Jul 24 15:32:26 MDT 2014
Not sure I understand:
x can be *any* dimensionality
xlimit = 100
x = where(x.lt.-xlimit, -xlimit, x)
x = where(x.gt. xlimit, xlimit, x)
or, use the NCL syntax 'clipping' operators
x = x > -xlimit
x = x < xlimit
x =
On Thu, Jul 24, 2014 at 3:09 PM, Guilherme Martins <jgmsantos at gmail.com>
wrote:
> Hi all,
>
> I'd like to obtain some tips about a question I have.
>
> I have positive and negative values (for example, -300 up to 300), but I
> want to limit the values for a range of values, for example, -100 up to 100.
>
> I used the "where" function but I didn't obtain what I want.
>
> Does anyone has some tip?
>
> What I want:
>
> where
>
> value(columnxrow) .gt. 100, 100, value(columnxrow)
> value(columnxrwm) .lt. -100, -100, value(columnxrwm)
>
> My dataset is : column x row
>
> Thanks a lot,
>
> Guilherme.
>
>
> --
> https://sites.google.com/site/jgmsantos/
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140724/fbf3d30e/attachment.html
More information about the ncl-talk
mailing list