[ncl-talk] Fixing maximum and minimum value
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
On Thu, Jul 24, 2014 at 3:09 PM, Guilherme Martins <jgmsantos at gmail.com>
> 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:
> value(columnxrow) .gt. 100, 100, value(columnxrow)
> value(columnxrwm) .lt. -100, -100, value(columnxrwm)
> My dataset is : column x row
> Thanks a lot,
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ncl-talk