[ncl-talk] Logical statement with multiple conditions

Rabah Hachelaf hachelaf at sca.uqam.ca
Thu Jul 2 11:45:50 MDT 2015


I mean .or.

Thanks for the reminder.

Rabah

2015-07-02 11:24 GMT-04:00 Alan Brammer <abrammer at albany.edu>:

> Do you not mean .or. then.
>
> var can not possibly equal 1 and 2 and 3 at the same location which is
> what you are currently asking.  var could however be either 1 or 2 or 3.
>
> e.g. The month is either Jan or Feb or March.  A single month can not be
> Jan and Feb and March though.
>
> Alan.
>
> On Thu, Jul 2, 2015 at 1:37 AM, Rabah Hachelaf <hachelaf at sca.uqam.ca>
> wrote:
>
>> Hi NCL users,
>>
>> This statement did not work for me :
>>
>> idx_months  = ind (var.eq.1 .and. var.eq.2 .and. var.eq.3 )
>>
>> i want to get indices corresponding to var ==1 &2 & 3
>>
>> it works only for one condition like : idx_months  = ind (var.eq.1)
>>
>> Any suggestions,
>>
>> Thanks in advance
>>
>> --
>> ------------------------------
>> Cordialement,
>> Rabah Hachelaf
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>


-- 
------------------------------
Cordialement,
Best regards,
Rabah Hachelaf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150702/3961a644/attachment.html 


More information about the ncl-talk mailing list