counting grid point on applying condition

From: sangeeta maharjan <sangeetamaharjan_at_nyahnyahspammersnyahnyah>
Date: Fri Apr 26 2013 - 00:30:33 MDT

Dear NCL user,
I have a variable named "var_mm". It's type is float and dimension and
sizes is [12]x[3]x[51]x[51].
I want to count those grid points having values in the range 100-200.
For this I did as follows

value=0;;;;variable which will count the particular grid point
satisfying applied condition.
value=value+where(var_mm(3,0,:,:) .ge.100 .and. var_mm(3,0,:,:).le. 200,1,0)

while executing the script I got error msg as "Number of dimension on
right hand side donot match number of dimension in left hand side"

I also tried to replace where() by if statement by it also generated
eroor msgas "conditional statment require SCALAR logical values."

Any help regrading on it will be appreciated.
Sangeeta Maharjan
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Apr 26 00:30:42 2013

This archive was generated by hypermail 2.1.8 : Fri Apr 26 2013 - 17:10:25 MDT