diff options
| author | Iain R. Learmonth <irl@debian.org> | 2015-10-18 18:51:00 +0100 |
|---|---|---|
| committer | Iain R. Learmonth <irl@debian.org> | 2015-10-18 18:51:00 +0100 |
| commit | d63dd8d081a6fcd0715cd13f26df59fb831769d2 (patch) | |
| tree | b9c1f6245147a310aac3762630bad389bbb57335 /lib/baddata.f90 | |
| parent | c720a3d55c5ec832c29cb7ce50b6fb4b70c55b11 (diff) | |
Imported Upstream version 1.5.0upstream/1.5.0
Diffstat (limited to 'lib/baddata.f90')
| -rw-r--r-- | lib/baddata.f90 | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/baddata.f90 b/lib/baddata.f90 new file mode 100644 index 00000000..edacc1d5 --- /dev/null +++ b/lib/baddata.f90 @@ -0,0 +1,27 @@ +logical function baddata(id2,nz)
+
+ integer*2 id2(nz)
+
+ nadd=1200
+ j=0
+ smin=1.e30
+ smax=-smin
+ iz=49*12000/nadd
+ do i=1,iz
+ sq=0.
+ do n=1,nadd
+ j=j+1
+ x=id2(j)
+ sq=sq + x*x
+ enddo
+ rms=sqrt(sq/nadd)
+ smin=min(smin,rms)
+ smax=max(smax,rms)
+ enddo
+
+ sratio=smax/(smin+1.e-30)
+ baddata=.false.
+ if(sratio.gt.1.e30) baddata=.true.
+
+ return
+end function baddata
|
