<div dir="ltr">Hi ncl_talk,<div><br></div><div>I have a variable like this:</div><div>dimensions:<br> time = 2920 ;<br> lat = 224 ;<br> lon = 464 ;<br>variables:<br> float time(time) ;<br> time:calendar = "noleap" ;<br> time:long_name = "observation time" ;<br> time:units = "days since 2098-01-01 00:00:00" ;<br> float lat(lat) ;<br> lat:long_name = "latitude " ;<br> lat:units = "degrees_north " ;<br> float lon(lon) ;<br> lon:long_name = "longitude " ;<br> lon:units = "degrees_east " ;<br> float pr(time, lat, lon) ;<br> pr:long_name = "Precipitation" ;<br> pr:units = "mm" ;<br> pr:_FillValue = 1.e+20f ;<br></div><div><br></div><div>the time value is 0,0.125..364.875</div><div>I want to calculate the mean value of pr among time dimension but using every 8 time index, like pr_mean (0) = (pr(0,:,:)+
pr(1,:,:)+
pr(2,:,:)+
pr(3,:,:)+
pr(4,:,:)+
pr(5,:,:)+
pr(6,:,:)+
pr(7,:,:))/8</div><div><br></div><div>I only thought about using loops but it is too slow. Any ideas?</div><div><br></div><div>Thanks!</div><div><br></div><div>Xueyan</div></div>