10 implicit real*8(a-h,o-z)
11 parameter(nmax = 1561*3541)
13 real*4 data(5000),s1,select2,arr(nmax)
14 integer*4 nla,nlo,ikind
16 open(11,file=fname,status=
'old',form=
'unformatted')
21 read(11)glamn,glomn,dla,dlo,nla,nlo,ikind
22 if(ikind.eq.0)stop 20304
26 if(ikind.eq.1)
read(11)(
data(j),j=1,nlo)
32 ave = ave + dble(
data(j))
33 rms = rms + dble(
data(j))**2
36 fact = dble(nla*nlo) / dble(nla*nlo - 1)
38 ave = ave / dble(nla*nlo)
39 rms = sqrt(rms / dble(nla*nlo))
40 std = dsqrt(fact*(rms**2 - ave**2))
45 write(6,*)
' IN gridstats, npts = ',npts
46 write(6,*)
' IN gridstats, nmed = ',nmed
49 s1 = select2(nmed,npts,arr,nmax)
51 write(6,*)
' IN gridstats, s1 = ',s1
53 write(6,*)
' IN gridstats, med = ',med
55 write(6,100)trim(fname),ave,std,med
56 100
format(
'gridstats for ',a,
' = ',3f20.10)
subroutine gridstats(fname, ave, std, med)
Subroutine to print grid statistics to stdout.