Without any "date" info .... Maybe
NDAY = 365
dayavg = new ( NDAY, "float")
datahr = asciiread("foo...", -1, "float")
ndatahr= dimsizes(datahr)
if (ndatahr.ne.(NDAY*24)) then
print("Unexpected size error")
print("ndatahr="+ndatahr)
print("NDAY*24="+(NDAY*24))
exit
end if
do n=0,ndatahr-1,24
dayavg(n) = avg(datahr(n:n+23))
end do
print(dayavg)
On 8/30/13 11:40 AM, Kumar, Anil (GSFC-617.0)[UNIV OF MARYLAND] wrote:
> Hi,
> I have one year data in single array (hourly interval data) with no date information in txt file.
> Can anybody suggest how to do daily average (24 hour average for each day) in ncl script.
>
>
> Thanks,
> Anil
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Aug 30 11:50:34 2013
This archive was generated by hypermail 2.1.8 : Fri Aug 30 2013 - 14:04:57 MDT