question on average

From: Xiaoyan Ma <xiaoyan.ma_at_nyahnyahspammersnyahnyah>
Date: Wed Jan 18 2012 - 14:30:11 MST
Dear NCL community,

I am using dim_avg_n to do annual mean from monthly mean, e.g.

   ntim=12
   var=new((/ntim,nlat,nlon/), "float")
   do nt=0,ntim-1
   var(nt,:,:) = fbindirread(fname,0, (/nlat,nlon/), "float")
   end do
   var_ave = dim_avg_n(var, 0)

in this function the missing values are ignored. Now I have data sets for 12 months, but for some months there are missing values for some grid points.
I want to set the annual average for these points as a specific value, e.g. zero, rather than to get the average from the available month (as done by dim_avg_n)..

Does anybody tell me how to do that?

Thanks,
Xiaoyan

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jan 18 14:30:21 2012

This archive was generated by hypermail 2.1.8 : Mon Jan 23 2012 - 12:45:14 MST