14 implicit real*8(a-h,o-z)
15 parameter(nmax = 1561*3541)
17 real*4 data(5000),s1,select2,arr(nmax)
18 integer*4 nla,nlo,ikind
20 open(11,file=fname,status=
'old',form=
'unformatted')
25 read(11)glamn,glomn,dla,dlo,nla,nlo,ikind
26 if(ikind.eq.0)stop 20304
30 if(ikind.eq.1)
read(11)(
data(j),j=1,nlo)
36 ave = ave + dble(
data(j))
37 rms = rms + dble(
data(j))**2
40 fact = dble(nla*nlo) / dble(nla*nlo - 1)
42 ave = ave / dble(nla*nlo)
43 rms = sqrt(rms / dble(nla*nlo))
44 std = dsqrt(fact*(rms**2 - ave**2))
49 write(6,*)
' IN gridstats, npts = ',npts
50 write(6,*)
' IN gridstats, nmed = ',nmed
53 s1 = select2(nmed,npts,arr,nmax)
55 write(6,*)
' IN gridstats, s1 = ',s1
57 write(6,*)
' IN gridstats, med = ',med
59 write(6,100)trim(fname),ave,std,med
60 100
format(
'gridstats for ',a,
' = ',3f20.10)
subroutine gridstats(fname, ave, std, med)
Subroutine to print grid statistics to stdout.