Dear NCl community,
I read quite a few binary files, e.g. 12 files, I read them as below,
var1=fbindirread("1.bin",0, (/46,72/), "float")
var2=fbindirread("2.bin",0, (/46,72/), "float")
...
var12=fbindirread("12.bin",0, (/46,72/), "float")
in which there are some grid cells with missing data, i.e.
var1@FillValue = -999.9
var2@FillValue = -999.9
...
var12@FillValue = -999.9
Now I want to calculate the average from these 12 files, for those grid points without missing data. For those points with missing data, I set them as
var@FillValue = -999.9
if I use the way below, it will calculate the average for all the grid points.
var =(var1+var2+...+var12)/12
Any simple way to calculate the average ONLY for the grid points without missing data?
Thank you very much,
Xiaoyan
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jan 16 08:47:20 2012