diff options
| author | hibby <d@vehibberd.com> | 2018-02-16 15:17:14 +0000 |
|---|---|---|
| committer | hibby <d@vehibberd.com> | 2018-02-16 15:17:14 +0000 |
| commit | 37f727ac0746fd85504aa46c1f023c09b3eff33a (patch) | |
| tree | c8a7ce04545040a8f161ba279528730bd9a3e6ab /lib/flat1a.f90 | |
| parent | d63dd8d081a6fcd0715cd13f26df59fb831769d2 (diff) | |
New upstream version 1.8.0+repackupstream/1.8.0+repack
Diffstat (limited to 'lib/flat1a.f90')
| -rw-r--r-- | lib/flat1a.f90 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/flat1a.f90 b/lib/flat1a.f90 new file mode 100644 index 00000000..b5c0b202 --- /dev/null +++ b/lib/flat1a.f90 @@ -0,0 +1,29 @@ +subroutine flat1a(psavg,nsmo,s2,nh,nsteps,nhmax,nsmax) + + real psavg(nh) + real s2(nhmax,nsmax) + real x(8192) + + ia=nsmo/2 + 1 + ib=nh - nsmo/2 - 1 + do i=ia,ib + call pctile(psavg(i-nsmo/2),nsmo,50,x(i)) + enddo + do i=1,ia-1 + x(i)=x(ia) + enddo + do i=ib+1,nh + x(i)=x(ib) + enddo + + do i=1,nh + psavg(i)=psavg(i)/x(i) + do j=1,nsteps + s2(i,j)=s2(i,j)/x(i) + enddo + enddo + + return +end subroutine flat1a + + |
