for infile in 111 112 114
do
for year in 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012
do
for month in 1 2 3 4 5 6 7 8 9 10 11 12
do
for day in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
do
gawk - F'\t ' 'BEGIN{
average = 0
max = 0
min = 100
count = 0
}
{
for(hour = 1; hour <25; hour = hour+1){
if($1 == "' "${year}" '" && $2 =="' "${month}" '" && $3 =="' "${day}" '" && $4 == hour){
if($5 != 99999){
average = average + $5
count = count +1
if(max < $5){
max = $10
max_hour = hour
}
if(min> $5){
min = $5
min_hour = hour
}
}
else{
count = count
}
}
}
}
END{
if(count == 24){
average = average/count
}
else{
average = 99999
max = 99999
min = 99999
}
printf "%4s\t %2s\t %2s\t %7.2f\t %7d\t %7d\n ", "' "${year}" '","' "${month}" '","' "${day}" '",average,max,min
}' 1hour/ H${ infile} .txt >> 1hour/ daily/ daily_H${ infile} .txt
done
done
done
done
Zm9yIGluZmlsZSBpbiAxMTEgMTEyIDExNApkbwoJZm9yIHllYXIgaW4gMTk2MgkxOTYzCTE5NjQJMTk2NQkxOTY2CTE5NjcJMTk2OAkxOTY5CTE5NzAJMTk3MQkxOTcyCTE5NzMJMTk3NAkxOTc1CTE5NzYJMTk3NwkxOTc4CTE5NzkJMTk4MAkxOTgxCTE5ODIJMTk4MwkxOTg0CTE5ODUJMTk4NgkxOTg3CTE5ODgJMTk4OQkxOTkwCTE5OTEJMTk5MgkxOTkzCTE5OTQJMTk5NQkxOTk2CTE5OTcJMTk5OAkxOTk5CTIwMDAJMjAwMQkyMDAyCTIwMDMJMjAwNAkyMDA1CTIwMDYJMjAwNwkyMDA4CTIwMDkJMjAxMAkyMDExCTIwMTIK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