calculation of duration

From: Debasish PaiMazumder <debasish_at_nyahnyahspammersnyahnyah>
Date: Thu, 20 Aug 2009 11:24:30 -0400

Hello

I have a variable x(nmonth, gridcell) where nmonth=251,
gridcell=30960. I would like to calculate duration and maximum
duration (in month) between zero values at each grid cell.

For example
x(0,0)=5, x(1,0)=2, x(2,0)=4, x(3,0)=0, x(4,0)=0, x(5,0)=50, x(6,0)
=2, x(7,0)=0, x(8,0)=25, x(9,0)=0 and so on

In this case the durations at gridcell=0 are 3, 2 and 1 months and
maximum duration at gridcell =0 is 3

How do I do this calculation in NCL?

Thanks

Debasish

Debasish PaiMazumder, PhD
Hydrology & Climate Science
Postdoctoral Researcher at UQM/Ouranos
550, Sherbrooke west, 19th floor, west tower,
Montral, QC, Canada H3A 1B9
Tel: (514) 282-6464-343
      (514) 937-0042 (R)
email: debasish_at_sca.uqam.ca

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Aug 20 2009 - 09:24:30 MDT

This archive was generated by hypermail 2.2.0 : Tue Sep 08 2009 - 11:49:50 MDT