File: flat1.f90

package info (click to toggle)
wsjtx 2.6.1%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 69,664 kB
  • sloc: cpp: 86,977; f90: 42,417; python: 27,241; ansic: 12,510; fortran: 2,382; makefile: 197; sh: 134
file content (23 lines) | stat: -rwxr-xr-x 421 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
subroutine flat1(savg,iz,nsmo,syellow)

  real savg(iz)
  real syellow(iz)
  real x(8192)

  ia=nsmo/2 + 1
  ib=iz - nsmo/2 - 1
  nstep=20
  nh=nstep/2
  do i=ia,ib,nstep
     call pctile(savg(i-nsmo/2),nsmo,50,x(i))
     x(i-nh:i+nh-1)=x(i)
  enddo
  x(1:ia-1)=x(ia)
  x(ib+1:iz)=x(ib)

  x0=0.001*maxval(x(iz/10:(9*iz)/10))
  syellow(1:iz)=savg(1:iz)/(x(1:iz)+x0)

  return
end subroutine flat1