[ncl-talk] Fixing maximum and minimum value
Guilherme Martins
jgmsantos at gmail.com
Thu Jul 24 15:37:28 MDT 2014
Hi Deninis,
I used your first suggestion.
Thanks a lot!
Guilherme.
2014-07-24 18:32 GMT-03:00 Dennis Shea <shea at ucar.edu>:
> 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
>>
>>
>
--
https://sites.google.com/site/jgmsantos/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140724/9d381d9b/attachment.html
More information about the ncl-talk
mailing list