using ind and num function instead of IF statement

From: Debasish PaiMazumder <debasish_at_nyahnyahspammersnyahnyah>
Date: Wed Nov 11 2009 - 14:19:56 MST

Sorry for posting again... Last post has some numerical errors


I need help regarding a problems mentioned below

I have a variable x with dimension month, latitude and longitude

x(month,lat, lon) month=360, lat= 172, lon=180

I need to find out following things

1) Y (lat,lon)= number of 3 to 9 month events having x exceeding 10
   That means I need to calculate how many times x > 10 for consecutive
3 to 9 months at a particular gridcell

2) suppose Y1(lat, lon)=number of at least 10 month and more events
having x exceeding 20
i.e. means I need to calculate how many time x > 20 for consecutive 10
months and more at particular gridcell

How do I calculate Y and Y1 without using if loop in NCL



Debasish PaiMazumder, PhD
Postdoctoral Researcher
Analysis and Simulation of Regional-Scale Climate
Department of Earth and Atmospheric Sciences
University of Qubec at Montral (UQM)
550, Sherbrooke west, 19th floor, west tower,
Montral, QC, Canada H3A 1B9
Tel: (514) 282-6464-343
      (514) 937-0042 (R)

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Wed Nov 11 14:26:11 2009

This archive was generated by hypermail 2.1.8 : Tue Nov 17 2009 - 17:27:43 MST